Re: dynamic allocation file buffer

2008-09-12 Thread Paul Boddie
On 12 Sep, 08:30, Steven D'Aprano [EMAIL PROTECTED] wrote: Which is why I previously said that XML was not well suited for random access. Maybe not. A consideration of other storage formats such as HDF5 might be appropriate: http://hdf.ncsa.uiuc.edu/HDF5/whatishdf5.html There are, of course,

Re: dynamic allocation file buffer

2008-09-11 Thread Paul Boddie
On 11 Sep, 10:34, Fredrik Lundh [EMAIL PROTECTED] wrote: And as I said before, the only use case for *huge* XML files I've ever seen used in practice is to store large streams of record-style data; I can imagine that the manipulation of the persistent form of large graph structures might be

Re: dynamic allocation file buffer

2008-09-11 Thread Paul Boddie
On 11 Sep, 19:31, Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: An acquaintance suggests that defragmentation would be a useful service to provide along with memory management too, which also requires an index. I presume that you mean efficient access to large amounts of data in the sense

Re: dynamic allocation file buffer

2008-09-10 Thread Paul Boddie
On Sep 10, 5:03 am, George Sakkis [EMAIL PROTECTED] wrote: So at best (i.e. if it actually makes any sense; I didn't read it), this is an ANNouncement of a pre-alpha piece of code. ANN posts rarely attract replies, even when they are about production/stable software. To be fair, at least some

Re: tracking collection modification

2008-09-08 Thread Paul Boddie
On 7 Sep, 12:54, [EMAIL PROTECTED] wrote: I'm working on a remote object system, something kinda like Pyro. For the purposes of caching I need to be able to tell if a given dict / list / set has been modified. Ideally what I'd like is for them to have a modification count variable that

Re: lacking follow-through

2008-09-07 Thread Paul Boddie
On 7 Sep, 23:00, castironpi [EMAIL PROTECTED] wrote: I am concerned by the lack of follow-through on some responses to recent ideas I have described. Do I merely have a wrong understanding of group policy? I think some people have taken exception to your contributions previously, which I

Re: How to bring subprocess to the foreground?

2008-09-06 Thread Paul Boddie
On 6 Sep, 17:58, [EMAIL PROTECTED] wrote: I though of displayin an information message on the screen through tkMessageBox while the subprocess is running, I did it using: try: testing = subprocess.Popen([batchFilePath], \ shell = True)

Re: Multicore-programming?

2008-09-06 Thread Paul Boddie
On 7 Sep, 00:06, cnb [EMAIL PROTECTED] wrote: If I buy a multicore computer and I have really intensive program. How would that be distributed across the cores? It typically depends on how the work done by the program is performed. Will algorithms always have to be programmed and told

Re: Use BeautifulSoup to delete certain tag while keeping its content

2008-09-06 Thread Paul Boddie
On 6 Sep, 17:11, Jackie Wang [EMAIL PROTECTED] wrote: I have the following html code: td valign=top headers=col1 font size=2 Center Bank br / Los Angeles, CA /font /td td valign=top headers=col1 font size=2 Salisbury Bank and Trust Company font face=arial, helvetica

Re: (in memory) database

2008-09-02 Thread Paul Boddie
On 2 Sep, 04:46, Zentrader [EMAIL PROTECTED] wrote: On Ubuntu you want to install something like python-sqlite (a search for python should turn up everything).  There are 2 parts to this, SQLite and the python bindings to SQLite.  So you seem to have SQLite installed but not the Python

Re: python mechanize/libxml2dom question

2008-09-02 Thread Paul Boddie
On 2 Sep, 05:35, bruce [EMAIL PROTECTED] wrote: i've got the following situation, with the following test url: http://schedule.psu.edu/soc/fall/Alloz/a-c/acctg.html#;. i can generate a list of the tables i want for the courses on the page. however, when i try to create the xpath query, and

Re: (in memory) database

2008-09-02 Thread Paul Boddie
On 2 Sep, 17:38, Zentrader [EMAIL PROTECTED] wrote: I don't understand why Cameron has a different version of Python which doesn't seem to have sqlite support enabled. Agreed, but won't the package manager tell him if python-sqlite is installed? It shouldn't need to be installed: the

Re: (in memory) database

2008-08-31 Thread Paul Boddie
On 31 Aug, 16:45, [EMAIL PROTECTED] (Cameron Laird) wrote: Yes and no. My own experience with Debian packages is that with a standard apt-get install python2.5 an attempt to import sqlite3 results in ImportError: No module named _sqlite3 That's strange from the perspective of the

Re: (in memory) database

2008-08-31 Thread Paul Boddie
On 31 Aug, 20:05, [EMAIL PROTECTED] (Cameron Laird) wrote: Let's take a definite example: I have a convenient Ubuntu 8.04.1 The content of /etc/apt/sources.list is debhttp://us.archive.ubuntu.com/ubuntuhardy main restricted debhttp://us.archive.ubuntu.com/ubuntuhardy-updates

Re: (in memory) database

2008-08-31 Thread Paul Boddie
On 31 Aug, 21:29, [EMAIL PROTECTED] (Cameron Laird) wrote: [Lots of output suggesting correct package configuration] I'm certainly perplexed, and welcome suggestions. Maybe... which python I think Jean-Paul might be on to something with his response. Are we referring to the

Re: Counting Elements in an xml file

2008-08-30 Thread Paul Boddie
On 30 Aug, 19:37, Ouray Viney [EMAIL PROTECTED] wrote: Testcase execute=true name=foobar I would like to be able to count the number of TestCases that contain the execute=true but not the ones that contain execute=false. With XPath-capable libraries, it should be enough to execute an XPath

Re: Python graphics question:pixel scrolling

2008-08-29 Thread Paul Boddie
On 29 Aug, 16:57, Raymond Luxury-Yacht [EMAIL PROTECTED] wrote:  The code below works, and uses pygame for the graphics.  But the scrolling is quite flickery when using large windows.  I'm sure that the code contains various neophyte python errors, and I'd appreciate any comments on that, but

Re: problem with packages and path

2008-08-29 Thread Paul Boddie
On 29 Aug, 19:08, Daniel [EMAIL PROTECTED] wrote: I have tried running both commands above from the mypackage directory and unittests directory. I get the following response universtally. C:\mypackagedir Volume in drive C is Default Directory of C:\mypackage 08/29/2008 11:04 AM

Re: Process Killed

2008-08-29 Thread Paul Boddie
On 28 Aug, 07:30, dieter [EMAIL PROTECTED] wrote: I'm doing some simple file manipulation work and the process gets Killed everytime I run it. No traceback, no segfault... just the word Killed in the bash shell and the process ends. The first few batch runs would only succeed with one or two

Re: libxml2dom - parsing maligned html

2008-08-27 Thread Paul Boddie
On 26 Aug, 23:22, bruce [EMAIL PROTECTED] wrote: ok, i can somehow live with this, i can accommodate it. but tell me, when the parse module/class for libxml2dom does its thing, why does it not go forward on the tree when it comes to a /html, if there's more text in the string to process??? I

Re: Decorators using instance variables

2008-08-27 Thread Paul Boddie
On 27 Aug, 13:32, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: This _sometimes_ happens, yes, and that's why you just shouldn't trust him : unless you have a good knowledge of the topic, you just can't tell whether his answer is ok or total rubbish. Can everyone just be done graduating

Re: problem with packages and path

2008-08-27 Thread Paul Boddie
On 27 Aug, 18:44, Daniel [EMAIL PROTECTED] wrote: I'm writing some unit tests for my python software which uses packages.  Here is the basic structure: mypackage [...]   unittests     __init__.py     alltests.py     test1.py     test2.py within alltests.py I would expect to be able

Re: libxml2dom - parsing maligned html

2008-08-26 Thread Paul Boddie
On 26 Aug, 17:28, bruce [EMAIL PROTECTED] wrote: so it's as if the parseString only reads the initial html tree. i've reviewed as much as i can find regarding libxml2dom to try to figure out how i can get it to read/parse/handle both html trees/nodes. Maybe there's some possibility to have

Re: I can't fetch dom node in svg file with getElementById method (module minidom and libxml2dom)

2008-08-25 Thread Paul Boddie
On 25 Aug, 11:43, KLEIN Stéphane [EMAIL PROTECTED] wrote: Hi, I've a xml svg file and I would like to update it with Python. First, I would like to fetch one dom node with getElementByID. I've one issue about this method. [SVG file with id attribute on svg element] In [1]: from xml.dom

Re: For loop inside an xml template

2008-08-25 Thread Paul Boddie
On 25 Aug, 10:58, Amie [EMAIL PROTECTED] wrote: Is it possible to have a for loop within an xml template? Yes it is: http://www.w3.org/TR/xslt.html#for-each Depending on what you mean by xml template, of course. Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: I can't fetch dom node in svg file with getElementById method (module minidom and libxml2dom)

2008-08-25 Thread Paul Boddie
On 25 Aug, 14:56, KLEIN Stéphane [EMAIL PROTECTED] wrote: [DOM implementations, identifiers and validation] Thanks ! It work. I've since updated libxml2dom to support validation and provide a more reliable getElementById method. Unfortunately, I can't seem to make the example document

Re: Is my thinking Pythonic?

2008-08-21 Thread Paul Boddie
On 21 Aug, 14:21, Hussein B [EMAIL PROTECTED] wrote: If you have a huge class, you can't figure the instance variables of each object. So, I created this constructor: -- def __init__(self):   self.speed = None   self.brand = None -- This way, I can figure the instance variables by just

Re: Newbie needs help with... his blood pressure ;-)

