Re: Need to get Tags and Values from Dom

2012-05-13 Thread Stefan Behnel
TommyVee, 14.05.2012 02:50: > I have a very simple XML document that I need to "walk", and I'm using > xml.dom.minidom. No attributes, just lots of nested tags and associated > values. All I'm looking to do is iterate through each of the highest > sibling nodes, check what the tag is, and process

Re: How to call and execute C code in Python?

2012-05-13 Thread Stefan Behnel
Devin Jeanpierre, 14.05.2012 01:19: > Now if only my editor would bold those "cdef"s... :) Cython syntax support in editors is definitely not ubiquitous, but it's getting more and more widespread, so you may be lucky at some point (or find a way to add it yourself). Pygments also does a pretty goo

Re: Need to get Tags and Values from Dom

2012-05-13 Thread Kushal Kumaran
On Mon, May 14, 2012 at 6:20 AM, TommyVee wrote: > I have a very simple XML document that I need to "walk", and I'm using > xml.dom.minidom.  No attributes, just lots of nested tags and associated > values.  All I'm looking to do is iterate through each of the highest > sibling nodes, check what t

Re: Looking for video/slides from PyCon 2011...

2012-05-13 Thread Kushal Kumaran
On Fri, May 11, 2012 at 5:42 AM, Monte Milanuk wrote: > ...specifically the two lectures on creating GUI applications with Python + > QT > > http://us.pycon.org/2011/schedule/presentations/207/ > > Various searches on the 'Net don't seem to be turning up much... kinda > curious as to why? > > Anyo

Re: write a bot

2012-05-13 Thread admin lewis
2012/5/14 Emile van Sebille : > On 5/13/2012 2:25 PM admin lewis said... > >> Hi, >> I want write a bot in python, it should explore a site, click links >> and extract some info. I know mechanize but I would like to know if >> there is something better for performance. > > > Have you looked into Sc

Re: write a bot

2012-05-13 Thread Emile van Sebille
On 5/13/2012 2:25 PM admin lewis said... Hi, I want write a bot in python, it should explore a site, click links and extract some info. I know mechanize but I would like to know if there is something better for performance. Have you looked into Scrapy? http://scrapy.org Emile -- http://mai

Need to get Tags and Values from Dom

2012-05-13 Thread TommyVee
I have a very simple XML document that I need to "walk", and I'm using xml.dom.minidom. No attributes, just lots of nested tags and associated values. All I'm looking to do is iterate through each of the highest sibling nodes, check what the tag is, and process its value accordingly. If a no

Re: .py to .pyc

2012-05-13 Thread Steven D'Aprano
On Sun, 13 May 2012 23:36:02 +0200, Irmen de Jong wrote: > On 13-5-2012 23:27, Colin J. Williams wrote: >> Is there some way to ensure that a .pyc file is produced when executing >> a .py file? >> >> It seems that for small files the .pyc file is not produced. >> >> Colin W. > > All modules no

Re: How to call and execute C code in Python?

2012-05-13 Thread Devin Jeanpierre
On Sun, May 13, 2012 at 11:58 AM, Stefan Behnel wrote: > David Shi, 13.05.2012 15:25: >> Can anyone tell me how to call and exectute C code in Python? > > Take a look at Cython, a Python-like language that supports native calls to > and from C/C++ code. It translates your code into very efficient

Re: .py to .pyc

2012-05-13 Thread Tim Chase
On 05/13/12 16:36, Irmen de Jong wrote: > Why do you care anyway? Pyc files are an implementation detail. I could see wanting to pre-compile .pyc files for performance if they'll then be stored on a read-only medium (a CD/DVD, a RO network share, or a RO drive partition all come to mind). You can

Re: How to call and execute C code in Python?

