Re: Processes not exiting

2009-08-07 Thread ma3mju
On 3 Aug, 09:36, ma3mju wrote: > On 2 Aug, 21:49, Piet van Oostrum wrote: > > > > MRAB (M) wrote: > > >M> I wonder whether one of the workers is raising an exception, perhaps due > > >M> to lack of memory, when there are large number of jobs to process. > > > But that wouldn't prevent the jo

Re: M2Crypto: How to generate subjectKeyIdentifier / authorityKeyIdentifier

2009-08-07 Thread Scott David Daniels
Matthias Güntert wrote: M2Crypto has a couple of bugs open related that, with potential workarounds that I haven't yet deemed polished enough to checkin, but which might help you out: https://bugzilla.osafoundation.org/show_bug.cgi?id=7530 https://bugzilla.osafoundation.org/show_bug.cgi?id=12151

Re: how to overload operator "< <" (a < x < b)?

2009-08-07 Thread Diez B. Roggisch
alex23 schrieb: On Aug 7, 10:50 pm, Benjamin Kaplan wrote: That isn't an operator at all. Python does not support compound comparisons like that. You have to do "a > b and b > c". You know, it costs nothing to open up a python interpreter and check your certainty: x = 10 1 < x < 20 True T

Re: Bug or feature: double strings as one

