Reading info from an active file

2008-06-11 Thread Keith Nation
I have a program that writes a log file as it is running to give status of
the job.  I would like to read that file, pull certain lines of text from
it, and write to a new file.  Because I am such a novice user, I was hoping
someone had covered this before and could let me know of your methods.  If I
open and close the file repeatedly to get refreshed information, I assume it
would slow the system down.  Any thoughts?

Keith Nation
--
http://mail.python.org/mailman/listinfo/python-list

Reading info from an active file

2008-06-11 Thread Keith Nation
I have a program that writes a log file as it is running to give status of
the job.  I would like to read that file, pull certain lines of text from
it, and write to a new file.  Because I am such a novice user, I was hoping
someone had covered this before and could let me know of your methods.  If I
open and close the file repeatedly to get refreshed information, I assume it
would slow the system down.  Any thoughts?

Keith Nation
--
http://mail.python.org/mailman/listinfo/python-list

Queue/Priority Needed

2008-07-02 Thread Keith Nation
I'm still very new to python, and I have a question about how to prioritize
jobs in a queue.  Currently, I have a simple script that does the following:

job1 = [1, 'Task1', 'v03', '-start', 'Bonnie']
job2 = [2, 'Task2', 'v01', '-start', 'Billy']
job3 = [3, 'Task3', 'v01', '-start', 'Bob']
jobsequence = (job1, job2, job3)

for job in jobsequence:
jnam=job[1]
jop=job[3]
jver=job[2]
jreq=job[4]
jpatch=job[5]
jid=jnam+'/'+jver
cmdline= /home/user/program/start '+' '+jop+' -proj '+jnam+' -dir
'+'/home/user/programdata/'+jnam+'/'+jver;
os.popen2(cmdline,mode='t',bufsize=-1)
x=0
delay=5

while os.path.exists(jid+'/log.pid'):
time.sleep(60*delay)
x=x+1
print 'Job Complete'

What I would like to do is populate the job listings interactively (using
input lines) and be able to change priority on uncompleted jobs still in the
queue, and add jobs to the queue.  I appreciate any help you folks can
offer.

Keith Nation
--
http://mail.python.org/mailman/listinfo/python-list

Simple Gui

2008-08-01 Thread Keith Nation
Hi folks,

If anyone is interested, I could really use a simple gui such as easygui to
do the following tasks:

1)  Pick a file from a directory.
2)  Allow the user to prioritize the file.
3)  Add more files and prioritize.
3)  Begin processing the most important file.
4)  Interrupt button to stop the current file and start a different one.
5)  View of what is in the processing queue
6)  Remove files from the queue if they are no longer needed.

I don't think it is extremely difficult, but I am new enough to python and
the gui commands are a challenge for me.  I have the "guts" of the program
already working, but would really like a gui to do those things which will
make it even better.  Any help is greatly appreciated.

Keith N
--
http://mail.python.org/mailman/listinfo/python-list