Paul Rubin wrote:
"Kamilche" <[EMAIL PROTECTED]> writes:
I was inspired to enhance your code, and perform a critical bug-fix.
Your code would not have sent large files out to dialup users, because
it assumed all data was sent on the 'send' command. I added code to
check for the number of bytes sent
Not exactly on point, but this is what I use in many of my
programs to show progress on long running console apps.
Larry Bates
class progressbarClass:
def __init__(self, finalcount, progresschar=None):
import sys
self.finalcount=finalcount
self.blockcount=0
#
This is fun, so I will give my solution too (of course,
the effort here is to give the shortest solution, not the
more robust solution ;).
This is the server program, which just counts forever:
from threading import Thread
from CGIHTTPServer import test
import os
class Counter(Thread):
def r
> I was inspired to enhance your code, and perform a critical bug-fix.
> Your code would not have sent large files out to dialup users, because
> it assumed all data was sent on the 'send' command. I added code to
> check for the number of bytes sent, and loop until it's all gone.
Another solutio
"Kamilche" <[EMAIL PROTECTED]> writes:
> I was inspired to enhance your code, and perform a critical bug-fix.
> Your code would not have sent large files out to dialup users, because
> it assumed all data was sent on the 'send' command. I added code to
> check for the number of bytes sent, and loop
Cute! Thanks for posting that. I too like the 'web interface' concept,
it has made SmoothWall a pleasure to use, even on older machines.
I was inspired to enhance your code, and perform a critical bug-fix.
Your code would not have sent large files out to dialup users, because
it assumed all data w
[EMAIL PROTECTED] (Brian Roberts) writes:
> - I don't want to embed a full web server into the application or
> require any special PC setup.
That's not a big deal, just use the standard library's http server class.
> - I think I know how to listen on a socket, but not sure how to send
> stuff to
Brian Roberts wrote:
I have a command line Python program ...
I think an optional web page would be convenient interface. The
Python program would listen on some port, and if queried (by me
browsing to localhost:12345 for example) would return a pretty status
display. Hitting reload would update
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brian Roberts wrote:
| I have a command line Python program that sometimes takes a bit
| (several minutes) to run. I want to provide an optional method for an
| impatient user (me!) to check the status of the program. The type and
| amount of status i
I have a command line Python program that sometimes takes a bit
(several minutes) to run. I want to provide an optional method for an
impatient user (me!) to check the status of the program. The type and
amount of status information doesn't fit nicely into a --verbose or
logger -- either too litt
10 matches
Mail list logo