[ANNOUNCE] PyGObject 2.27.0 – unstable release

2010-11-11 Thread John Palmieri
I am pleased to announce version 2.27.0 of the Python bindings for GObject. A lot of fixes went in under the hood include fixes to the Windows build environment. On the Introspection side we are getting closer to parity with PyGtk interfaces with notes from people who have successfully ported

Re: Class extension confusion :(

2010-11-11 Thread Peter Otten
r0g wrote: On 10/11/10 09:52, Peter Otten wrote: r0g wrote: I have a subclass of BaseHHTPRequestHandler which uses a dictonary paths and a function api_call which are defined in the main namespace of the module. I'd rather I was able to pass these object to the constructor and store them

Re: Is Eval *always* Evil?

2010-11-11 Thread John Nagle
On 11/10/2010 6:39 PM, Robert Kern wrote: On 2010-11-10 17:14 , Christian Heimes wrote: Am 10.11.2010 18:56, schrieb Simon Mullis: Yes, eval is evil, may lead to security issues and it's unnecessary slow, too. If you have to use eval, use the 2 or 3 argument form with a globals and locals

Re: Is Eval *always* Evil?

2010-11-11 Thread Paul Rudin
Robert Kern robert.k...@gmail.com writes: On 2010-11-10 17:14 , Christian Heimes wrote: Am 10.11.2010 18:56, schrieb Simon Mullis: Yes, eval is evil, may lead to security issues and it's unnecessary slow, too. Still - it is used in the standard library... --

Re: Questions: While And List Comprehension

2010-11-11 Thread Peter Otten
James Mills wrote: On Thu, Nov 11, 2010 at 11:01 AM, alex23 wuwe...@gmail.com wrote: +1 on this approach. Clear and obvious and not reliant on any library modules other than sys. itertools, what WAS I thinking? :) maybe: import sys from itertools import islice print [v for v in

Re: How convert list to nested dictionary?

2010-11-11 Thread Alexander Gattin
Hello, On Thu, Nov 04, 2010 at 02:10:12PM -0700, macm wrote: How convert list to nested dictionary? l ['k1', 'k2', 'k3', 'k4', 'k5'] result {'k1': {'k2': {'k3': {'k4': {'k5': {}} http://www.amk.ca/python/writing/functional so, why didn't you try python's reduce? IMO this

Re: Class extension confusion :(

2010-11-11 Thread r0g
On 10/11/10 09:52, Peter Otten wrote: class PlainAJAXRequestHandler(BaseHTTPRequestHandler): def __init__(self, api_call, paths, *args, **kw): BaseHTTPRequestHandler.__init__(self, *args, **kw) self.api_call = api_call self.paths = paths Hmm, the plot thickens!

Re: Is Eval *always* Evil?

2010-11-11 Thread Simon Mullis
On 11 November 2010 09:07, John Nagle na...@animats.com wrote: Am 10.11.2010 18:56, schrieb Simon Mullis: Yes, eval is evil, may lead to security issues and it's unnecessary slow, too.   If you have to use eval, use the 2 or 3 argument form with a globals and locals dictionary.  This lists

Re: Class extension confusion :(

2010-11-11 Thread Peter Otten
r0g wrote: On 10/11/10 09:52, Peter Otten wrote: class PlainAJAXRequestHandler(BaseHTTPRequestHandler): def __init__(self, api_call, paths, *args, **kw): BaseHTTPRequestHandler.__init__(self, *args, **kw) self.api_call = api_call self.paths = paths Hmm,

Re: Questions: While And List Comprehension

2010-11-11 Thread Felipe Vinturini
On Thu, Nov 11, 2010 at 6:10 AM, Peter Otten __pete...@web.de wrote: James Mills wrote: On Thu, Nov 11, 2010 at 11:01 AM, alex23 wuwe...@gmail.com wrote: +1 on this approach. Clear and obvious and not reliant on any library modules other than sys. itertools, what WAS I thinking? :)

Re: Questions: While And List Comprehension

2010-11-11 Thread James Mills
On Thu, Nov 11, 2010 at 6:10 PM, Peter Otten __pete...@web.de wrote: (line for line in sys.stdin) and sys.stdin are equivalent as are [v for v in items] and list(items) So print list(islice(sys.stdin, 5)) I was being a little verbose ... But I like your simplification :) cheers James

Re: Enumeration of strings and export of the constants

2010-11-11 Thread lnenov
On 11/11/2010 01:30 AM, Ian wrote: On Nov 10, 6:12 am, lnenovlne...@mm-sol.com wrote: Is there a better and more common way to do this? from itertools import count, izip class APINamespace(object): def __init__(self): self._named_values = [] def enumerate(self, names,

Re: Enumeration of strings and export of the constants

2010-11-11 Thread lnenov
On 11/10/2010 11:19 PM, Emile van Sebille wrote: On 11/10/2010 5:12 AM lnenov said... Hi, I need to enumerate a couple hundred strings to constants and export them to another module(s) globals. Do they really need to be globals? Why not a constants in an object/container that would neither

Re: Learning Pyhton - Functional Programming - How intersect/difference two dict with dict/values? fast!

2010-11-11 Thread Alexander Gattin
Hello, On Tue, Nov 09, 2010 at 09:32:17AM -0800, macm wrote: dict1 = {'ab':[[1,2,3,'d3','d4',5],12],'ac':[[1,3,'78a','79b'], 54],'ad': [[56,57,58,59],34], 'ax': [[56,57,58,59],34]} dict2 = {'ab':[[22,2,'a0','42s','c4','d3'],12],'ab':[[2,4,50,42,'c4'],

Re: Learning Pyhton - Functional Programming - How intersect/difference two dict with dict/values? fast!

2010-11-11 Thread Alexander Gattin
On Thu, Nov 11, 2010 at 11:51:33AM +0200, Alexander Gattin wrote: functional-style code emerges: dict(filter(lambda t: t[1], ... map(lambda k: (k, filter(lambda v: v in dict2[k][0], dict1[k][0])), ...filter(dict2.has_key, dict1.iterkeys())) ...) ... ) Sorry,

Re: multiple discontinued ranges

2010-11-11 Thread cbr...@cbrownsystems.com
On Nov 10, 10:02 am, Mel mwil...@the-wire.com wrote: xoff wrote: I was wondering what the best method was in Python programming for 2 discontinued ranges. e.g. I want to use the range 3 to 7 and 17 to 23. Am I obliged to use 2 for loops defining the 2 ranges like this: for i in range

Open Multiples Files at same time with multiprocessing - How declare dynamically the var?

2010-11-11 Thread macm
Hi Folks My approach to open multiples files at same time is: def openFiles(self,file,q): fp = open(file, 'rb') fp.seek(0) fcontent = fp.read() fp.close() q.put(fcontent) return def testOpen(self): L =

Re: How to test if a module exists?

2010-11-11 Thread Mark Wooding
r0g aioe@technicalbloke.com writes: Really? I get a metric butt-ton of spam every day to this address. I'm sure I get sent a lot of spam (though I don't know for sure -- see below). But I don't think much of it comes from Usenet harvesters any more. Right now it simply filtered by

strange problem with multiprocessing

2010-11-11 Thread Neal Becker
Any idea what this could be about? Traceback (most recent call last): File run-tests-1004.py, line 48, in module results = pool.map (run_test, cases) File /usr/lib64/python2.7/multiprocessing/pool.py, line 199, in map return self.map_async(func, iterable, chunksize).get() File

Re: Commercial or Famous Applicattions.?

2010-11-11 Thread Martin Gregorie
On Wed, 10 Nov 2010 16:58:06 -0800, alex23 wrote: Martin Gregorie mar...@address-in-sig.invalid wrote: Now, if ESR had fixed fetchmail [...] Did you try submitting patches? Nope. I'd already seen comments that bug reports etc. are ignored and tried getmail. Since that does the needful, why

Re: strange problem with multiprocessing

2010-11-11 Thread Marc Christiansen
Neal Becker ndbeck...@gmail.com wrote: Any idea what this could be about? Traceback (most recent call last): File run-tests-1004.py, line 48, in module results = pool.map (run_test, cases) File /usr/lib64/python2.7/multiprocessing/pool.py, line 199, in map return

Re: A matter of queues, tasks and multiprocessing

2010-11-11 Thread Emanuele D'Arrigo
On Nov 10, 9:19 pm, danmcle...@yahoo.com danmcle...@yahoo.com wrote: If you are using Python 2.6 or greater, look into the multiprocessing module. It may contain 90% of what you need. Thank you Dan, indeed the multi-processing module has been my first port of call and indeed it has all the

Re: A matter of queues, tasks and multiprocessing

2010-11-11 Thread Tim Golden
On 11/11/2010 14:04, Emanuele D'Arrigo wrote: On Nov 10, 9:19 pm, danmcle...@yahoo.comdanmcle...@yahoo.com wrote: If you are using Python 2.6 or greater, look into the multiprocessing module. It may contain 90% of what you need. Thank you Dan, indeed the multi-processing module has been my

is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Stef Mientki
hello, finally got Python running at my server. Now I would like to replace the PHP server scripts with Python ( for easier maintenance). But I can't find how th get to PHP's equivalent of $_Post and $_Cookie ? Google finds lots of links, but I can't find the answer. thanks, Stef Mientki --

How do I skip over multiple words in a file?

2010-11-11 Thread chad
Let's say that I have an article. What I want to do is read in this file and have the program skip over ever instance of the words the, and, or, and but. What would be the general strategy for attacking a problem like this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Ways of accessing this mailing list?

2010-11-11 Thread Jonathan Hartley
On Nov 3, 9:27 pm, Ben Finney ben+pyt...@benfinney.id.au wrote: Grant Edwards inva...@invalid.invalid writes: On 2010-11-02, John Bond li...@asd-group.com wrote: My normal inbox is getting unmanageable, and I think I need to find a new way of following this and other lists. Point an

Re: How do I skip over multiple words in a file?

2010-11-11 Thread Tim Chase
On 11/11/10 09:07, chad wrote: Let's say that I have an article. What I want to do is read in this file and have the program skip over ever instance of the words the, and, or, and but. What would be the general strategy for attacking a problem like this? I'd keep a file of stop words, read

Re: udp sockets with python

2010-11-11 Thread Jean-Paul Calderone
On Nov 10, 9:23 pm, Tim Roberts t...@probo.com wrote: Mag Gam magaw...@gmail.com wrote: I am measuring the round trip time using tcpdump. The C version is giving me around 80 microseconds (average) and the python is giving me close to 300 microseconds (average). If you need the performance

Re: Looping through files in a directory

2010-11-11 Thread fuglyducky
On Nov 10, 4:14 pm, James Mills prolo...@shortcircuit.net.au wrote: On Thu, Nov 11, 2010 at 8:46 AM, Matty Sarro msa...@gmail.com wrote: Short story - I have a few thousand files in a directory I need to parse through. Is there a simple way to loop through files? I'd like to avoid writing a

Re: Open Multiples Files at same time with multiprocessing - How declare dynamically the var?

2010-11-11 Thread Ian Kelly
On 11/11/2010 4:28 AM, macm wrote: def openFiles(self,file,q): fp = open(file, 'rb') fp.seek(0) The seek is unnecessary; the file will already be at position 0 after it is opened. def testOpen(self): L =

Question on using urllib

2010-11-11 Thread Olivier Scalbert
Hello all, Sorry if this question is not 100% python related, it is also related to http or html ... Everything takes place in this page: http://www.infometeo.be/klanten/KYC/campage2mega.php With the following program, I can download the 2 small meteo images, without any problem: import urllib

Re: ANN: PyGUI 2.3

2010-11-11 Thread Daniel Fetchinson
The problem is that some part of the application gets installed to /home/fetchinson/.local/lib/python2.6/site-packages/GUI and some other parts get installed to /home/fetchinson/.local/lib/python/site-packages/GUI Which parts get installed in which places, exactly? This gets installed to

Re: Question on using urllib

2010-11-11 Thread Peter Otten
Olivier Scalbert wrote: Sorry if this question is not 100% python related, it is also related to http or html ... Everything takes place in this page: http://www.infometeo.be/klanten/KYC/campage2mega.php With the following program, I can download the 2 small meteo images, without any

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Steve Holden
On 11/11/2010 9:22 AM, Stef Mientki wrote: hello, finally got Python running at my server. Now I would like to replace the PHP server scripts with Python ( for easier maintenance). But I can't find how th get to PHP's equivalent of $_Post and $_Cookie ? Google finds lots of links, but

Re: Am I The Only One Who Keeps Reading “Numpy” as “Numpty”?

2010-11-11 Thread rantingrick
On Nov 10, 5:35 pm, Arnaud Delobelle arno...@gmail.com wrote: So pypy is pie-pee, not pie-pie or pee-pee.  With that edifying thought, I'm off to bed. :) Good catch! Actually i've always thought of pypi as pie-pie and Scipy as cy-pie. Num-pie does not work for me. Maybe some linguist could

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Stef Mientki
On 11-11-2010 19:01, Steve Holden wrote: On 11/11/2010 9:22 AM, Stef Mientki wrote: hello, finally got Python running at my server. Now I would like to replace the PHP server scripts with Python ( for easier maintenance). But I can't find how th get to PHP's equivalent of $_Post and

Re: Question on using urllib

2010-11-11 Thread Olivier Scalbert
On 11/11/2010 06:37 PM, Peter Otten wrote: The problem is indeed not Python-related. The provider of the images doesn't like what you're trying to do and verifies the referer, i. e. that the page you claim to be coming from is acceptable. Here's one way to satisfy that check: from

Re: Silly newbie question - Caret character (^)

2010-11-11 Thread Seebs
(Note followups, this has stopped being very Pythony.) On 2010-11-11, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: Another function that should be deprecated is strncat???I myself was caught out misunderstanding it recently. What purpose does it serve? I'm wondering if you're

os.tmpfile() vs. tempfile.TemporaryFile()

2010-11-11 Thread John Nagle
Is there any reason to prefer tempfile.TemporaryFile() over os.tmpfile()? Both create a nameless temporary file that will be deleted on close. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: os.tmpfile() vs. tempfile.TemporaryFile()

2010-11-11 Thread danmcle...@yahoo.com
On Nov 11, 11:32 am, John Nagle na...@animats.com wrote:    Is there any reason to prefer tempfile.TemporaryFile() over os.tmpfile()?  Both create a nameless temporary file that will be deleted on close.                                 John Nagle tempfile.TemporaryFile has more options, e.g.

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread david wright
From: Stef Mientki stef.mien...@gmail.com To: python-list@python.org Sent: Thu, November 11, 2010 10:20:03 AM Subject: Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ? On 11-11-2010 19:01, Steve Holden wrote: On 11/11/2010

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Stef Mientki
On 11-11-2010 19:36, david wright wrote: *From:* Stef Mientki stef.mien...@gmail.com *To:* python-list@python.org *Sent:* Thu, November 11, 2010 10:20:03 AM *Subject:* Re: is there an Python

ANNOUNCE: NHI1-0.9, PLMK-1.7 und libmsgque-4.7

2010-11-11 Thread Andreas Otto
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear User, ANNOUNCE:Major Feature Release libmsgque: Application-Server-Toolkit for C, C++, JAVA, C#, TCL, PERL, PHP, PYTHON, RUBY, VB.NET PLMK: Programming-Language-Microkernel NHI1:

Re: Class extension confusion :(

2010-11-11 Thread r0g
On 11/11/10 09:34, Peter Otten wrote: r0g wrote: Question B) The only reason I can think of so far is that I don't have a clear picture of how those names came to end up in that scope, it seems very convenient but I'm worried it's black magic of some sort! Could anyone explain or point me to

Re: How to test if a module exists?

2010-11-11 Thread r0g
On 11/11/10 11:28, Mark Wooding wrote: r0gaioe@technicalbloke.com writes: Really? I get a metric butt-ton of spam every day to this address. I'm sure I get sent a lot of spam (though I don't know for sure -- see below). But I don't think much of it comes from Usenet harvesters any

Re: How to test if a module exists?

2010-11-11 Thread Lawrence D'Oliveiro
In message mailman.853.1289449099.2218.python-l...@python.org, Jon Dufresne wrote: On Wed, Nov 10, 2010 at 1:50 AM, Lawrence D'Oliveiro wrote: In message mailman.780.1289326087.2218.python-l...@python.org, Jon Dufresne wrote: On Mon, Nov 8, 2010 at 11:35 PM, Lawrence D'Oliveiro ... I see

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread r0g
On 11/11/10 14:22, Stef Mientki wrote: hello, finally got Python running at my server. Now I would like to replace the PHP server scripts with Python ( for easier maintenance). But I can't find how th get to PHP's equivalent of $_Post and $_Cookie ? Google finds lots of links, but I can't

please subscribe me to the list

2010-11-11 Thread Ryszard Czermiński
Thanks! Ryszard -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I skip over multiple words in a file?

2010-11-11 Thread r0g
On 11/11/10 15:07, chad wrote: Let's say that I have an article. What I want to do is read in this file and have the program skip over ever instance of the words the, and, or, and but. What would be the general strategy for attacking a problem like this? If your files are not too big I'd

Re: udp sockets with python

2010-11-11 Thread r0g
On 11/11/10 16:03, Jean-Paul Calderone wrote: On Nov 10, 9:23 pm, Tim Robertst...@probo.com wrote: Mag Gammagaw...@gmail.com wrote: I am measuring the round trip time using tcpdump. The C version is giving me around 80 microseconds (average) and the python is giving me close to 300

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Paul Watson
On 2010-11-11 11:20, Stef Mientki wrote: On 11-11-2010 19:01, Steve Holden wrote: On 11/11/2010 9:22 AM, Stef Mientki wrote: hello, finally got Python running at my server. Now I would like to replace the PHP server scripts with Python ( for easier maintenance). But I can't find how th get

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread r0g
On 11/11/10 18:01, Steve Holden wrote: On 11/11/2010 9:22 AM, Stef Mientki wrote: hello, finally got Python running at my server. Now I would like to replace the PHP server scripts with Python ( for easier maintenance). But I can't find how th get to PHP's equivalent of $_Post and $_Cookie

Re: please subscribe me to the list

2010-11-11 Thread MRAB
On 11/11/2010 20:08, Ryszard Czermiński wrote: Thanks! Ryszard What don't you do it yourself? Go to: http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list

Copy Protected PDFs and PIL

2010-11-11 Thread Brett Bowman
I'm trying to parse some basic details and a thumbnail from ~12,000 PDFs for my company, but a few hundred of them are copy protected. To make matters worse, I can't seem to trap the error it causes: whenever it happens PIL throws a FATAL PDF disallows copying message and dies. An automated way

Re: How to test if a module exists?

2010-11-11 Thread Lawrence D'Oliveiro
In message mailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This http://mail.python.org/pipermail/python-list/2010-November/1260153.html would seem to be an independent, true record of what

Re: How do I skip over multiple words in a file?

2010-11-11 Thread Paul Watson
On 2010-11-11 08:07, chad wrote: Let's say that I have an article. What I want to do is read in this file and have the program skip over ever instance of the words the, and, or, and but. What would be the general strategy for attacking a problem like this? I realize that you may need or want

Re: How to test if a module exists?

2010-11-11 Thread Tim Chase
On 11/11/10 13:49, Lawrence D'Oliveiro wrote: Is this for real? I did a replay all to respond to your post. What are you suggesting? I don't see anything that looks like an obfuscated email. Tell me what you see here, for example

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Steve Holden
On 11/11/2010 3:23 PM, r0g wrote: On 11/11/10 18:01, Steve Holden wrote: On 11/11/2010 9:22 AM, Stef Mientki wrote: hello, finally got Python running at my server. Now I would like to replace the PHP server scripts with Python ( for easier maintenance). But I can't find how th get to

Re: How do I skip over multiple words in a file?

2010-11-11 Thread Paul Rubin
chad cdal...@gmail.com writes: Let's say that I have an article. What I want to do is read in this file and have the program skip over ever instance of the words the, and, or, and but. What would be the general strategy for attacking a problem like this? Something like (untested):

Re: Copy Protected PDFs and PIL

2010-11-11 Thread Philip Semanchuk
On Nov 11, 2010, at 3:28 PM, Brett Bowman wrote: I'm trying to parse some basic details and a thumbnail from ~12,000 PDFs for my company, but a few hundred of them are copy protected. To make matters worse, I can't seem to trap the error it causes: whenever it happens PIL throws a FATAL PDF

Re: How to test if a module exists?

2010-11-11 Thread Ethan Furman
Lawrence D'Oliveiro wrote: In message mailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This http://mail.python.org/pipermail/python-list/2010-November/1260153.html would seem to be an

Re: How to test if a module exists?

2010-11-11 Thread Steve Holden
On 11/11/2010 3:26 PM, Lawrence D'Oliveiro wrote: In message mailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This http://mail.python.org/pipermail/python-list/2010-November/1260153.html

Re: Copy Protected PDFs and PIL

2010-11-11 Thread MRAB
On 11/11/2010 20:28, Brett Bowman wrote: I'm trying to parse some basic details and a thumbnail from ~12,000 PDFs for my company, but a few hundred of them are copy protected. To make matters worse, I can't seem to trap the error it causes: whenever it happens PIL throws a FATAL PDF disallows

Re: Copy Protected PDFs and PIL

2010-11-11 Thread Steve Holden
On 11/11/2010 3:28 PM, Brett Bowman wrote: I'm trying to parse some basic details and a thumbnail from ~12,000 PDFs for my company, but a few hundred of them are copy protected. To make matters worse, I can't seem to trap the error it causes: whenever it happens PIL throws a FATAL PDF

Re: How to test if a module exists?

2010-11-11 Thread r0g
On 11/11/10 20:26, Lawrence D'Oliveiro wrote: In messagemailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This http://mail.python.org/pipermail/python-list/2010-November/1260153.html would

Re: How to test if a module exists?

2010-11-11 Thread Ian
On Nov 11, 1:26 pm, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message mailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This

returning results from function

2010-11-11 Thread Neil Berg
Hi Python community, In a main script, I pass the year (yr), month (mo), day (dy) and hour(hr) into the utc_to_local function (pasted below) which converts that date and time into local standard time. I am passing several dates and times into this function and would like to work with the

Re: How to test if a module exists?

2010-11-11 Thread Emile van Sebille
I'm using thunderbird via gmane and see the sender shown as l...@geek-central.gen.nz -- so, no lies -- you've been self-outed. Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: Class extension confusion :(

2010-11-11 Thread r0g
On 11/11/10 19:34, r0g wrote: On 11/11/10 09:34, Peter Otten wrote: r0g wrote: If I understand correctly it may also be possible (and more efficient) to use setattr() to inject the parameters I want into the class as class attributes before use, rather than assigning them to data attributes

Re: How to test if a module exists?

2010-11-11 Thread MRAB
On 11/11/2010 20:26, Lawrence D'Oliveiro wrote: In messagemailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This http://mail.python.org/pipermail/python-list/2010-November/1260153.html would

Re: Copy Protected PDFs and PIL

2010-11-11 Thread Emile van Sebille
On 11/11/2010 12:28 PM Brett Bowman said... I'm trying to parse some basic details and a thumbnail from ~12,000 PDFs for my company, but a few hundred of them are copy protected. To make matters worse, I can't seem to trap the error it causes: whenever it happens PIL throws a FATAL PDF

Re: Copy Protected PDFs and PIL

2010-11-11 Thread Brett Bowman
Windows currently, though I also have a Linux box running Ubuntu if need be. On Thu, Nov 11, 2010 at 12:28 PM, Brett Bowman bnbow...@gmail.com wrote: I'm trying to parse some basic details and a thumbnail from ~12,000 PDFs for my company, but a few hundred of them are copy protected. To make

Re: How do I skip over multiple words in a file?

2010-11-11 Thread Stefan Sonnenberg-Carstens
Am 11.11.2010 21:33, schrieb Paul Watson: On 2010-11-11 08:07, chad wrote: Let's say that I have an article. What I want to do is read in this file and have the program skip over ever instance of the words the, and, or, and but. What would be the general strategy for attacking a problem like

Re: How to test if a module exists?

2010-11-11 Thread Ethan Furman
Lawrence D'Oliveiro l...@geek-central.gen.nz wrote: In message mailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This http://mail.python.org/pipermail/python-list/2010-November/1260153.html

Re: How to test if a module exists?

2010-11-11 Thread Lawrence D'Oliveiro
In message mailman.894.1289510633.2218.python-l...@python.org, MRAB wrote: ... the next one at 3 Nov 2010 22:40 Re: Allowing comments after the line continuation backslash and _all_ the subsequent ones arrived with an _unobfuscated_ email address. You mean from this one on

Re: returning results from function

2010-11-11 Thread Chris Rebert
On Thu, Nov 11, 2010 at 1:16 PM, Neil Berg nb...@atmos.ucla.edu wrote: Hi Python community, In a main script, I pass the year (yr), month (mo), day (dy) and hour(hr) into the utc_to_local function (pasted below) which converts that date and time into local standard time.  I am passing

Re: How to test if a module exists?

2010-11-11 Thread Dave Angel
On 2:59 PM, Lawrence D'Oliveiro wrote: In messagemailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This http://mail.python.org/pipermail/python-list/2010-November/1260153.html would seem to be

Re: returning results from function

2010-11-11 Thread Stefan Sonnenberg-Carstens
Am 11.11.2010 22:16, schrieb Neil Berg: Hi Python community, In a main script, I pass the year (yr), month (mo), day (dy) and hour(hr) into the utc_to_local function (pasted below) which converts that date and time into local standard time. I am passing several dates and times into this

Torrent VFS for Midnight Commander

2010-11-11 Thread Oleg Broytman
Torrent Virtual FileSystem for Midnight Commander WHAT IS IT View files, directories and meta information from a torrent metafile in Midnight Commander. WHAT'S NEW in version 1.0.0 (2010-11-11) Initial release. WHERE TO GET Master site: http://phd.pp.ru/Software/mc/ Mirrors:

Re: Am I The Only One Who Keeps Reading “Numpy” as “Numpty”?

2010-11-11 Thread Ben James
On 10/11/2010 06:53, Lawrence D'Oliveiro wrote: Sorry... I read it as numpty all the time! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to test if a module exists?

2010-11-11 Thread Ethan Furman
Dave Angel wrote: On 2:59 PM, Lawrence D'Oliveiro wrote: In messagemailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This

Re: How to test if a module exists?

2010-11-11 Thread MRAB
On 11/11/2010 21:53, Lawrence D'Oliveiro wrote: In messagemailman.894.1289510633.2218.python-l...@python.org, MRAB wrote: ... the next one at 3 Nov 2010 22:40 Re: Allowing comments after the line continuation backslash and _all_ the subsequent ones arrived with an _unobfuscated_ email address.

Re: returning results from function

2010-11-11 Thread Neil Berg
My main script reads in monthly netCDF files that record variables each hour for that month. The length of all time variables is equal to the number of hours per month. Using January 1995, for example, time_y is a 1d array of the integer 1995 repeated 744 times, time_m is a 1d array of the

Re: How to test if a module exists?

2010-11-11 Thread Emile van Sebille
On 11/11/2010 2:01 PM Dave Angel said... I subscribe to this list by email, in digest form. And your email address here has a real @ in it. Don't be so free to call people liars when they're reporting what they actually see. If you get this message directly, you can look at the TO: list. I just

Re: How to test if a module exists?

2010-11-11 Thread Steve Holden
On 11/11/2010 1:53 PM, Lawrence D'Oliveiro wrote: In message mailman.894.1289510633.2218.python-l...@python.org, MRAB wrote: ... the next one at 3 Nov 2010 22:40 Re: Allowing comments after the line continuation backslash and _all_ the subsequent ones arrived with an _unobfuscated_ email

Re: How to test if a module exists?

2010-11-11 Thread Mark Wooding
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message mailman.894.1289510633.2218.python-l...@python.org, MRAB wrote: ... the next one at 3 Nov 2010 22:40 Re: Allowing comments after the line continuation backslash and _all_ the subsequent ones arrived with an

Re: returning results from function

2010-11-11 Thread Chris Rebert
On Nov 11, 2010, at 1:54 PM, Chris Rebert wrote: On Thu, Nov 11, 2010 at 1:16 PM, Neil Berg nb...@atmos.ucla.edu wrote: Hi Python community, In a main script, I pass the year (yr), month (mo), day (dy) and hour(hr) into the utc_to_local function (pasted below) which converts that date and

Re: How to test if a module exists?

2010-11-11 Thread Robert Kern
On 2010-11-11 14:26 , Lawrence D'Oliveiro wrote: In messagemailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This http://mail.python.org/pipermail/python-list/2010-November/1260153.html would

Re: Copy Protected PDFs and PIL

2010-11-11 Thread Robert Kern
On 2010-11-11 14:28 , Brett Bowman wrote: I'm trying to parse some basic details and a thumbnail from ~12,000 PDFs for my company, but a few hundred of them are copy protected. To make matters worse, I can't seem to trap the error it causes: whenever it happens PIL throws a FATAL PDF disallows

Re: How to test if a module exists?

2010-11-11 Thread Seebs
On 2010-11-11, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This

Re: How to test if a module exists?

2010-11-11 Thread Seebs
On 2010-11-11, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.894.1289510633.2218.python-l...@python.org, MRAB wrote: ... the next one at 3 Nov 2010 22:40 Re: Allowing comments after the line continuation backslash and _all_ the subsequent ones arrived with an

Re: How to test if a module exists?

2010-11-11 Thread Seebs
On 2010-11-11, Tim Chase python.l...@tim.thechases.com wrote: === From: Lawrence D'Oliveiro unobfuscated Newsgroups: gmane.comp.python.general Oh, interesting. Gee...your unobfuscated email addresses FROM YOU. No, from gmane. Out here in comp.lang.python (no

Re: How to test if a module exists?

2010-11-11 Thread r0g
On 11/11/10 21:53, Lawrence D'Oliveiro wrote: In messagemailman.894.1289510633.2218.python-l...@python.org, MRAB wrote: ... the next one at 3 Nov 2010 22:40 Re: Allowing comments after the line continuation backslash and _all_ the subsequent ones arrived with an _unobfuscated_ email address.

Re: parse date/time from a log entry with only strftime (and no regexen)

2010-11-11 Thread Simon Mullis
This was a long time ago But just in case anyone googling ever has the same question, this is what I did (last year). The user just needs to supply a strftime formatted string, such as %A, %e %b %h:%M and this Class figures out the regex to use on the log entries... class

Re: How to test if a module exists?

2010-11-11 Thread Lawrence D'Oliveiro
I have just received an admission from Barry Warsaw that a hack was done on python-list specifically to deal with bounces caused by a list member trying to reply to my obfuscated e-mail address. I have asked him to undo that hack. If he likes, he can filter out that (obfuscated) address of

Re: How to test if a module exists?

2010-11-11 Thread Ethan Furman
Lawrence D'Oliveiro wrote: The important point, as far as I’m concerned, is that I do NOT want to see my unobfuscated address appear on USENET. You sure did a lousy job of obfuscating for someone so concerned about it. As for those who persisted in posting my address after being warned of

Re: How to test if a module exists?

2010-11-11 Thread Grant Edwards
On 2010-11-12, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: As for those who persisted in posting my address after being warned of this, I'm still deciding what to do. Plonk. -- Grant -- http://mail.python.org/mailman/listinfo/python-list

Re: How to test if a module exists?

2010-11-11 Thread Steve Holden
On 11/11/2010 4:55 PM, Grant Edwards wrote: On 2010-11-12, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: As for those who persisted in posting my address after being warned of this, I'm still deciding what to do. Plonk. Don't you mean On 2010-11-12, Lawrence D'Oliveiro

neglecting daylight savings

2010-11-11 Thread Neil Berg
Hi Python community, I am trying to convert UTC to PST and want to neglect daylight savings even for the days that are in PDT, not PST. I simply want every UTC date to be pushed back by 8 hours and not worry about the days when the difference is really -7 due to daylight savings. I have

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Roy Smith
In article ibhi4h$ev...@speranza.aioe.org, r0g aioe@technicalbloke.com wrote: On 11/11/10 14:22, Stef Mientki wrote: I can't find how th get to PHP's equivalent of $_Post and $_Cookie ? PHP is mostly a one-trick pony. It's meant to be run as a web scripting language with Apache (or, I

  1   2   3   >