SIMD powered Python

2007-06-22 Thread Hugo Ferreira
Hi! Is there any I&D 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/

Re: Typed named groups in regular expression

2007-05-19 Thread Hugo Ferreira
t; wrote: > > On May 16, 6:58 pm, "Hugo Ferreira" <[EMAIL PROTECTED]> wrote: > > > > > Hi! > > > > > Is it possible to "automagically" coerce the named groups to python > > > types? e.g.: > > > > > >>>

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('(?P\d*)', '123').groupdict()['x']) 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
f anyone has any idea to make this faster (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
... Could 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
one) Sometimes... Yes, the database is a %"#$"# MSAccess. This script is running under windows. Any ideas? On 1/31/07, 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().

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

Synchronous shutil.copyfile()

2007-01-30 Thread Hugo Ferreira
but at run-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.sub and empty groups

2007-01-16 Thread Hugo Ferreira
uld be an empty string instead of None). This is because I want to use re.sub() and when the group is None, it blows up with a stack trace... Maybe I'm 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:

Re: Best way for inter-process communication in Python

2006-12-04 Thread Hugo Ferreira
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 pr

Best way for inter-process communication in Python

2006-12-04 Thread Hugo Ferreira
r... Just a few considerations: 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: PyParsing and Headaches

2006-11-22 Thread Hugo Ferreira
me to do in just a couple 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

PyParsing and Headaches

2006-11-22 Thread Hugo Ferreira
7;], {}) # KO. It shouldn't recognize any token since I didn't said the SPACE was allowed between include_bool and literal. Can anyone give me an hand here? Cheers! Hugo Ferreira BTW, the following is the complete grammar I'm trying to implement with pyparsing: ## L ::= expr

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 22C5  5B9B 078C 2615 504

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 N

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 Python