How do I set up a timer as a subprocess?

2005-03-10 Thread Dfenestr8
Hi. Trying to set up a timer function for my irc bot, which uses the python irclib.py. If I use time.sleep(20), it tends to freeze up the bot completely for 20 secs. That's not what I want though! I want the program to wait 20 secs, then perform another function, but in the meantime be able to ac

How do I import everything in a subdir?

2005-03-05 Thread Dfenestr8
Hi. I have a program which I want a plugin directory for. I figured the way to go about that would be to just add a plugin/ dir to sys.path, and import everything in it. Then my program can just execute the main() method of each imported plugin. Is that a good way to go about it? If so, how do I

Re: An mysql-python tutorial?

2005-01-29 Thread Dfenestr8
On Sat, 29 Jan 2005 06:41:37 +, Kartic wrote: [snip] > And here is one more site, good stuff here too:- > http://www.kitebird.com/articles/pydbapi.html > Hi. I followed the instructions there, tried out the test script they recommend. Can you tell me why this command, in the python interp

An mysql-python tutorial?

2005-01-28 Thread Dfenestr8
Hi. Been told by the admin of my (free!) server that he'd rather I should learn to use mysql if I want to continue writing cgi scripts there. Not even sure exactly what mysql is. Is there a simple tutorial anywhere on the web about using python + mysql? -- http://mail.python.org/mailman/listi

Re: python/cgi/html bug

2005-01-19 Thread Dfenestr8
On Wed, 19 Jan 2005 12:15:18 -0800, Paul Rubin wrote: > Dfenestr8 <[EMAIL PROTECTED]> writes: >> No glaring security holes that you noticed? Other than being able to >> hide things in html tags? > > Looks like you can also embed arbitrary javascript (I just tried it)

Re: python/cgi/html bug

2005-01-19 Thread Dfenestr8
On Wed, 19 Jan 2005 04:32:04 -0800, Fuzzyman wrote: > This looks very good. > I've been looking for a python messageboard CGI for a long time. > Thanx! No glaring security holes that you noticed? Other than being able to hide things in html tags? > If you wanted to add user accounts/login/admi

Re: python/cgi/html bug

2005-01-19 Thread Dfenestr8
On Tue, 18 Jan 2005 21:50:58 -0800, Dan Bishop wrote: > > Dfenestr8 wrote: >> Hi. >> >> I've written a cgi messageboard script in python, for an irc chan I > happen >> to frequent. >> >> Bear with me, it's hard for me to describe what the

python/cgi/html bug

2005-01-18 Thread Dfenestr8
Hi. I've written a cgi messageboard script in python, for an irc chan I happen to frequent. Bear with me, it's hard for me to describe what the bug is. So I've divided this post into two sections: HOW MY SCRIPTS WORKS, and WHAT THE BUG IS. HOW MY SCRIPT WORKS Basically, it's divided into two

Re: help using sockets, and OOP?

2004-12-06 Thread Dfenestr8
On Sun, 05 Dec 2004 22:29:26 +, Jp Calderone wrote: >> > Your problem doesn't seem to have anything to do with "OOP" >> > (whatever that is). Rather, you are trying to use two blocking >> > sockets at once. >> > >> > socket.connect() and socket.recv() are both "blocking" operations b

Re: help using sockets, and OOP?

2004-12-05 Thread Dfenestr8
On Sun, 05 Dec 2004 20:17:31 +, Jp Calderone wrote: > Your problem doesn't seem to have anything to do with "OOP" (whatever > that is). Rather, you are trying to use two blocking sockets at once. > > socket.connect() and socket.recv() are both "blocking" operations by > default - the

help using sockets, and OOP?

2004-12-05 Thread Dfenestr8
Hi. I realise, that there's probably something intrinsic to OOP that I don't understand here. Or maybe it's something to do with sockets. I'm not sure. Basically, I'm trying to hack up an IRC bot, that joins two servers at once. I use two object instancs of the same class, both of which make conn