Command line parameters

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Command line parameters

Sheila King
I have a script that, when I am testing it from the commandline prompt, I
call like this:

/path/to/python/executable  scriptfile.py inputdata_file.txt

Where data that the script needs to run is contained in the file
inputdata_file.txt

I have marked in my preferences for the project, the correct python
executable path. I have the file scriptfile.py added to my project and open
in the IDE. How do I specify the inputdata_file.txt (which would be
sys.argv[1] to the script).

Note, that as I debug and test, I change the particular file fed into the
script frequently. So changing this easily is important.

I couldn't easily find this info in the documentation.

--
Sheila King
[hidden email]
http://www.thinkspot.net/sheila/

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: Command line parameters

Sheila King
--On Friday, August 12, 2005 2:18 PM -0700 Sheila King
<[hidden email]> wrote:

> I have a script that, when I am testing it from the commandline prompt, I
> call like this:
>
> /path/to/python/executable  scriptfile.py inputdata_file.txt
>
> Where data that the script needs to run is contained in the file
> inputdata_file.txt
..[deletia]...
> How do I specify the inputdata_file.txt (which would be
> sys.argv[1] to the script).
>
> Note, that as I debug and test, I change the particular file fed into the
> script frequently. So changing this easily is important.

I figured out a way to do this, using the wingdbstub.py file and the
concept of debugging processes launched externally to the WingIDE.

I guess that is the correct approach? (I'm launching the process from a
Terminal window on Mac OS X.)

--
Sheila King
[hidden email]
http://www.thinkspot.net/sheila/



_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: Command line parameters

Wing IDE Support
In reply to this post by Sheila King
Sheila King wrote:
> I have marked in my preferences for the project, the correct python
> executable path. I have the file scriptfile.py added to my project and open
> in the IDE. How do I specify the inputdata_file.txt (which would be
> sys.argv[1] to the script).

You should by able to specify inputdate_file.txt in the run arguments
field on debug tab of file properties.  This page will be displayed
prior to debugging unless the "show this dialog before each run"
checkbox is not checked.

John
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide