newbie running IDLE with command line arguments

crypto Cryptogram29 at gmail.com
Tue May 17 12:56:49 EDT 2005


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 call last):
  File "C:\Python24\userprograms\simpleclient.py", line 5, in
-toplevel-
    host, port, message = sys.argv[1], int(sys.argv[2]), sys.argv[3]
IndexError: list index out of range

How do I enter the command arguments?

Thanks,
C29




More information about the Python-list mailing list