Re: ElementTree find with xmlns

2007-10-12 Thread cakebread
On Oct 12, 8:35 pm, Rajarshi <[EMAIL PROTECTED]> wrote: > > You have to prefix the element name with its namespace. The following > will work > > >>> tree.find('{http://www.w3.org/1999/xhtml}body') > > http://www.w3.org/1999/xhtml}body at 779d28> > Pefect, thank you, Rajarshi! -- http://mail.py

ElementTree find with xmlns

2007-10-12 Thread cakebread
I'm having problems parsing a file: >>> tree = ElementTree.fromstring("""http://www.w3.org/1999/xhtml"; >>> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; >>> xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"; >>> xmlns:dc="http://purl.org/dc/elements/1.1/"; >>> xmlns:foaf="http://x

Re: Tool for finding external dependencies

2007-07-09 Thread Rob Cakebread
On Jul 9, 9:23 am, Alex Popescu <[EMAIL PROTECTED]> wrote: > Isn't it possible to get from modulefinder what it has found and just > filter it out according to your rules? > This way you are in control and can deicde what is internal/external. > At first glance it looked easy enough, by just filte

Re: Tool for finding external dependencies

2007-07-09 Thread Rob Cakebread
On Jul 9, 7:54 am, [EMAIL PROTECTED] wrote: > > > mod = modulefinder.ModuleFinder() > mod.run_script(path/to/python_script.py) > mod.report() > > > > Mike Nope. All of those tools and the code above show *all* imports/ dependencies, which is way too much information. I just need the 'external'

Re: Tool for finding external dependencies

2007-07-09 Thread Rob Cakebread
On Jul 9, 7:17 am, [EMAIL PROTECTED] wrote: > > Recently I ran into some debugging issues and the freeware app > "Dependency Walker" was suggested to me. I still haven't used it much > since I only got it last Friday, but it looks > promising:http://www.dependencywalker.com > > Mike Thanks Mike,

Tool for finding external dependencies

2007-07-08 Thread Rob Cakebread
Hi, I need to find external dependencies for modules (not Python standard library imports). Currently I use pylint and manually scan the output, which is very nice, or use pylint's --ext-import-graph option to create a .dot file and extract the info from it, but either way can take a very long ti

Re: disabling TCP connections, just for one script

2005-09-09 Thread cakebread
How about this: import timeoutsocket timeoutsocket.setDefaultSocketTimeout(0) This will make all sockets in your Python app fail. https://svn.plone.org/svn/collective/CMFSquidTool/trunk/timeoutsocket.py -- http://mail.python.org/mailman/listinfo/python-list