2008-08-21 Thread Paul Boddie
On 21 Aug, 14:57, Luis Speciale [EMAIL PROTECTED] wrote: /usr/sbin/apxs -I/Users/speciale/Desktop/dossier sans titre 3/src/include [...] I imagine that if this is really the command run by the Makefile, apxs might get upset by the unquoted path which contains spaces. Either the Makefile needs

Re: searching through a string and pulling characters

2008-08-19 Thread Paul Boddie
On 19 Aug, 01:11, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Mon, 18 Aug 2008 15:34:12 -0700, Alexnb wrote: Okay, well the point of this program is to steal from the OS X built-in dictionary. Ah, not homework, but copyright infringement. It depends what the inquirer is

Re: Bizarre method keyword-arg bug.

2008-08-18 Thread Paul Boddie
On 18 Aug, 11:40, Fredrik Lundh [EMAIL PROTECTED] wrote: Jasper wrote: Uggg!  /That's/ an intuitive side-effect/wart.  :-/ it's done that way on purpose, of course, because evaluating a full closure for each default argument at every call would greatly hurt performance (and lead to another

Re: Bizarre method keyword-arg bug.

2008-08-18 Thread Paul Boddie
On 18 Aug, 12:20, Jasper [EMAIL PROTECTED] wrote: Not surprising, as it's fairly non-standard.  I'd even argue that calling them default arguments is a misnomer -- they're more akin to static variables. Indeed, default parameter values are occasionally suggested for that purpose, although it

Re: how many nested for can we utilize?

2008-08-17 Thread Paul Boddie
On 17 Aug, 17:17, Fredrik Lundh [EMAIL PROTECTED] wrote: required reading: The Effects of Moore's Law and Slacking on Large Computations http://arxiv.org/abs/astro-ph/9912202 Or maybe this...? http://docs.python.org/tut/node6.html#SECTION00660 And this:

Re: how many nested for can we utilize?

2008-08-17 Thread Paul Boddie
On 17 Aug, 19:36, Fredrik Lundh [EMAIL PROTECTED] wrote: and functions will solve the 40-billion year computation problem exactly how? I was thinking more about the need to nest for statements to a depth of 20 levels, which I imagine only arises on a just in case basis for the inquirer. In

Re: dynamic attribute syntax

2008-08-17 Thread Paul Boddie
On 17 Aug, 21:29, castironpi [EMAIL PROTECTED] wrote: What are the changes, pros and cons, involved in something like: obj:att for a dynamic access, and obj.att for static? A previous proposal and discussion can be found here: http://www.python.org/dev/peps/pep-0363/ Paul --

Re: like a for loop for a string

2008-08-17 Thread Paul Boddie
On 17 Aug, 20:22, Alexnb [EMAIL PROTECTED] wrote: But I am wondering is there a way to something like this: funString = string string string non-string non-string string and for string in funString: print something I know you can't do that; but, is there a way do do something similar

Re: online tutorials?

2008-08-17 Thread Paul Boddie
On 18 Aug, 00:53, Gits [EMAIL PROTECTED] wrote: I want to learn how to program in python and would like to know if you guys know of any free online tutorials. Or is it too complicated to learn from a site or books? Start here, perhaps: http://wiki.python.org/moin/BeginnersGuide As for

Re: a podcast for music algo-comped with python

2008-08-15 Thread Paul Boddie
On 15 Aug, 05:50, castironpi [EMAIL PROTECTED] wrote: On Aug 14, 4:01 pm, Paul Boddie [EMAIL PROTECTED] wrote: I'm not sure if I follow the question. I don't have much experience with making sound effects, preferring to compose and pre-render my music, but I imagine there are some tricks

Re: getattr nested attributes

2008-08-15 Thread Paul Boddie
On 15 Aug, 10:35, Gregor Horvath [EMAIL PROTECTED] wrote: type 'exceptions.AttributeError': type object 'B' has no attribute 'a.test' You have to realise that attributes can have names beyond those supported by the usual attribute access syntax. For example: class C: pass setattr(C, x.y,

Re: a podcast for music algo-comped with python

2008-08-14 Thread Paul Boddie
On 12 Aug, 05:05, '2+ [EMAIL PROTECTED] wrote: oh .. am just curious who are the guys over here composing weird music with python as my self-introduction... this is the podcast am focusing on cs.py: http://www002.upp.so-net.ne.jp/buyobuyo/micro/rss.xml files of scripts i used to create

Re: a podcast for music algo-comped with python

2008-08-14 Thread Paul Boddie
On 14 Aug, 22:44, '2+ [EMAIL PROTECTED] wrote: hey thanx maybe these days .. game-programmers are doing algo-comp without talking loud about it? is python running as backbones of some games? Here's a link to a fairly reasonable summary of Python and games:

Re: help on import libxml2

2008-08-14 Thread Paul Boddie
On 14 Aug, 22:43, [EMAIL PROTECTED] wrote: Traceback (most recent call last): File stdin, line 1, in module File /sea/local/lib/python2.5/site-packages/libxml2.py, line 1, in module import libxml2mod ImportError: ld.so.1: python: fatal: relocation error: file /usr/local/

Re: Psycho question

2008-08-13 Thread Paul Boddie
On 8 Aug, 20:36, John Krukoff [EMAIL PROTECTED] wrote: One possibility for the performance difference, is that as I understand it the psyco developer has moved on to working on pypy, and probably isn't interested in keeping psyco updated and optimized for new python syntax. More here on the

Re: xcompile patch for python 2.5.2?

2008-08-13 Thread Paul Boddie
On 12 Aug, 19:30, Stephen Cattaneo [EMAIL PROTECTED] wrote: A friend of mine is attempting to cross compile python 2.5.2 onto a MIPS64 box. He is asking if there is a cross compile patch for 2.5.2. Do any of you know where He might find such a thing? Try here:

Re: interpreter vs. compiled

2008-08-05 Thread Paul Boddie
On 5 Aug, 20:54, Chris Mellon [EMAIL PROTECTED] wrote: JIT has been around for decades now, it's well documented, well understood, and quite common. Apart from Psyco, whose status is hopefully that of being revived somewhat [1], not quite common enough to permeate the most popular Python

Re: Nlp, Python and period

2008-08-04 Thread Paul Boddie
On 4 Aug, 11:59, Fred Mangusta [EMAIL PROTECTED] wrote: Hi, are you aware of any nlp packages or algorithms in Python to spot whether a '.' represents an end of sentence or rather something else (eg Mr., [EMAIL PROTECTED], etc)? I wouldn't mind finding out about such packages, either. I see

Re: Nlp, Python and period

2008-08-04 Thread Paul Boddie
On 4 Aug, 12:34, Fred Mangusta [EMAIL PROTECTED] wrote: thanks for replying. I'm interested in knowing more about your regex approach, but as you point out in your comment, seems like access to the sourceforge mail archive is restricted. Is there any way I can read about it? Would you be so

Re: interpreter vs. compiled

2008-08-02 Thread Paul Boddie
On 2 Aug, 08:33, castironpi [EMAIL PROTECTED] wrote: On Aug 1, 5:24 am, Paul Boddie [EMAIL PROTECTED] wrote: a + b # in Python ...is not sufficiently represented by... ldr r1, a ldr r2, b add r3, r1, r2 ...in some assembly language (and the resulting machine code

Re: interpreter vs. compiled

2008-08-01 Thread Paul Boddie
On 1 Aug, 07:11, castironpi [EMAIL PROTECTED] wrote: Given the restrictions (or rather, freedoms) of Python, does there exist code that necessarily cannot translate to machine code?  In other words, can you translate all Python code to machine code? Given that all valid Python code can be

Re: DB-API corner case (psycopg2)

2008-08-01 Thread Paul Boddie
On 1 Aug, 16:39, Diez B. Roggisch [EMAIL PROTECTED] wrote: Diez B. Roggisch schrieb: Thomas Guettler schrieb: cursor.execute('''SELECT '%' ''', ()) # Does fail Traceback (most recent call last): File /localhome/modw/tmp/t.py, line 5, in module cursor.execute('''SELECT '%' ''',

Re: Is it possible to consume UTF8 XML documents using xml.dom.pulldom?

2008-07-31 Thread Paul Boddie
On 30 Jul, 20:15, Peter Otten [EMAIL PROTECTED] wrote: Paul Boddie wrote: Who wants to be first to submit a patch? ;-) And where? The sourceforge page says PyXML is no longer maintained. The minidom code is in the standard library: http://svn.python.org/view/python/trunk/Lib/xml/dom

Re: Is it possible to consume UTF8 XML documents using xml.dom.pulldom?

2008-07-30 Thread Paul Boddie
On 30 Jul, 16:32, Simon Willison [EMAIL PROTECTED] wrote: I'm having a horrible time trying to get xml.dom.pulldom to consume a UTF8 encoded XML file. Here's what I've tried so far: xml_utf8 = ?xml version=1.0 encoding=UTF-8 ? msgSimon\xe2\x80\x99s XML nightmare/msg from xml.dom import

Re: Is it possible to consume UTF8 XML documents using xml.dom.pulldom?

2008-07-30 Thread Paul Boddie
On 30 Jul, 18:17, Simon Willison [EMAIL PROTECTED] wrote: Some very useful people in #python on Freenode pointed out that my bug occurs because I'm trying to display things interactively in the console. Saving to a variable instead fixes the problem. What's strange about that is how the

Re: Is it possible to consume UTF8 XML documents using xml.dom.pulldom?

2008-07-30 Thread Paul Boddie
On 30 Jul, 19:23, Peter Otten [EMAIL PROTECTED] wrote: I'm on Kubuntu 7.10 and see the same error as Simon. The problem is in the minidom.CharacterData class which has the following method     def __repr__(self):         data = self.data         if len(data) 10:             dotdotdot =

Re: DB access without object-relation mapping?

2008-07-29 Thread Paul Boddie
On 29 Jul, 17:20, kj [EMAIL PROTECTED] wrote:  So what's the standard Python way to send SQL directly to a Postgres database and get back results? Take a look at this page: http://wiki.python.org/moin/DatabaseInterfaces I've used psycopg2

Re: Build tool for Python

2008-07-29 Thread Paul Boddie
On 29 Jul, 17:08, Hussein B [EMAIL PROTECTED] wrote: Apache Ant is the de facto building tool for Java (whether JSE, JEE and JME) application. With Ant you can do what ever you want: compile, generate docs, generate code, packing, deploy, connecting to remote servers and every thing. Do we

Re: xml.dom's weirdness?

2008-07-28 Thread Paul Boddie
On 28 Jul, 16:15, Sion Arrowsmith [EMAIL PROTECTED] wrote: Stefan Behnel [EMAIL PROTECTED] wrote: Blame Ubuntu/Debian. I'd be wary about including Debian in that blame. Using 4.0 here, with a 2.4.4 default and a 2.5.0 straight from the package: [...] I can imagine that some of the Python

Re: Questions on 64 bit versions of Python

2008-07-26 Thread Paul Boddie
On 25 Jul, 12:35, M.-A. Lemburg [EMAIL PROTECTED] wrote: But then Intel Itanium is being phased out anyway Citation needed! ;-) Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Attack a sacred Python Cow

