[Pythonmac-SIG] how to select multiple files
Mon, 17 Jan 2000 23:13:20 -0800 (PST)
firstly i'm quite new to Python so i've probably just overlooked
something already documented but i'll ask anyway.
well i devoured the "Learning Python" book (yum) and have started
moving my coding projects onto my mac but am having trouble adjusting
the code to not operate on the command line.
for instance, my favorite little sample program from the book was the
mygrep.py program which i got to work on the mac in a very ugly and
unmac-like way by using EasyDialogs (prompt for a pattern then prompt
for a file to match the pattern in, then report either success or
i've expanded it, thanks to the InterslipControl examples (which
themselves don't run since i'm running macos8.6 without interslip), and
now i've got a little app window with a button that when pressed does
the EasyDialogs routine mentioned above, but additionally prints the
results to a message box in the app window.
what i would like to be able to do (and my reason for writing in the
first place), is to allow multiple files to be selected via something
similar to a PromptGetFile dialog with a button to "Add" multiple files
before clicking OK. Similar to how Fetch allows you to select multiple
files to upload.
if that's too complex to explain or would take months of ResEdit
training, maybe a way to use GetDirectory to specify the path and then
run the grep on all the text files in that directory would be best?
either way i'd be happy with, both options of course would be ideal.
i was able to get it to work on the command line on my windows machine
by allowing *.txt using glob, but no matter how many ways i try it on
the mac i can't get the same code to work.
i hope i articulated this well.
thanks in advance.
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.