Scott Wolcott wrote:
> Okay, I've got this ircbot that i wrote in python, and while we were
> all making Terminator jokes, it occurred to me that it would actually
> be reletively easy to have redqueen (that's the bot) write code into
> another file. Then you just have to specify the file and im
import sys
code = """import datetime
print 'This is a pile of arbitrary code to execute'
print sys.argv
print datetime.datetime.now()"""
if len(sys.argv) > 2:
exec(code)
else:
print "Fooless"
--Michael
On Feb 18, 2008 5:17 PM, Scott Wolcott <[EMAIL PROTECTED]> wrote:
> Okay, I've
Okay, I've got this ircbot that i wrote in python, and while we were all
making Terminator jokes, it occurred to me that it would actually be
reletively easy to have redqueen (that's the bot) write code into another
file. Then you just have to specify the file and import the code and run it.
It sou