2008-07-26 Thread Paul Boddie
On 26 Jul, 06:06, Terry Reedy [EMAIL PROTECTED] wrote: Paul Boddie wrote: The problem is that the explicit requirement to have self at the start of every method is something that should be shipped off to the implicit category. Here, I presume that the author meant at the start of every

Re: Pwnie awards

2008-07-26 Thread Paul Boddie
On 27 Jul, 02:03, [EMAIL PROTECTED] (Aahz) wrote: Boy, am I glad we're not listed: http://pwnie-awards.org/2008/awards.html An amusing mention, though: 2008-03-03: Core sends proof-of-concept code written in Python. 2008-03-05: Vendor asks for compiler tools required to use the PoC code.

Re: Attack a sacred Python Cow

2008-07-25 Thread Paul Boddie
On 25 Jul, 22:37, Terry Reedy [EMAIL PROTECTED] wrote: Kay Schluehr wrote: This isn't the problem Jordan tries to address. It's really just about `self` in the argument signature of f, not about its omission in the body. That is not at all how I read him, so I will let him respond if he

Re: Attack a sacred Python Cow

2008-07-24 Thread Paul Boddie
On 24 Jul, 12:02, Sebastian \lunar\ Wiesner [EMAIL PROTECTED] wrote: Fortunately, Python isn't designed according to your ideas, and won't change, so consider your posting a waste of time. This is the kind of petty response that serves only to shut down discussion that might actually lead to