2012-05-13 Thread Chris Angelico
On Mon, May 14, 2012 at 3:23 AM, Mark Lawrence wrote: > On 13/05/2012 16:39, Chris Angelico wrote: >> >> On Sun, May 13, 2012 at 11:25 PM, David Shi  wrote: >>> >>> Can anyone tell me how to call and exectute C code in Python? >> >> >> Browse the documentation about Extending and Embedding Python,

.py to .pyc

2012-05-13 Thread Colin J. Williams
Is there some way to ensure that a .pyc file is produced when executing a .py file? It seems that for small files the .pyc file is not produced. Colin W. PLEASE IGNORE - I was in the wrong directory. Colin W. -- http://mail.python.org/mailman/listinfo/python-list

Re: .py to .pyc

2012-05-13 Thread Irmen de Jong
On 13-5-2012 23:27, Colin J. Williams wrote: > Is there some way to ensure that a .pyc file is produced when executing a .py > file? > > It seems that for small files the .pyc file is not produced. > > Colin W. All modules no matter how small produce a .pyc file *when they are imported*. If yo

.py to .pyc

2012-05-13 Thread Colin J. Williams
Is there some way to ensure that a .pyc file is produced when executing a .py file? It seems that for small files the .pyc file is not produced. Colin W. -- http://mail.python.org/mailman/listinfo/python-list

write a bot

2012-05-13 Thread admin lewis
Hi, I want write a bot in python, it should explore a site, click links and extract some info. I know mechanize but I would like to know if there is something better for performance. Thanks a lot lewis. -- Linux Server, Microsoft Windows 2003/2008 Server, Exchange 2007 http://predellino.blogspot

Re: How to call and execute C code in Python?

2012-05-13 Thread Terry Reedy
On 5/13/2012 9:25 AM, David Shi wrote: Can anyone tell me how to call and exectute C code in Python? Regards. David *From:* "python-list-requ...@python.org" *To:* python-list@python.org *Sent:* Friday, 11 May 2012, 5:35

Re: How to call and execute C code in Python?

2012-05-13 Thread Stefan Behnel
Mark Lawrence, 13.05.2012 20:25: > My response to Chris Angelico was simple and > you've gone off at a complete tangent whilst writing "War and Peace". Or is > it a simple matter that my newsreader is better than your newsreader? Ah, sorry. I didn't know we were discussing at *that* level. Stefan

Re: How to call and execute C code in Python?

2012-05-13 Thread Mark Lawrence
On 13/05/2012 19:14, Stefan Behnel wrote: Mark Lawrence, 13.05.2012 19:44: On 13/05/2012 18:38, Stefan Behnel wrote: Mark Lawrence, 13.05.2012 19:23: On 13/05/2012 16:39, Chris Angelico wrote: On Sun, May 13, 2012 at 11:25 PM, David Shi wrote: Can anyone tell me how to call and exectute C co

Re: How to call and execute C code in Python?

2012-05-13 Thread Stefan Behnel
Mark Lawrence, 13.05.2012 19:44: > On 13/05/2012 18:38, Stefan Behnel wrote: >> Mark Lawrence, 13.05.2012 19:23: >>> On 13/05/2012 16:39, Chris Angelico wrote: On Sun, May 13, 2012 at 11:25 PM, David Shi wrote: > Can anyone tell me how to call and exectute C code in Python? Brows

Re: How to call and execute C code in Python?

2012-05-13 Thread Mark Lawrence
On 13/05/2012 18:38, Stefan Behnel wrote: Mark Lawrence, 13.05.2012 19:23: On 13/05/2012 16:39, Chris Angelico wrote: On Sun, May 13, 2012 at 11:25 PM, David Shi wrote: Can anyone tell me how to call and exectute C code in Python? Browse the documentation about Extending and Embedding Python

Re: How to call and execute C code in Python?

2012-05-13 Thread Stefan Behnel
Mark Lawrence, 13.05.2012 19:27: > On 13/05/2012 16:58, Stefan Behnel wrote: >> David Shi, 13.05.2012 15:25: >>> Can anyone tell me how to call and exectute C code in Python? >> >> Take a look at Cython, a Python-like language that supports native calls to >> and from C/C++ code. It translates your

