Re: [Tutor] Something that Perl can do that Python can't?

2005-07-22 Thread Smith, Jeff
Well, I finally managed to solve it myself by looking at some code. The solution in Python is a little non-intuitive but this is how to get it: while 1: line = stdout.readline() if not line: break print 'LINE:', line, If anyone can do it the more Pythonic way with some sort o

[Tutor] Something that Perl can do that Python can't?

2005-07-22 Thread Smith, Jeff
So here it is: handle unbuffered output from a child process. Here is the child process script (bufcallee.py): import time print 'START' time.sleep(10) print 'STOP' In Perl, I do: open(FILE, "python bufcallee.py |"); while ($line = ) {

Re: [Tutor] tricky eval() problem

2005-07-22 Thread Kent Johnson
Marcus Goldfish wrote: > Here's a noodler I could use some help on: I need a class that can > call a user-specified function with arbitrary (unknown) parameter > lists. The trick, here, is that the user will dynamically specify the > funciton to invoke, and each function may differ in the number o

[Tutor] tricky eval() problem

2005-07-22 Thread Marcus Goldfish
Here's a noodler I could use some help on: I need a class that can call a user-specified function with arbitrary (unknown) parameter lists. The trick, here, is that the user will dynamically specify the funciton to invoke, and each function may differ in the number of parameters passed during the

Re: [Tutor] redirecting output to logfile and logrotate

2005-07-22 Thread Danny Yoo
On Fri, 22 Jul 2005, Winfried Tilanus wrote: > I am installing a server-like python program that opens a logfile in the > following way: > > # redirect output for logging to file > applog = open(config.log, 'a', 1) > sys.stdout = applog > sys.stderr = sys.stdout > > Througout the

Re: [Tutor] HELP ME DUDE

2005-07-22 Thread byron
Quoting Suranga Sarukkali <[EMAIL PROTECTED]>: > Hay, you know what? when I connect to the internet the modem software(Error > Free Software for Sure) say's a around 50-53.3Kbps connected though when I > download a file from a server not p2ps or any of the kind service the > downloads are even wh

Re: [Tutor] Please Help: Hacking

2005-07-22 Thread byron
Quoting Jeremy Jones <[EMAIL PROTECTED]>: > Here you go. This should be enlightening: > > http://www.catb.org/~esr/writings/unix-koans/script-kiddie.html Hi Jeremy, That's great... Thanks for sharing the link. Byron --- This me

Re: [Tutor] Please Help: Hacking

2005-07-22 Thread Jeremy Jones
Suranga Sarukkali wrote: > Python's Great fro Hacking Right? Please tell me more like when you > tell it to a College Student (That tell's What I'm) and since I > Sort of new to Programming in Python it's going be easy if done so. > Please reply to me at your earliest convenience and by the way

Re: [Tutor] Please Help: Hacking

2005-07-22 Thread Adam Bark
How to become a hackerOn 7/17/05, Suranga Sarukkali < [EMAIL PROTECTED]> wrote: Python's Great fro Hacking Right? Please tell me more like when you tell it to a College Student (That tell's What I'm) and since I Sort of new to Programming in Python it's going be easy if done so. Please rep

[Tutor] HELP ME DUDE

2005-07-22 Thread Suranga Sarukkali
Hay, you know what? when I connect to the internet the modem software(Error Free Software for Sure)  say's a around 50-53.3Kbps connected though when I download a file from a server not p2ps or any of the kind service the downloads are even when connection is idle without any other method of

[Tutor] Please Help: Hacking

2005-07-22 Thread Suranga Sarukkali
Python's Great fro Hacking Right? Please tell me more like when you tell it to a College Student (That tell's What I'm) and since I Sort of new to Programming in Python it's going be easy if done so. Please reply to me at your earliest convenience and by the way General Hacking Education wil

[Tutor] redirecting output to logfile and logrotate

2005-07-22 Thread Winfried Tilanus
Hi, I am installing a server-like python program that opens a logfile in the following way: # redirect output for logging to file applog = open(config.log, 'a', 1) sys.stdout = applog sys.stderr = sys.stdout Througout the program are lines like: print '[', time.ascti