I'm trying to figure out how to successfully use Python 2.7.1 on windows 7.
So far, I'm having to use the shell (IDLE) to create scripts and then run them from the cmd prompt. I feel this is slowing down the learning process and I was wondering if there was a way to run it from IDLE (I'm not able to create a pathway, so whenever i try to open or import a file i get an error) or some other program/text editor perhaps?
Any help would be appreciated! I'm probably just doing something wrong.
>>>
prompt.a. Browse to a directory to save your script.
b. Enter a filename.
c. Click Save.
Edit
I don't normally use IDLE, and didn't immediately see a way to configure parameters to the module, so one suggestion is to switch IDEs. Since you are using Windows 7, the pywin32 extensions contains the PythonWin IDE and its Run command has a dialog to allow command line parameters to be entered.
I think you have in mind the following function:
execfile(...)
Note:
This only applies to python 2.x, python 3 does not have
execfile()
, instead see What is an alternative to execfile in Python 3?