Re: xpathEval fails for large files

2008-07-22 Thread Paul Boddie
On 22 Jul, 11:00, Kanchana [EMAIL PROTECTED] wrote: I tried to extract some data with xpathEval. Path contain more than 100,000 elements. doc = libxml2.parseFile(test.xml) ctxt = doc.xpathNewContext() result = ctxt.xpathEval('//src_ref/@editions') doc.freeDoc() ctxt.xpathFreeContext()

Re: Amazon: Practical Django Projects by James Bennett (June 2008)

2008-07-19 Thread Paul Boddie
On 17 Jul, 11:09, Fredrik Lundh [EMAIL PROTECTED] wrote: (and the stable release and much will change stuff is pure FUD, of course. what competing project will I find if I google your name?) That's a bit unfair. Maybe the guy was stung by previous experiences with books and certain other

Re: gelato - nvidia and python

2008-06-29 Thread Paul Boddie
On 29 Jun, 17:34, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: dir(r) ['__call__', '__class__', '__cmp__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__module__', '__name__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__self__', '__setattr__',

Re: JPype, Jython or JEPP?

2008-06-25 Thread Paul Boddie
On 25 Jun, 16:10, RC [EMAIL PROTECTED] wrote: Dear Python Experts/Programmers, I'm going to write a Python program to access some Java class methods from our *.jar file. In your opinion, which way is the good (not the best) way to do that? You've already listed some of the candidates from

Re: How do I create a new Node using pulldom?

2008-06-20 Thread Paul Boddie
On 20 Jun, 22:17, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using xml.dom.pulldom to parse through an XML file. I use expandNode() to scrutinize certain blocks of it that I'm interested in. Right. This is the thing which differentiates pulldom from traditional DOM implementations, which

Re: Combining music or video files?

2008-06-19 Thread Paul Boddie
On 16 Jun, 04:53, John Salerno [EMAIL PROTECTED] wrote: Before I try this and destroy my computer :) I just wanted to see if this would even work at all. Is it possible to read a binary file such as an mp3 or an avi, put its contents into a new file, then read another such file and append its