Re: How to call and execute C code in Python?

2012-05-13 Thread Stefan Behnel
Mark Lawrence, 13.05.2012 19:23: > On 13/05/2012 16:39, Chris Angelico wrote: >> On Sun, May 13, 2012 at 11:25 PM, David Shi wrote: >>> Can anyone tell me how to call and exectute C code in Python? >> >> Browse the documentation about Extending and Embedding Python, there's >> an extensive API. >

Re: How to call and execute C code in Python?

2012-05-13 Thread Mark Lawrence
On 13/05/2012 16:58, Stefan Behnel wrote: David Shi, 13.05.2012 15:25: Can anyone tell me how to call and exectute C code in Python? Take a look at Cython, a Python-like language that supports native calls to and from C/C++ code. It translates your code into very efficient C code, so the wrapp

Re: How to call and execute C code in Python?

2012-05-13 Thread Mark Lawrence
On 13/05/2012 16:39, Chris Angelico wrote: On Sun, May 13, 2012 at 11:25 PM, David Shi wrote: Can anyone tell me how to call and exectute C code in Python? Browse the documentation about Extending and Embedding Python, there's an extensive API. Chris Angelico I like your response, my first

Re: How to call and execute C code in Python?

2012-05-13 Thread Stefan Behnel
David Shi, 13.05.2012 15:25: > Can anyone tell me how to call and exectute C code in Python? Take a look at Cython, a Python-like language that supports native calls to and from C/C++ code. It translates your code into very efficient C code, so the wrapping code tends to be very fast (often faster

Re: How to call and execute C code in Python?

2012-05-13 Thread Chris Angelico
On Sun, May 13, 2012 at 11:25 PM, David Shi wrote: > Can anyone tell me how to call and exectute C code in Python? Browse the documentation about Extending and Embedding Python, there's an extensive API. Chris Angelico -- http://mail.python.org/mailman/listinfo/python-list

Re: Good data structure for finding date intervals including a given date

2012-05-13 Thread Emile van Sebille
On 5/12/2012 5:17 AM Jean-Daniel said... Hello, I have a long list of n date intervals that gets added or suppressed intervals regularly. I am looking for a fast way to find the intervals containing a given date, without having to check all intervals (less than O(n)). ISTM the fastest way is t

Re: Good data structure for finding date intervals including a given date

2012-05-13 Thread Arnaud Delobelle
On 13 May 2012 13:29, Alec Taylor wrote: > There is an ordered dict type since Python 3.1[1] and Python 2.7.3[2]. I don't think that'll help the OP. Python's OrderedDict keeps track of the order in which the keys were inserted into the dictionary (a bit like a list), it doesn't keep the keys sor

How to call and execute C code in Python?

2012-05-13 Thread David Shi
Can anyone tell me how to call and exectute C code in Python? Regards. David From: "python-list-requ...@python.org" To: python-list@python.org Sent: Friday, 11 May 2012, 5:35 Subject: Python-list Digest, Vol 104, Issue 57 - Forwarded Message - Sen

Re: Good data structure for finding date intervals including a given date

2012-05-13 Thread Alec Taylor
There is an ordered dict type since Python 3.1[1] and Python 2.7.3[2]. If you are looking for the best possible self-sorting structure for searching, then perhaps you are looking for what's outlined in the 2002 article by Han & Thorup: Integer Sorting in O(n sqrt(log log n)) Expected Time and Line

http://porn-extreme.2304310.n4.nabble.com/

2012-05-13 Thread jimmy970
http://porn-extreme.2304310.n4.nabble.com/ -- View this message in context: http://python.6.n6.nabble.com/AMPUTEE-INCEST-MIDGET-2012-tp4708963p4974351.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list