Re: linecache and glob

2008-01-03 Thread Jeremy Dillworth
Hello, Welcome to Python! glob returns a list of filenames, but getline is made to work on just one filename. So you'll need to iterate over the list returned by glob. >>> import linecache, glob >>> for filename in glob.glob('/etc/*'): >>> print linecache.getline(filename, 4) Maybe you coul

Re: Is it possible to use sockets to login to a website that uses php?

2007-11-19 Thread Jeremy Dillworth
s a testing tool which can login to web apps as you describe. It also has a Python API here: http://darcs.idyll.org/~t/projects/twill/doc/python-api.html - Jeremy Dillworth -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing java2python (Newbie)

2007-02-27 Thread Jeremy Dillworth
You'll need to run the command in the command-line window. If you're unfamiliar, here's how to start it up: Click "Start" then "Run..." then type "Cmd" in the open field. Click OK. Once you're at the command line there will be a little variation depending on where things are located on your PC.

Re: Installing java2python (Newbie)

2007-02-27 Thread Jeremy Dillworth
I haven't used that particular package, but the norm for setup.py is this command line: python setup.py install Hope this helps, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Synchronization methodology

2007-01-03 Thread Jeremy Dillworth
Hi Chris, Have you looked at the mutex module? Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a better way?

2006-02-10 Thread Jeremy Dillworth
You could eliminate a few lines like this: - while list and list[0] != O: storage.append(list.pop(0)) - Adding the "list and " to the front of the logic test will catch when there are 0 elements, so the "if..break" lines are not needed.