Quote:
Originally Posted by knudfl
right click > choose: other application > write 'python' > save
And the next time the app just opens by clicking the script.py.
|
I had done that umpteen times and my programs didn't do anything... I have a handful of progs that reformat/tag the webcasts I download and listen to. The don't have any I/O, so they should have just quietly done their job, but didn't.
So, I went all the way back to a two-line "hello, world", and that worked. After some more basics, I discovered my problem was in the cwd... It isn't where the .PY file is. It defaults to your home. A simple os.chdir was all I needed.
A couple other things I discovered...
-- You don't need a #! line at the beginning of the program if you associate .PY with Python. It works with or without it.
-- You don't need to set the program as executable.
I guess it's working like you typed in "python prog.py".
Thank you all for your help.