newbie running IDLE with command line arguments
zsolt-public4516 at mailblocks.com
zsolt-public4516 at mailblocks.com
Thu May 19 12:09:11 EDT 2005
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, message = sys.argv[1], int(sys.argv[2]), sys.argv[3]
import sys, socket
size = 1024
print host
More information about the Python-list
mailing list