Re: python screen scraping/parsing

2008-06-13 Thread Paul Boddie
On 13 Jun, 20:10, bruce [EMAIL PROTECTED] wrote: url =http://www.pricegrabber.com/rating_summary.php/page=1; [...] tr = /html/body/[EMAIL PROTECTED]'pgSiteContainer']/[EMAIL PROTECTED]'pgPageContent']/table[2]/tbo dy/tr[4] tr_=d.xpath(tr) [...] my issue appears to be

Re: python screen scraping/parsing

2008-06-13 Thread Paul Boddie
On 13 Jun, 23:09, bruce [EMAIL PROTECTED] wrote: Thanks for the reply. Came to the same conclusion a few minutes before I saw your email. Another question: tr=d.xpath(foo) gets me an array of nodes. is there a way for me to then iterate through the node tr[x] to see if a child node

Re: Making wxPython a standard module?

2008-06-12 Thread Paul Boddie
On 12 Jun, 16:18, John Salerno [EMAIL PROTECTED] wrote: Just out of curiosity, what are the chances of this happening (sort of like what happened with sqlite)? Plenty of prior discussion here:

Re: Why does python not have a mechanism for data hiding?

2008-06-11 Thread Paul Boddie
On 11 Jun, 10:10, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Russ P. a écrit : You may be right to an extent for small or medium-sized non-critical projects, but you are certainly not right in general. I read something a while back about the flight software for the Boeing 777. I

