2Q's: How to autocreate instance of class;How to check for membership in a class

2008-06-16 Thread asdf
So I'm writing a script which will create several instances of User() class. I want each instance to be named after the login name of a user. I don't know beforehand how many users the script will have to create or how they are named. Right now I've created a dictionary of usernames as keys and obj

matplotlib question

2008-06-11 Thread asdf
basically I need to plot a graph of data vs time. However when i use matplotlib the hr:min tick marks come out very close together and appear jumbled. So 12:00 comes out very close to 12:30 for example. There are two things I would like to do. First, is to increase the horizontal dimension of the g

Re: Dynamic HTML from Python Script

2008-06-10 Thread asdf
On Wed, 11 Jun 2008 11:20:48 +1000, Aidan wrote: > asdf wrote: >>> Well, there's a few ways you could approach it. >>> >>> You could create a cgi program from your script - this is probably the >>> solution you're looking for. >>> >>

Re: Dynamic HTML from Python Script

2008-06-10 Thread asdf
> Well, there's a few ways you could approach it. > > You could create a cgi program from your script - this is probably the > solution you're looking for. > Output from the script does come up very often. There is a new output every 10 secs and it's possible that the script might be run indefi

Dynamic HTML from Python Script

2008-06-10 Thread asdf
I have a python script whose output i want to dynamically display on a webpage which will be hosted using Apache. How do I do that? thanks -- http://mail.python.org/mailman/listinfo/python-list

Python's tail -f implementation for remote files

2008-05-28 Thread asdf
Basically what i want to do is to read a file that is being constantly appended to but which is located on a remote server. I found this for doing BASH's tail -f in python: import os tailoutputfile = os.popen('tail -f syslog') while 1: line = tailoutputfile.readline() if len(line)==0: #

Parse specific text in email body to CSV file

2008-03-08 Thread dpw . asdf
I have been searching all over for a solution to this. I am new to Python, so I'm a little lost. Any pointers would be a great help. I have a couple hundred emails that contain data I would like to incorporate into a database or CSV file. I want to search the email for specific text. The emails ba