SIMD powered Python

2007-06-22 Thread Hugo Ferreira
Hi! Is there any ID ongoing about using SIMD [1] instructions, like SSE [2], to speed up Python, especially regarding functional features, like list comprehension, map and reduce, etc.. ? Best regards, Hugo Ferreira -- [1] http://en.wikipedia.org/wiki/SIMD [2] http://en.wikipedia.org/wiki

Re: Typed named groups in regular expression

2007-05-19 Thread Hugo Ferreira
:58 pm, Hugo Ferreira [EMAIL PROTECTED] wrote: Hi! Is it possible to automagically coerce the named groups to python types? e.g.: type(re.match('(?Px\d*)', '123').groupdict()['x']) type 'str' But what I'm looking forward is for the type to be 'int'. Cheers

Typed named groups in regular expression

2007-05-16 Thread Hugo Ferreira
Hi! Is it possible to automagically coerce the named groups to python types? e.g.: type(re.match('(?Px\d*)', '123').groupdict()['x']) type 'str' But what I'm looking forward is for the type to be 'int'. Cheers! Hugo Ferreira -- http://mail.python.org/mailman/listinfo/python-list

Python Dijkstra Shortest Path

2007-05-15 Thread Hugo Ferreira
(maybe map? list comprehension? some python trick?)... Profiling blames the heapq (eheh). On a my CoreDuo T2300, it takes 1.6seconds to find a path of 800 vertexes in an half a million mesh. Greetings! Hugo Ferreira -- http://mail.python.org/mailman/listinfo/python-list

Drawing Text on a Path

2007-05-12 Thread Hugo Ferreira
someone give me an hand here? Thanks in advance! Hugo Ferreira -- http://mail.python.org/mailman/listinfo/python-list

Re: Synchronous shutil.copyfile()

2007-01-31 Thread Hugo Ferreira
, Hugo Ferreira [EMAIL PROTECTED] wrote: Well.. Thx for the answers. The only way I had to make it work was to use a time.sleep(10) after the shutil.copyfile(). Since this is a night-run script, I can waste 10 seconds, but it still knocks me out why it happens... Cheers! Hugo Ferreira On 30 Jan

Synchronous shutil.copyfile()

2007-01-30 Thread Hugo Ferreira
-time, it throws an exception. Is there anyway to force a sync copy of the file (make python wait for the completion)? Thanks in advance! Hugo Ferreira -- http://mail.python.org/mailman/listinfo/python-list

Re: Synchronous shutil.copyfile()

2007-01-30 Thread Hugo Ferreira
Well.. Thx for the answers. The only way I had to make it work was to use a time.sleep(10) after the shutil.copyfile(). Since this is a night-run script, I can waste 10 seconds, but it still knocks me out why it happens... Cheers! Hugo Ferreira On 30 Jan 2007 18:06:15 + (GMT), Matthew

re.sub and empty groups

2007-01-16 Thread Hugo Ferreira
not getting the essence of groups and non-grouping groups. Someone care to explain (and, give the correct solution :)) ? Thanks in advance, Hugo Ferreira -- GPG Fingerprint: B0D7 1249 447D F5BB 22C5 5B9B 078C 2615 504B 7B85 -- http://mail.python.org/mailman/listinfo/python-list

Best memory analyzer?

2006-12-06 Thread Hugo Ferreira
Hi! I'm using the BGL bindings, but I think I'm having a giant memory leak. Thing is, I'm not sure if it is the bound C++ variables that are not being trashed, or if the leak is inside my program. What is the best way to debug this? Thanks! Hugo Ferreira -- GPG Fingerprint: B0D7 1249 447D

Best way for inter-process communication in Python

2006-12-04 Thread Hugo Ferreira
: Python version is 2.4. PostgreSQL version is 8.2RC1, OS version is Windows Server 2003. Thanks in advance, Hugo Ferreira -- GPG Fingerprint: B0D7 1249 447D F5BB 22C5 5B9B 078C 2615 504B 7B85 -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way for inter-process communication in Python

2006-12-04 Thread Hugo Ferreira
the output. Which raises me the following question... How do I signal a python application under windows? (Is it possible to send something like a SIGHUP?) Cheers! On 12/4/06, Hugo Ferreira [EMAIL PROTECTED] wrote: Hi everyone! Here's the current scenario: I have a program in Python that computes

PyParsing and Headaches

2006-11-22 Thread Hugo Ferreira
! Hugo Ferreira BTW, the following is the complete grammar I'm trying to implement with pyparsing: ## L ::= expr | expr L ## expr ::= term | binary_expr ## binary_expr ::= term binary_op term ## binary_op ::= * | OR | AND ## include_bool ::= + | - ## term ::= ([include_bool] [modifier

Re: PyParsing and Headaches

2006-11-22 Thread Hugo Ferreira
of hours, including learning about it's API (minus this little inconvenient) what would have taken me a couple of days with, for example, ANTLR (in fact, I've already put aside ANTLR more than once in the past for a built-from-scratch parser). Cheers, Hugo Ferreira On 11/22/06, Paul McGuire [EMAIL

Rendering Vector Graphics

2006-08-10 Thread Hugo Ferreira
Hi ppl,I need to render high-quality vector graphics with Python. I was thinking of something like 'cairo', though I need to run under win32 and can't find a pycairo package for it. Suggestions?Thanks, Hugo Ferreira-- GPG Fingerprint: B0D7 1249 447D F5BB 22C55B9B 078C 2615 504B 7B85 -- http

Re: Proposal: [... for ... while cond(x)]

2006-08-06 Thread Hugo Ferreira
I actually like the proposal...If the argument to remove map, lambda and filter can be that list comprehension is more readable, then why can't this one also use it?Which reminds me this discussion: http://awkly.org/archive/can-python-take-advantage-of-mapreduce/ Cheers!HugoOn 8/6/06, Slawomir

Re: Type signature

2006-07-24 Thread Hugo Ferreira
Which is expecially true when using IDEs with auto-completion.Using VisualStudio/MonoDevelop and C# I rarely need to look at the documentation because I can quickly see what a method accept and returns. And when I need to pass flags or options, enums are much more neat and encapsulated. With