Re: Why does python not have a mechanism for data hiding?

2008-06-11 Thread Paul Boddie
On 11 Jun, 21:28, Russ P. [EMAIL PROTECTED] wrote: All I did was to suggest that a keyword be added to Python to designate private data and methods without cluttering my cherished code with those ugly leading underscores all over the place. I don't like that clutter any more than I like all

Re: need help with timezone conversion (unexpected side effect of time.mktime ??)

2008-06-09 Thread Paul Boddie
On 9 Jun, 07:40, Ivan Velev [EMAIL PROTECTED] wrote: Thanks Paul, I have identified the problem - because of daylight change this particular timesamp was observed twice in Europe/Sofia. Here is the GMT-to-local-time conversion: ++-+-+ |

Re: line continuation for lines ending in and or or

2008-06-05 Thread Paul Boddie
On 5 Jun, 22:40, Terry Reedy [EMAIL PROTECTED] wrote: A line ending in an operator is ambiguous in that it *could* indicate that the programmer intends to continue on the next line while it also could indicate that the programmer forgot to finish before hitting return, or that something got

Re: need help with timezone conversion (unexpected side effect of time.mktime ??)

2008-06-04 Thread Paul Boddie
On 3 Jun, 19:44, Ivan Velev [EMAIL PROTECTED] wrote: I've tried this with Python 2.3 and 2.4 on Red Hat Enterprise Linux 4 and can't reproduce the problem, even with other TZ values such as Thanks for the quick reply. Can you please let me know what value do you receive during your tests

Re: multiprocessing module (PEP 371)