2009-08-07 Thread Grant Edwards
On 2009-08-07, durumdara wrote: > Hi! > > I found an interesting thing in Python. > Today one of my "def"s got wrong result. > > When I checked the code I saw that I miss a "," from the list. > > l = ['?' '?'] > > Interesting, that Python handle them as one string. > > print ['?' '?'] > ['\xf3\xd3

Re: Changing Remote Registry

2009-08-07 Thread MRAB
Kevin Holleran wrote: Good morning, I fear the answer to this is that I just cannot do this I wrote a python script that goes out to a bunch of remote machines and queries the registry for some values. Effectively, there have been some software upgrades that have been done as the need ar

Re: Python docs disappointing - group effort to hire writers?

2009-08-07 Thread alex23
Paul Rubin wrote: > Such evaluation would only do them good.  The official docs are full > of errors and omissions, which is why we have this thread going on > here in the newsgroup. And there is a process for reporting and correcting such errors and omissions, which

Re: Problem in installing PyGreSQL

2009-08-07 Thread Scott David Daniels
Dennis Lee Bieber wrote: On Thu, 6 Aug 2009 16:00:15 +0530, "Thangappan.M" declaimed the following in gmane.comp.python.general: File "./setup.py", line 219, in finalize_options except (Warning, w): NameError: global name 'w' is not defined What would be the solution? Otherwise can you t

Re: unicode() vs. s.decode()

2009-08-07 Thread alex23
Thorsten Kampe wrote: > Bollocks. No one will even notice whether a code sequence runs 2.7 or > 5.7 seconds. That's completely artificial benchmarking. But that's not what you first claimed: > I don't think any measurable speed increase will be > noticeable between those two. But please, keep c

Changing Remote Registry

2009-08-07 Thread Kevin Holleran
Good morning, I fear the answer to this is that I just cannot do this I wrote a python script that goes out to a bunch of remote machines and queries the registry for some values. Effectively, there have been some software upgrades that have been done as the need arose but we need to do them

Re: how to overload operator "< <" (a < x < b)?

2009-08-07 Thread alex23
On Aug 7, 10:50 pm, Benjamin Kaplan wrote: > That isn't an operator at all. Python does not support compound > comparisons like that. You have to do "a > b and b > c". You know, it costs nothing to open up a python interpreter and check your certainty: >>> x = 10 >>> 1 < x < 20 True This is a _

Re: Is python buffer overflow proof?

2009-08-07 Thread Thorsten Kampe
* Neil Hodgson (Tue, 04 Aug 2009 13:32:55 GMT) > Thorsten Kampe: > > You cannot create "your own" buffer overflow in Python as you can in C > > and C++ but your code could still be vulnerable if the underlying Python > > construct is written in C. > >Python's standard library does now inclu

Re: how to kill subprocess when Python process is killed?

2009-08-07 Thread Piet van Oostrum
> "mark.v.we...@gmail.com" (M) wrote: >M> I am writing a Python program that launches a subprocess (using >M> Popen). >M> I am reading stdout of the subprocess, doing some filtering, and >M> writing to >M> stdout of the main process. >M> When I kill the main process (cntl-C) the subprocess k

Re: pulldom extracting records from recordset

2009-08-07 Thread S.Selvam
On Fri, Aug 7, 2009 at 6:10 PM, S.Selvam wrote: > Hi all, > > I am using pulldom to handle large xml files.It works fine, but i do not > know how to store a particular set of records(as xml) out of the recordset. > -code- > from xml.dom import pulldom > hamlet_file = open

Re: Web page data and urllib2.urlopen

2009-08-07 Thread Piet van Oostrum
> Dave Angel (DA) wrote: >DA> Piet van Oostrum wrote: >>> >DA> But the raw page didn't have any javascript. So what about that original >DA> raw page triggered additional stuff to be loaded? >DA> Is it "user agent", as someone else brought out? And is there somewhere I

Re: how to overload operator "< <" (a < x < b)?

2009-08-07 Thread Benjamin Kaplan
On Fri, Aug 7, 2009 at 8:00 AM, dmitrey wrote: > hi all, > is it possible to overload operator "<  <"? (And other like this one, > eg "<=  <=", ">  >", ">=  >=") > Any URL/example? > Thank you in advance, D. That isn't an operator at all. Python does not support compound comparisons like that. You

Re: Bug or feature: double strings as one

2009-08-07 Thread Peter Otten
durumdara wrote: > I found an interesting thing in Python. > Today one of my "def"s got wrong result. > > When I checked the code I saw that I miss a "," from the list. > > l = ['ó' 'Ó'] > > Interesting, that Python handle them as one string. > > print ['ó' 'Ó'] > ['\xf3\xd3'] > > I wanna ask

pulldom extracting records from recordset

2009-08-07 Thread S.Selvam
Hi all, I am using pulldom to handle large xml files.It works fine, but i do not know how to store a particular set of records(as xml) out of the recordset. -code- from xml.dom import pulldom hamlet_file = open("input_xml/inp_test.xml") events = pulldom.parse(hamlet_file)

Re: Bug or feature: double strings as one

2009-08-07 Thread Diez B. Roggisch
durumdara schrieb: Hi! I found an interesting thing in Python. Today one of my "def"s got wrong result. When I checked the code I saw that I miss a "," from the list. l = ['ó' 'Ó'] Interesting, that Python handle them as one string. print ['ó' 'Ó'] ['\xf3\xd3'] I wanna ask that is a bug or

Re: How to reset document string

2009-08-07 Thread Carl Banks
On Aug 7, 2:54 am, Anand K Rayudu wrote: > Dear All, > > We have extended and embedded python into my our application. > We exposed few APIs to python using > >  Py_InitModule("myModuleName", myMethods); > where my methods are > > static PyMethodDef VistaDbMethods[] = { >    { (char *)"myAPI",_myA

Bug or feature: double strings as one

2009-08-07 Thread durumdara
Hi! I found an interesting thing in Python. Today one of my "def"s got wrong result. When I checked the code I saw that I miss a "," from the list. l = ['ó' 'Ó'] Interesting, that Python handle them as one string. print ['ó' 'Ó'] ['\xf3\xd3'] I wanna ask that is a bug or is it a feature? In

Re: Web page data and urllib2.urlopen

2009-08-07 Thread Dave Angel
Piet van Oostrum wrote: DA> But the raw page didn't have any javascript. So what about that original DA> raw page triggered additional stuff to be loaded? DA> Is it "user agent", as someone else brought out? And is there somewhere I DA> can read more about that aspect of thing

Re: how to overload operator "< <" (a < x < b)?

2009-08-07 Thread Diez B. Roggisch
dmitrey schrieb: hi all, is it possible to overload operator "< <"? (And other like this one, eg "<= <=", "> >", ">= >=") Any URL/example? Thank you in advance, D. http://docs.python.org/reference/datamodel.html#object.__lt__ Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Python docs disappointing - group effort to hire writers?

2009-08-07 Thread Dave Angel
alex23 wrote: Paul Rubin wrote: The PHP docs as I remember are sort of regular (non-publically editable) doc pages, each of which has a public discussion thread where people can post questions and answers about the topic of that doc page. I thought it worked re

how to overload operator "< <" (a < x < b)?

2009-08-07 Thread dmitrey
hi all, is it possible to overload operator "< <"? (And other like this one, eg "<= <=", "> >", ">= >=") Any URL/example? Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode() vs. s.decode()

2009-08-07 Thread garabik-news-2005-05
Thorsten Kampe wrote: > * Steven D'Aprano (06 Aug 2009 19:17:30 GMT) >> What if you're writing a loop which takes one million different lines of >> text and decodes them once each? >> >> >>> setup = 'L = ["abc"*(n%100) for n in xrange(100)]' >> >>> t1 = timeit.Timer('for line in L: line.deco

Re: Cython + setuptools not working with .pyx,only with .c-files

2009-08-07 Thread David Cournapeau
On Fri, Aug 7, 2009 at 7:09 PM, Diez B. Roggisch wrote: > > Tried that, nothing changed :( Then you will have to modify Cython.Distutils to be aware of setuptools, I think (and soon Distribute... ). David -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing Binary Structures; Is there a better way / What is your way?

2009-08-07 Thread andrew cooke
On Aug 5, 10:46 am, "Martin P. Hellwig" wrote: > Hi List, > > On several occasions I have needed (and build) a parser that reads a > binary piece of data with custom structure. For example (bogus one): > > BE > +-+-+-+-+--++ > | Version | Command

Re: pylucene installation problem on Ubuntu 9.04

2009-08-07 Thread KK
I tried doing something silly. I went to the directory "/usr/local/lib/python2.6/site-packages" and then tried to compile/run the file called PyLucene.py the way we compile/run python scripts, then from there i started the python interpreter by typing python ( which is actually python2.6), then i t

Re: Python docs disappointing - group effort to hire writers?

2009-08-07 Thread Paul Rubin
alex23 writes: > I'd still like to see this kept out of the official docs as much as > possible, mostly for reasons of brevity & clarity. I think the > official docs should be considered definitive and not require a > hermeneutic evaluation against user comments to ensure they're still > correct..

Re: How to reset document string

2009-08-07 Thread Diez B. Roggisch
Anand K Rayudu schrieb: Dear All, We have extended and embedded python into my our application. We exposed few APIs to python using Py_InitModule("myModuleName", myMethods); where my methods are static PyMethodDef VistaDbMethods[] = { { (char *)"myAPI",_myAPICFunctionPtr ,METH_VARARGS,"usage

Re: need help with an egg

2009-08-07 Thread Diez B. Roggisch
jo schrieb: Hi, I am very new to python I created an egg on a machine. The Python version on that is 2.5. Copied that egg to a machine which has Python 2.6. unzip -t Myproj-0.1-py2.5.egg The above command shows all the files I need When I run the easy_install, I get the foll. error. Is

Re: Cython + setuptools not working with .pyx,only with .c-files

2009-08-07 Thread Diez B. Roggisch
David Cournapeau schrieb: On Thu, Aug 6, 2009 at 7:38 PM, Diez B. Roggisch wrote: Hi, I'm trying to build a Cython-extension as Egg. However, this doesn't work - I can either use distutils to build the extension, creating a myextension.c-file on the way. If that's there, I can use setuptools

Re: unicode() vs. s.decode()

2009-08-07 Thread Thorsten Kampe
* Steven D'Aprano (06 Aug 2009 19:17:30 GMT) > On Thu, 06 Aug 2009 20:05:52 +0200, Thorsten Kampe wrote: > > > That is significant! So the winner is: > > > > > > unicode('äöüÄÖÜß','utf-8') > > > > Unless you are planning to write a loop that decodes "äöüÄÖÜß" one > > million times, these benchmar

How to reset document string

2009-08-07 Thread Anand K Rayudu
Dear All, We have extended and embedded python into my our application. We exposed few APIs to python using Py_InitModule("myModuleName", myMethods); where my methods are static PyMethodDef VistaDbMethods[] = { { (char *)"myAPI",_myAPICFunctionPtr ,METH_VARARGS,"usage: MyHelp)" } Now proble

Re: problem

2009-08-07 Thread Piet van Oostrum
> sumit (s) wrote: >s> i want 2 hav the header files for regular expression to non >s> deterministin autometa >s> so whr should i find it?plz help What header files? C? You can find lots of header files by googling. But the header files contain only the interface, not the implementation. And

Re: Web page data and urllib2.urlopen

2009-08-07 Thread Piet van Oostrum
> Dave Angel (DA) wrote: >DA> Piet van Oostrum wrote: >>> >DA> If Mozilla had seen a page with this line in an appropriate place, it'd >DA> immediately begin loading the other page, at "someotherurl" But there's no >DA> such line. >>> >>> >DA> Next, I looked for javascript. The Moz

Re: Python docs disappointing - group effort to hire writers?

2009-08-07 Thread Jean-Michel Pichavant
alex23 wrote: Paul Rubin wrote: The PHP docs as I remember are sort of regular (non-publically editable) doc pages, each of which has a public discussion thread where people can post questions and answers about the topic of that doc page. I thought it worked re

Re: help with threads

2009-08-07 Thread Jean-Michel Pichavant
Michael Mossey wrote: Hello, I have a simple application that needs one thread to manage networking in addition to the main "thread" that does the main job. It's not working right. I know hardly anything about threads, so I was hoping someone could point me in the right direction to research thi

Pywin32 @ windows 7

2009-08-07 Thread Algirdas Brazas
Hi all, Did anyone manage to get windows extensions installet on windows 7 64 bit? As far as I try I get only "Setup program invalid or damaged". Al. -- http://mail.python.org/mailman/listinfo/python-list

Re: SMTP

2009-08-07 Thread Oli Schacher
Sarmad George schrieb: > msg = "Hello World" Your sending your message without any headers (no subject etc). So probably your message lands in the recipients spam folder. Try: msg = """To: recipi...@example.com Subject: hello world Hello there""" The blank line between the headers and the bod

Re: help with threads

2009-08-07 Thread Hendrik van Rooyen
On Friday 07 August 2009 05:02:10 Michael Mossey wrote: > Hello, > My problem is that in some cases, the network thread appears to stop, > while the main thread is doing a long computation. Is this computation done in pure python or are you calling some underlying thing in C? I would be surprise

Re: unicode() vs. s.decode()

2009-08-07 Thread Steven D'Aprano
On Fri, 07 Aug 2009 08:04:51 +0100, Mark Lawrence wrote: > I believe that the comment "these benchmarks are meaningless" refers to > the length of the strings being used in the tests. Surely something > involving thousands or millions of characters is more meaningful? Or to > go the other way, yo

Re: one method of COM object needs a variant type variable

2009-08-07 Thread MICHÁLEK Jan Mgr .
Thanks Gabriel, I seen this before, but I don't know, what's mean 'compatible object'. I need create object who will like as an variant type. Je. it looks lieke this: ... obj=win32com.client.Dispatch('Geomedia.PointGeometry') #geometry object gss=win32com.client.Dispatch('Geomedia.GeometryStorageS

Re: Parsing Binary Structures; Is there a better way / What is your way?

2009-08-07 Thread Hendrik van Rooyen
On Thursday 06 August 2009 20:50:30 Martin P. Hellwig wrote: > Thanks all for your insights and suggestions. > It seems to me that there are a couple of ways to this bit manipulation > and a couple of foreign modules to assist you with that. > > Would it be worth the while to do a PEP on this? > Pe

Re: unicode() vs. s.decode()

2009-08-07 Thread Mark Lawrence
Michael Ströder wrote: Thorsten Kampe wrote: * Michael Ströder (Thu, 06 Aug 2009 18:26:09 +0200) timeit.Timer("unicode('äöüÄÖÜß','utf-8')").timeit(1000) 17.23644495010376 timeit.Timer("'äöüÄÖÜß'.decode('utf8')").timeit(1000) 72.087096929550171 That is significant! So the winner is:

Re: Special chars with HTMLParser

2009-08-07 Thread Stefan Behnel
Fafounet wrote: > I am parsing a web page with special chars such as é (which > stands for é). > I know I can have the unicode character é from unicode > ("\xe9","iso-8859-1") > but with those extra characters I don' t know. > > I tried to implement handle_charref within HTMLParser without success

<    1   2