[PD] can i somehow set a startpath for [openpanel]?
ml.sven at subscience.de
Sat Aug 28 18:51:05 CEST 2004
At 08:29 27.08.2004, you wrote:
>if you have several [openpanel]s in a patch, everyone for loading files from a
>separate folder, it could be quite 'search-intensive' to load different
>files, because you always have to go in the rigth folder first.
>is there a solution for this problem like setting a startpath?
>by the way something else from my wishlist:
>an option in [openpanel] to set a suffix for a filetype to be visible in the
>opendialog would be great...
i have no pd here right now but using pyext this script should do it
save that script into the same dir as your patch and give it the name
make an object [pyext filedialog openpanel].
now you can send messages [dir /tmp( and [ext .wav( to set startpath and
and [open( to open the dialog...
let me know if it works.
self.dir = ''
self.ext = ''
def dir_1(self, dir):
self.dir = dir
self.ext = ext
f = tkFileDialog.askopenfilename(initialdir = self.dir,
defaultextension = self.ext)
More information about the Pd-list