2008-06-04 Thread Paul Boddie
On 4 Jun, 20:06, sturlamolden [EMAIL PROTECTED] wrote: Even a non-COWfork would be preferred. I will strongly suggest something is done to add support for os.fork to Python on Windows. Either create a full cow fork using ZwCreateProcess

Re: Better performance

2008-06-03 Thread Paul Boddie
On 2 Jun, 20:16, David [EMAIL PROTECTED] wrote: PHP: Easy to make web pages. Perl: Lots of libraries, good text processing support Python: Easy to read and maintain PHP: For the security vulnerabilities. Perl: For the maintenance problem. Python: To the rescue! ;-) You could even use all

Re: Database Query Contains Old Data

2008-06-03 Thread Paul Boddie
On 3 Jun, 00:17, James A. Donald [EMAIL PROTECTED] wrote: On Wed, 21 May 2008 07:23:04 -0700 (PDT), Paul Boddie MySQL appears to use repeatable read by default [1] as its transaction isolation level, whereas PostgreSQL (for example) uses read committed by default [2]. I would guess

Re: need help with timezone conversion (unexpected side effect of time.mktime ??)

2008-06-03 Thread Paul Boddie
On 3 Jun, 16:12, Ivan Velev [EMAIL PROTECTED] wrote: Minimal example below - it gives me different output if I comment / uncomment the extra time.mktime call - note that this call is not related in any way to main logic flow. When problematicStamp = ... is commented I get gmtStamp:

Re: python's setuptools (eggs) vs ruby's gems survey/discussion

2008-06-01 Thread Paul Boddie
On 1 Jun, 10:47, Alia Khouri [EMAIL PROTECTED] wrote: Can we open up the discussion here about how to improve setuptools which has become the de facto standard for distributing / installing python software. I've been playing around with ruby's gems which seems to be more more mature and

EuroPython 2008: Talk Submissions Extension plus Early Registration Reminder

2008-05-28 Thread Paul Boddie
First of all, a reminder to those of you considering registering for EuroPython 2008, held in Vilnius, Lithuania from 7th to 12th July (talks from 7th to 9th, sprints from 10th to 12th): the early registration deadline is on Saturday 31st May, and if you would like to take advantage of the

Re: Database Query Contains Old Data

2008-05-23 Thread Paul Boddie
On 23 Mai, 17:18, John Nagle [EMAIL PROTECTED] wrote: Exactly. Although it seems counterintutive, it's not enough to do a COMMIT after UPDATE and INSERT operations. You also have to do a COMMIT after a SELECT if you're going to reuse the database handle and do another SELECT.

Re: Minimal Python installation?

2008-05-21 Thread Paul Boddie
On 21 Mai, 12:07, Thomas Troeger [EMAIL PROTECTED] wrote: I'd like to put the python library and interpreter on a small embedded Linux x86 compatible device where disk space is an issue. I played around with the minimal Python interpreters, but was not entirely happy with them, so my question

Re: Database Query Contains Old Data

2008-05-21 Thread Paul Boddie
On 21 Mai, 15:22, [EMAIL PROTECTED] wrote: I did and I confirmed this by modifying the data, selecting it from the mysql command line client to verify the changes, then running the report again. If I exit the application and then start it again, everything works as expected until the second

Re: self.var hmm?

2008-05-20 Thread Paul Boddie
On 20 Mai, 22:58, [EMAIL PROTECTED] wrote: class TaskGroup: def __init__(self): self.group = [] def addTask(self, task): self.group.append(task) is this wrong? i have a program thats too big to post but should i just do group.append in addTask? No, you have to do

EuroPython 2008: Registration is Open

2008-05-18 Thread Paul Boddie
At last, registration for EuroPython 2008 (the European conference for the communities around Python) is now open! Take a look at the registration page on the EuroPython Web site for full details: http://www.europython.org/Registration The usual generous discount on fees is offered for

Re: Cannot install Pypvm (Python Parallel Virtual Machine)

2008-05-09 Thread Paul Boddie
On 9 Mai, 17:22, [EMAIL PROTECTED] wrote: Thanks for the reply. I've found and installed the package containing pvm3.h. (The file is now located under share/pvm3/include/pvm3.h.) But Pypvm can't find it. There is a pvm-dev package in Ubuntu, but it looks like Fedora employs a different

Re: Python MIDI in 2008

2008-05-07 Thread Paul Boddie
On 6 Mai, 11:43, Max M [EMAIL PROTECTED] wrote: [Python Midi] It does not have real time support even though I did write it with that support in mind. I just never got around to write it as I did not need it myself. I also developed it on Windows and I found it to be a bore to get real

