Quick compare string to list

2009-09-30 Thread Scooter
I'm reading in a text file, and for each line in the file, I'm looking for the existence of phrases from a list. The list contains approx. 120 items currently but will most likely grow. This procedure itself is not the main function of my program and only grew out of the need to reformat certain ph

Split string but ignore quotes

2009-09-29 Thread Scooter
I'm attempting to reformat an apache log file that was written with a custom output format. I'm attempting to get it to w3c format using a python script. The problem I'm having is the field-to-field matching. In my python code I'm using split with spaces as my delimiter. But it fails when it reache

Streaming pdf with URLLib

2009-05-20 Thread Scooter
I'm playing around with urllib, and httplib, trying to make something of a pdf proxy.I have a pdf that lives on an internal web server, and I would like to be able to stream it to my external server. (this is just a test for a bigger process. Yes I could just copy the pdf to the external box). I wa

Re: Mock Form Post

2009-05-19 Thread Scooter
On May 19, 3:40 pm, Scooter wrote: > Let me qualify this by saying I'm very new to python. I'm doing some > work with mod_python and in a function I have defined I am passing in > the form and then iterating through the form keys. I'm currently > writing my unit tests

Mock Form Post

2009-05-19 Thread Scooter
Let me qualify this by saying I'm very new to python. I'm doing some work with mod_python and in a function I have defined I am passing in the form and then iterating through the form keys. I'm currently writing my unit tests and I'm trying to mock up a form object with kids so I can emulate my tru

Python Apache Handler

2009-01-09 Thread Scooter
Does anyone have any good examples, or links thereto for using python as an Apache handler? And I should qualify all of this by saying I'm a python newbie, and while having experience with Apache, I've never done anything outside whats "in the box" . What I'm looking for is how one might use Pytho