Re: newbie running IDLE with command line arguments

2005-05-19 Thread zsolt-public4516
Hmm, I submitted an earlier message, but something seems to have gone wrong. Try this: import sys usingIdle = 0 for eachPath in sys.path: if eachPath.find("idlelib"): usingIdle = 1 break if usingIdle: host="localhost" port="2000" msg="Hello world" else: host, port,

Re: newbie running IDLE with command line arguments

2005-05-18 Thread Philippe C. Martin
I might be missing it, but I do not see anyway to set command line params in IDLE. You might hage to set the values in your code: host, port, message = 'localhost', 9000, .; crypto wrote: > Hi, > > I am trying to use IDLE in order to test my program. My program is the > following: > >

Re: newbie running IDLE with command line arguments

2005-05-18 Thread qwweeeit
Hi, I apologize not to have answered to your question in a coherent way. I can take as excuses that I don't know English very well or that I was mistaken by the fact that you refer a piece of code with the error traceback (instead of simply asking for how entering command parameters in IDLE). But

Re: newbie running IDLE with command line arguments

2005-05-17 Thread qwweeeit
Hi, also if you print only 'host', running the script, you have to pass all the 3 parameters, like: python socket_script.py myserver 567 'All is OK!' The parameter sys.argv[0] is of course the script 's name (in this example: socket_script.py) Bye. -- http://mail.python.org/mailman/listinfo/py

newbie running IDLE with command line arguments

2005-05-17 Thread crypto
Hi, I am trying to use IDLE in order to test my program. My program is the following: import sys, socket size = 1024 host, port, message = sys.argv[1], int(sys.argv[2]), sys.argv[3] print host How do I run this program on IDLE? I trying Run->Run Module but it gives me: Traceback (most recent ca