Re: License selection for free software

2008-05-07 Thread Paul Boddie
On 6 Mai, 19:22, [EMAIL PROTECTED] (Ville M. Vainio) wrote: Excuse the long post. Excuse the cherry-picking from your long post. ;-) [...] Also, you can do what Paul Boddie did - fork the project, or maintain patches that are under LGPL. With a liberal license, you have that privilege

Re: License selection for free software

2008-05-07 Thread Paul Boddie
On 7 Mai, 19:48, [EMAIL PROTECTED] (Ville M. Vainio) wrote: Paul Boddie [EMAIL PROTECTED] writes: original licence as well. Now, I did leave a fair amount of information about the heritage of the code, so that anyone who is scared of the LGPL could just go and get the original work

Re: License selection for free software

2008-05-07 Thread Paul Boddie
On 7 Mai, 19:57, Carl Banks [EMAIL PROTECTED] wrote: That IBM and other companies are involved with Linux is an example of companies that are willing to get involved with GPL; it says nothing about whether those companies would be more, less, or un- willing to also get involved with more

Re: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching

2008-05-05 Thread Paul Boddie
On 5 Mai, 20:26, [EMAIL PROTECTED] (Ville M. Vainio) wrote: Basically, avoiding GPL maximizes the brainshare that a small-ish tool is going to attract, and many (including myself, FWIW) view GPL as a big turn-off when I consider spending some time to familiarize myself with a tool, or

Re: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching

2008-05-05 Thread Paul Boddie
On 5 Mai, 23:57, [EMAIL PROTECTED] (Ville M. Vainio) wrote: Paul Boddie [EMAIL PROTECTED] writes: Anyway, I'm just confirming that I'm clearly not one of the many described above. A lot of my own work is licensed under the GPL or I guess it's safe to assume that you are not opposed to using

Re: Problem building python in virtual machine running centos

2008-04-25 Thread Paul Boddie
On 25 Apr, 03:05, Alexandre Gillet [EMAIL PROTECTED] wrote: I am trying to build python-2.4.5 on Centos 5.1, which is a virtual machine running with xen. I am not able to build python. The compilation crash with the following: gcc -pthread -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I.

Re: Problem building python in virtual machine running centos

2008-04-25 Thread Paul Boddie
On 25 Apr, 14:16, Paul Melis [EMAIL PROTECTED] wrote: The bug is not reproducible, so it is likely a hardware or OS problem. This line is printed by GCC itself, not the OP It's a strange thing for anyone to claim in an error message, though, especially if it is reproducible. Perhaps some

Re: Where to get BeautifulSoup--www.crummy.com appears to be down.

2008-04-24 Thread Paul Boddie
On 24 Apr, 16:33, Mike Driscoll [EMAIL PROTECTED] wrote: This is a legitimate issue and one I don't know how to solve. It would be nice to have some kind of verification process, but I'm unaware of anything affordable. If you have any ideas, feel free to express them. It'd be interesting

Re: Python Success stories

2008-04-23 Thread Paul Boddie
On 23 Apr, 11:12, Mark Wooding [EMAIL PROTECTED] wrote: Gabriel Genellina [EMAIL PROTECTED] wrote: Because Python doesn't follow the boxed variables model. Be careful here. `Boxed types' or `boxed objects' is a technical term essentially meaning `heap-allocated objects, probably with

Re: subprocess module is sorely deficient?

2008-04-23 Thread Paul Boddie
On 23 Apr, 13:17, Harishankar [EMAIL PROTECTED] wrote: On Wednesday 23 Apr 2008 15:11:21 Ben Kaplan wrote: I don't know about all Linux distros, but my Ubuntu machine (8.04 Beta), has the 'TERM' (xterm) and 'COLORTERM' (gnome-terminal) keys in os.environ. You might be able to use that to

Re: subprocess module is sorely deficient?

2008-04-22 Thread Paul Boddie
On 22 Apr, 12:52, Harishankar [EMAIL PROTECTED] wrote: Is there any way to use non-blocking Popen objects using subprocess? and 2 - is there a way to kill the subprocess in a platform independent manner in a purely Pythonic way? I thought initially that this problem is simple enough, but over

Re: Witty retorts (was: Python Success stories)

2008-04-22 Thread Paul Boddie
On 22 Apr, 16:02, Ben Finney [EMAIL PROTECTED] wrote: What lesson is it intended to teach, other than that Fuck you is somehow a retort? I can't see that improving too many situations. It isn't supposed to teach anything: it's a joke! It'd be more relevant (yet somewhat surreal if detached

<    1   2   3   4   5   6   7   8   9   10   >