ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-20 Thread Mark Dufour
Hi all, I have just released version 0.2 of Shed Skin, an experimental (restricted) Python-to-C++ compiler (http://shedskin.googlecode.com). It comes with 7 new example programs (for a total of 40 example programs, at over 12,000 lines) and several important improvements/bug fixes. See

bzr 1.17 released!

2009-07-20 Thread Jonathan Lange
Bazaar continues to blaze a straight and shining path to the 2.0 release and the elevation of the ``2a`` beta format to the full glory of supported and stable. Highlights in this release include greatly reduced memory consumption during commits, faster ``ls``, faster ``annotate``, faster network

ANN: IronPython training in Stockholm 23-24th September

2009-07-20 Thread Fuzzyman
September 23-24th I'll be presenting a two day training session in Stockholm (the training is in English) with addskills. It is aimed at .NET developers looking to use IronPython for application development, scripting, embedding, testing or just as another useful tool. It will be a comprehensive

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread Bob Martin
in 121683 20090719 210126 Terry Reedy tjre...@udel.edu wrote: Roy Smith wrote: In article 1cethsrrw8h6k$.9ty7j7u7zovn@40tude.net, Frank Buss f...@frank-buss.de wrote: there is one free unique implementation on the 3 major platforms Linux, Windows and MacOS X Most people would still

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread Paul Rubin
Steven D'Aprano ste...@remove.this.cybersource.com.au writes: Besides, one can legitimately disagree that 2/3 = 0 is the wrong thing to do. It's the right thing to do if you're doing integer maths. I wonder whether 2/3 = ValueError is preferable. --

Re: Managing non-ascii filenames in python

2009-07-20 Thread Martin v. Löwis
I thought the correct way to do this in python would be to scan the dir files=os.listdir(os.path.dirname( os.path.realpath( __file__ ) )) then print the filenames for filename in files: print filename but as expected teh filename is not correct - so correct it using the file sysytems

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread Frank Buss
Bob Martin wrote: I think the OP means major PC operating systems. Those with a wider knowledge of the computer world would consider IBM's mainframe operating systems to be deserving of the description major. Maybe you are right, if you mean big machines. I know mainframes a bit and there

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread Bob Martin
in 121708 20090720 072858 Frank Buss f...@frank-buss.de wrote: Bob Martin wrote: I think the OP means major PC operating systems. Those with a wider knowledge of the computer world would consider IBM's mainframe operating systems to be deserving of the description major. Maybe you are right

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread Carl Banks
On Jul 19, 10:18 pm, Tim Daneliuk tun...@tundraware.com wrote: Uh Carl ... are you familiar with the concept of mocking humor? You got me, lip hurts bad. :) Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: invoke method on many instances

2009-07-20 Thread Gabriel Genellina
En Sat, 18 Jul 2009 12:31:46 -0300, Alan G Isaac alan.is...@gmail.com escribió: On Fri, 17 Jul 2009 05:19:50 +, Alan G Isaac wrote: def apply2(itr, methodname, *args, **kwargs): f = operator.methodcaller(methodname, *args, **kwargs) for item in itr: f(item) On

Re: Mechanize not recognized by py2exe

2009-07-20 Thread Gabriel Genellina
En Fri, 17 Jul 2009 15:51:11 -0300, Stephen M. Olds smo...@comcast.net escribió: I have a Python script getData.py that uses Mechanize, and runs fine under the interpreter. It was installed using easy_install - and the install seemed to indicate it was completed. The problem is, when I

Re: tough-to-explain Python

2009-07-20 Thread greg
Calroc wrote: It may be that flawless software is an unreachable asymptote, like the speed of light for matter, but I'm (recently!) convinced that it's a goal worthy of exploration and effort. Seems to me that once you get beyond the toy program stage and try to apply correctness proving to

Re: any suggestions to synchronize typed text and speech ?

2009-07-20 Thread Stef Mientki
thanks Marcus, Marcus Wanner wrote: On 7/19/2009 4:15 PM, Stef Mientki wrote: hello, I'm using Scintilla as a wxPython widget with great pleasure. I now have an application where I want to make notes during a conversation, but also want to record the speech during that conversation. I'm

Re: Why aren't OrderedDicts comparable with etc?

2009-07-20 Thread Sion Arrowsmith
Terry Reedy tjre...@udel.edu wrote: Sion Arrowsmith wrote: Jack Diederich jackd...@gmail.com wrote: It isn't an OrderedDict thing, it is a comparison thing. Two regular dicts also raise an error if you try to LT them. Python 2.5.2 d1 = dict((str(i), i) for i in range (10)) d2 =

Mutable Strings - Any libraries that offer this?

2009-07-20 Thread casebash
Hi, I have searched this list and found out that Python doesn't have a mutable string class (it had an inefficient one, but this was removed in 3.0). Are there any libraries outside the core that offer this? Thanks, Chris -- http://mail.python.org/mailman/listinfo/python-list

Pep 342 (val = yield MyGenerator(foo)), synchronous os.system() that doesn't block gui event loops

2009-07-20 Thread Ville Vainio
Has anyone implementing something like what the subject line indicates? The idea: To run functions that execute a series of system commands without blocking the ui, *and* without adding state machine logic. The syntax would be something like: def work(): showstatus(building) r = yield

Re: Pep 342 (val = yield MyGenerator(foo)), synchronous os.system() that doesn't block gui event loops

2009-07-20 Thread Ville M. Vainio
On Jul 20, 1:12 pm, Ville Vainio vivai...@gmail.com wrote: Has anyone implementing something like what the subject line ImplentED. I don't think this is that hard to do in the first place, but a generic solution that can be easily tuned for different gui mainloops would be nice. --

Re: Mutable Strings - Any libraries that offer this?

2009-07-20 Thread Carl Banks
On Jul 20, 2:57 am, casebash walkr...@gmail.com wrote: Hi, I have searched this list and found out that Python doesn't have a mutable string class (it had an inefficient one, but this was removed in 3.0). Are there any libraries outside the core that offer this? I just did a brief search on

Re: Pep 342 (val = yield MyGenerator(foo)), synchronous os.system() that doesn't block gui event loops

2009-07-20 Thread Ville M. Vainio
On Jul 20, 1:12 pm, Ville Vainio vivai...@gmail.com wrote: I imagine runshell() would be implemented in terms of QProcess, or subprocess.Popen/os.system and a worker thread. Actually, the problem is that of general serialization of worker thread operations. That is, it could be something akin

Re: Mutable Strings - Any libraries that offer this?

2009-07-20 Thread Ben Finney
casebash walkr...@gmail.com writes: I have searched this list and found out that Python doesn't have a mutable string class (it had an inefficient one, but this was removed in 3.0). Are there any libraries outside the core that offer this? A mutable string would not (AFAICT) be usefully

Re: On out-of-date Python Applications

2009-07-20 Thread John Machin
On Jul 20, 1:47 am, John Machin sjmac...@lexicon.net wrote: On 20/07/2009 12:24 AM, Virgil Stokes wrote: John Machin wrote: On Jul 19, 6:04 pm, Virgil Stokes v...@it.uu.se wrote: I am not a heavy user of Python; but, I do work with it and some of its application packages (e.g. PyODE), in

Re: Mutable Strings - Any libraries that offer this?

2009-07-20 Thread John Machin
On Jul 20, 9:08 pm, Ben Finney ben+pyt...@benfinney.id.au wrote: casebash walkr...@gmail.com writes: I have searched this list and found out that Python doesn't have a mutable string class (it had an inefficient one, but this was removed in 3.0). Are there any libraries outside the core

Re: On out-of-date Python Applications

2009-07-20 Thread David Robinow
On Mon, Jul 20, 2009 at 7:24 AM, John Machinsjmac...@lexicon.net wrote: ... The next step would be to try to compile ODE 0.7 or 0.8 with VS9 -- however this would require project files for ODE for VS9, and there aren't any on the ODE website; it has only those for VS3 and VS5. The ODE site is

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-20 Thread William Dode
On 19-07-2009, Mark Dufour wrote: Hi all, I have just released version 0.2 of Shed Skin, an experimental (restricted) Python-to-C++ compiler (http://shedskin.googlecode.com). I just tested it with a litle game, to find the places of horse on a board 5x5. The result is : c 5s gcj 7s java 7s

Design question.

2009-07-20 Thread Lacrima
Hello! I am newbie in python and I have really simple question, but I need your advice to know how to do best. I need to store a number of dictionaries in certain place. I've decided to store them in a separate module. Like this: dicts.py --- dict1 = {} dict2 = {}

Re: Design question.

2009-07-20 Thread Diez B. Roggisch
Lacrima wrote: Hello! I am newbie in python and I have really simple question, but I need your advice to know how to do best. I need to store a number of dictionaries in certain place. I've decided to store them in a separate module. Like this: dicts.py --- dict1 =

A lot of problem with pygame.mixer module!

2009-07-20 Thread Alex
hi at all, As email object I 'm not be able to run my program when compiled with py2exe. Everythink works fine until I try to make an exe. After that, it crash and in the log: C:\dist\sponge.exe:97: RuntimeWarning: use mixer: DLL load failed: The specified module could not be found. Traceback

Re: proposal: add setresuid() system call to python

2009-07-20 Thread Neal Becker
Mahmoud Abdelkader wrote: Why don't you write a python extension module? This is a perfect opportunity for that. I think having a module just for one system call is a bit silly. Why not add to os module? -- http://mail.python.org/mailman/listinfo/python-list

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread vippstar
On Jul 20, 9:13 am, Paul Rubin http://phr...@nospam.invalid wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au writes: Besides, one can legitimately disagree that 2/3 = 0 is the wrong thing to do. It's the right thing to do if you're doing integer maths. I wonder whether 2/3 =

Re: Persistent variable in subprocess using multiprocessing?

2009-07-20 Thread mheavner
Piet, The situation is 1a of your listed options, however my issue was solved. I was stopping the subprocesses from consuming more data at each iteration which led to the data being lost since the subprocess worker function would then end - I now keep them alive across iterations. Thanks for

Re: Design question.

2009-07-20 Thread Lacrima
On Jul 20, 3:31 pm, Diez B. Roggisch de...@nospam.web.de wrote: Lacrima wrote: Hello! I am newbie in python and I have really simple question, but I need your advice to know how to do best. I need to store a number of dictionaries in certain place. I've decided to store them in a

Re: Design question.

2009-07-20 Thread Jean-Michel Pichavant
Lacrima wrote: Hello! I am newbie in python and I have really simple question, but I need your advice to know how to do best. I need to store a number of dictionaries in certain place. I've decided to store them in a separate module. Like this: dicts.py --- dict1 = {}

Re: proposal: add setresuid() system call to python

2009-07-20 Thread Diez B. Roggisch
Neal Becker wrote: again with his notorious gmane.comp.python.general group that doesn't work for any decent news-reader. Mahmoud Abdelkader wrote: Why don't you write a python extension module? This is a perfect opportunity for that. I think having a module just for one system

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-20 Thread Stefan Behnel
William Dode wrote: On 19-07-2009, Mark Dufour wrote: I have just released version 0.2 of Shed Skin, an experimental (restricted) Python-to-C++ compiler (http://shedskin.googlecode.com). I just tested it with a litle game, to find the places of horse on a board 5x5. The result is : [...]

Re: Design question.

2009-07-20 Thread Lacrima
On Jul 20, 4:05 pm, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Lacrima wrote: Hello! I am newbie in python and I have really simple question, but I need your advice to know how to do best. I need to store a number of dictionaries in certain place. I've decided to store them in

win32api install problem

2009-07-20 Thread Gerry
I'm running Python 2.6 under XP. I've installed Windows 32 extensions for Python 2.6 version 1.4 (pywin32-214.win32-py2.6.exe). But If I try to import win32api, I get: File C:\python_projects\euler\driveletters.py, line 1, in module import win32api ImportError: DLL load failed: The

Re: win32api install problem

2009-07-20 Thread Tim Golden
Gerry wrote: I'm running Python 2.6 under XP. I've installed Windows 32 extensions for Python 2.6 version 1.4 (pywin32-214.win32-py2.6.exe). But If I try to import win32api, I get: File C:\python_projects\euler\driveletters.py, line 1, in module import win32api ImportError: DLL load

Running a Python Service under the LocalService or NetworkService Account

2009-07-20 Thread mistersexy
I am trying to create a Windows service in Python using pywin32. I do not want this service to run under a user account. I want this service to be able to run as a LocalService, NetworkService and the like. How do I specify this using the win32 library? Thanks, everyone. --

Re: Running a Python Service under the LocalService or NetworkService Account

2009-07-20 Thread Tim Golden
mistersexy wrote: I am trying to create a Windows service in Python using pywin32. I do not want this service to run under a user account. I want this service to be able to run as a LocalService, NetworkService and the like. How do I specify this using the win32 library? Thanks, everyone. When

Re: Why aren't OrderedDicts comparable with etc?

2009-07-20 Thread Steven D'Aprano
On Mon, 20 Jul 2009 09:34:24 +, Sion Arrowsmith wrote: Terry Reedy tjre...@udel.edu wrote: Sion Arrowsmith wrote: Jack Diederich jackd...@gmail.com wrote: It isn't an OrderedDict thing, it is a comparison thing. Two regular dicts also raise an error if you try to LT them. Python 2.5.2

Re: Mutable Strings - Any libraries that offer this?

2009-07-20 Thread Neil Hodgson
casebash: I have searched this list and found out that Python doesn't have a mutable string class (it had an inefficient one, but this was removed in 3.0). Are there any libraries outside the core that offer this? I wrote a gap buffer implementation for Python 2.5 allowing character,

Re: Mutable Strings - Any libraries that offer this?

2009-07-20 Thread Steven D'Aprano
On Mon, 20 Jul 2009 21:08:22 +1000, Ben Finney wrote: casebash walkr...@gmail.com writes: I have searched this list and found out that Python doesn't have a mutable string class (it had an inefficient one, but this was removed in 3.0). Are there any libraries outside the core that offer

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread Grant Edwards
On 2009-07-20, Tim Daneliuk tun...@tundraware.com wrote: In fact, picking a computer language is the most important discussion in Computer Science and eclipses even P=NP? in significance. I sure hope we can keep this thread going for a few months. Please feel free to extend this flame-war

Auto-generate GUI from a database table structure

2009-07-20 Thread Boyd, Craig1
Hello All, I am REALLY new to python and still trying to figure a lot of this stuff out. I am trying to write a couple screens to update three or four database tables on Oracle 10g and I was wondering if there was a way to automatically generate some kind of GUI shell based on the tables that I

Re: proposal: add setresuid() system call to python

2009-07-20 Thread Hrvoje Niksic
Diez B. Roggisch de...@nospam.web.de writes: To emulate the os-module-type calls, it's better to raise exceptions than return negative values: def setresuid(ruid, euid, suid): return _setresuid(__uid_t(ruid), __uid_t(euid), __uid_t(suid)) def setresuid(ruid, euid, suid): res =

Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2009-07-20 Thread tvashtar
Hi, I'm trying to get https requests working through an authenticating proxy with urllib2 in Python 2.5, I'm aware that this isn't supported out of the box, so applied the patch http://bugs.python.org/file9753/http-tunnel-urllib linked from http://bugs.python.org/issue1424152 , my baseline test

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2009-07-20 Thread Nike
On Jul 20, 11:11 pm, tvashtar tvash...@gmail.com wrote: Hi, I'm trying to get https requests working through an authenticating proxy with urllib2 in Python 2.5, I'm aware that this isn't supported out of the box, so applied the patchhttp://bugs.python.org/file9753/http-tunnel-urllib linked

Re: are user defined classes hashable?

2009-07-20 Thread Hyuga
On Jul 19, 11:39 am, Nicolas Dandrimont nicolas.dandrim...@crans.org wrote: * Alan G Isaac alan.is...@gmail.com [2009-07-19 14:46:12 +]: Again, my question is about the class not its instances, but still, checking as you suggest gives the same answer. That's what I get for answering

Re: Running a Python Service under the LocalService or NetworkService Account

2009-07-20 Thread mistersexy
On Jul 20, 3:03 pm, Tim Golden m...@timgolden.me.uk wrote: mistersexy wrote: I am trying to create a Windows service in Python using pywin32. I do not want this service to run under a user account. I want this service to be able to run as a LocalService, NetworkService and the like. How

JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-07-20 Thread Aahz
In article mailman.3416.1248070578.8015.python-announce-l...@python.org, tkouts python-list@python.org wrote: I'm pleased to announce the new version of Porcupine Web Application Server, a Python based framework that provides front-end and back-end technologies for building modern data-centric

Re: On out-of-date Python Applications

2009-07-20 Thread Virgil Stokes
David Robinow wrote: On Mon, Jul 20, 2009 at 7:24 AM, John Machinsjmac...@lexicon.net wrote: ... The next step would be to try to compile ODE 0.7 or 0.8 with VS9 -- however this would require "project files" for ODE for VS9, and there aren't any on the ODE website; it has only

Re: Running a Python Service under the LocalService or NetworkService Account

2009-07-20 Thread Tim Golden
mistersexy wrote: On Jul 20, 3:03 pm, Tim Golden m...@timgolden.me.uk wrote: mistersexy wrote: I am trying to create a Windows service in Python using pywin32. I do not want this service to run under a user account. I want this service to be able to run as a LocalService, NetworkService and

comments? storing a function in an object

2009-07-20 Thread Esmail
Hello all, I am trying to store a function and some associated information in an object so that I can later have series of functions in a list that I can evaluate one at a time. Right now I am only storing the function itself, the number of arguments it expects and its string representation. I

Help understanding the decisions *behind* python?

2009-07-20 Thread Phillip B Oldham
My colleagues and I have been working with python for around 6 months now, and while we love a lot of what python has done for us and what it enables us to do some of the decisions behind such certain data-types and their related methods baffle us slightly (when compared to the decisions made in

Re: Running a Python Service under the LocalService or NetworkService Account

2009-07-20 Thread David Adamo Jr.
On Jul 20, 5:14 pm, Tim Golden m...@timgolden.me.uk wrote: mistersexy wrote: On Jul 20, 3:03 pm, Tim Golden m...@timgolden.me.uk wrote: mistersexy wrote: I am trying to create a Windows service in Python using pywin32. I do not want this service to run under a user account. I want this

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-20 Thread Bearophile
William Dode': I just tested it with a litle game, to find the places of horse on a board 5x5. The result is : c 5s gcj 7s java 7s shedskin 8s python + psyco 18s cython avec malloc *int 18s cython 55s avec [] python python 303s (5m3s) Nice timings, can you please show me the Python,

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Tycho Andersen
On Mon, Jul 20, 2009 at 11:27 AM, Phillip B Oldhamphillip.old...@gmail.com wrote: snip We often find we need to do manipulations like the above without changing the order of the original list, and languages like JS allow this. We can't work out how to do this in python though, other than

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread Paul Rubin
vippstar vipps...@gmail.com writes: I wonder whether 2/3 = ValueError is preferable. Not all software wants this. It shouldn't be part of the language but rather part of your code if you need such a feature. (for instance, to distinguish between 2/3 and divisions with 0 dividend). I don't

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-07-20 Thread D'Arcy J.M. Cain
On 20 Jul 2009 09:00:33 -0700 a...@pythoncraft.com (Aahz) wrote: Out of curiosity, are there any JavaScript toolkits that generate code that degrades gracefully when JavaScript is disabled? I understand what you want but I can't see how a toolkit can do that. How do you program graceful? It

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread Marcus Wanner
On 7/20/2009 2:13 AM, Paul Rubin wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au writes: Besides, one can legitimately disagree that 2/3 = 0 is the wrong thing to do. It's the right thing to do if you're doing integer maths. I wonder whether 2/3 = ValueError is preferable. Not

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Duncan Booth
Phillip B Oldham phillip.old...@gmail.com wrote: This make a lot more sense to us, and follows the convention from other languages. It would also mean chaining methods to manipulate lists would be easier: x = [2,1,3] print x.sort()[0] 3 print x [2,1,3] You already have a way to do what

Re: any suggestions to synchronize typed text and speech ?

2009-07-20 Thread Marcus Wanner
On 7/20/2009 5:34 AM, Stef Mientki wrote: thanks Marcus, Marcus Wanner wrote: On 7/19/2009 4:15 PM, Stef Mientki wrote: hello, I'm using Scintilla as a wxPython widget with great pleasure. I now have an application where I want to make notes during a conversation, but also want to record

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Michiel Overtoom
Phillip wrote: Specifically the differences between lists and tuples have us confused and have caused many discussions in the office. We understand that lists are mutable and tuples are not, but we're a little lost as to why the two were kept separate from the start. They both perform a very

Re: win32api install problem

2009-07-20 Thread MCIPERF
On Jul 20, 9:57 am, Tim Golden m...@timgolden.me.uk wrote: Gerry wrote: I'm running Python 2.6 under XP. I've installed Windows 32 extensions for Python 2.6 version 1.4 (pywin32-214.win32-py2.6.exe). But If I try to import win32api, I get:   File

Re: Design question.

2009-07-20 Thread Marcus Wanner
On 7/20/2009 9:42 AM, Lacrima wrote: On Jul 20, 4:05 pm, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Lacrima wrote: Hello! I am newbie in python and I have really simple question, but I need your advice to know how to do best. I need to store a number of dictionaries in certain place.

Re: comments? storing a function in an object

2009-07-20 Thread Francesco Bochicchio
On Jul 20, 6:22 pm, Esmail ebo...@hotmail.com wrote: Hello all, I am trying to store a function and some associated information in an object so that I can later have series of functions in a list that I can evaluate one at a time. Right now I am only storing the function itself, the number

Re: On out-of-date Python Applications

2009-07-20 Thread David Robinow
On Mon, Jul 20, 2009 at 12:09 PM, Virgil Stokesv...@it.uu.se wrote: David Robinow wrote: On Mon, Jul 20, 2009 at 7:24 AM, John Machinsjmac...@lexicon.net wrote: ... The next step would be to try to compile ODE 0.7 or 0.8 with VS9 -- however this would require project files for ODE for VS9,

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2009-07-20 Thread tvashtar
On Jul 20, 4:42 pm, Nike nike...@gmail.com wrote: hi!  It's looks like a ssl error . Under the following step to help u :   1. takes a simple code to confirm your pupose without ssl protocol.   2. to confirm python version and extended libs work well   3. to confirm ssl work well. goog

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Anthony Tolle
On Jul 20, 12:27 pm, Phillip B Oldham phillip.old...@gmail.com wrote: ... Specifically the differences between lists and tuples have us confused and have caused many discussions in the office. We understand that lists are mutable and tuples are not, but we're a little lost as to why the two

Compilation problem with Python 2.6 and db = 4.7

2009-07-20 Thread kiorky
Is there a way to make the bsddb module compile against db=4.7 for python 2.6 (2.4.6, 2.5.4)? A patch ? A tip ? For the moment, i have a known failure as: gcc -pthread -fno-strict-aliasing -DNDEBUG -I/usr/home/kiorky/minitage/dependencies/readline-5.2/parts/part/include

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-20 Thread skip
William c 5s William gcj 7s William java 7s William shedskin 8s William python + psyco 18s William cython avec malloc *int 18s William cython 55s avec [] python William python 303s (5m3s) I read just enough French to know that avec means with, but I don't

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread vippstar
On Jul 20, 7:50 pm, Paul Rubin http://phr...@nospam.invalid wrote: vippstar vipps...@gmail.com writes: I wonder whether 2/3 = ValueError is preferable. Not all software wants this. It shouldn't be part of the language but rather part of your code if you need such a feature. (for instance,

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-20 Thread Bearophile
Skip Montanaro: I read just enough French to know that avec means with, but I don't understand the difference between avec malloc *int and avec [].  Can you explain please? Maybe it's the time difference between using a Python list from Cython and using a C array allocated with a malloc from

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-20 Thread srepmub
Nice timings, can you please show me the Python, Java and C code versions? I may do more tests. also, which shedskin options did you use? did you use -bw, to disable bounds and wrap-around checking? this can make quite a difference for code that does a lot of indexing. if the code uses random

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Phillip B Oldham
On Jul 20, 6:08 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: The main reason why you need both lists and tuples is that because a tuple of immutable objects is itself immutable you can use it as a dictionary key. Really? That sounds interesting, although I can't think of any real-

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Duncan Booth
Phillip B Oldham phillip.old...@gmail.com wrote: On Jul 20, 6:08 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: The main reason why you need both lists and tuples is that because a tuple of immutable objects is itself immutable you can use it as a dictionary key. Really? That sounds

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Marcus Wanner
On 7/20/2009 3:26 PM, Phillip B Oldham wrote: On Jul 20, 6:08 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: The main reason why you need both lists and tuples is that because a tuple of immutable objects is itself immutable you can use it as a dictionary key. Really? That sounds

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread J. Cliff Dyer
On Mon, 2009-07-20 at 12:26 -0700, Phillip B Oldham wrote: On Jul 20, 6:08 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: The main reason why you need both lists and tuples is that because a tuple of immutable objects is itself immutable you can use it as a dictionary key. Really?

How to import pydoc and then use it?

2009-07-20 Thread mrstevegross
I know how to use pydoc from the command line. However, because of complicated environmental setup, it would be preferable to run it within a python script as a native API call. That is, my python runner looks a bit like this: import pydoc pydoc.generate_html_docs_for(someFile) However, it's

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-20 Thread James Matthews
I like this, I am going to run this as a test. I also want to see the source code on how they compile the dynamic variables. On Mon, Jul 20, 2009 at 10:20 PM, srepmub mark.duf...@gmail.com wrote: Nice timings, can you please show me the Python, Java and C code versions? I may do more tests.

locale doesn' format

2009-07-20 Thread Egon Frerich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I want to format values to the german form eg. 1.034,56 but locale.format() doesn't work for me. Here is a little test program: import decimal, locale print locale.getdefaultlocale() print locale.localeconv() locale.setlocale(locale.LC_ALL,

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Piet van Oostrum
Duncan Booth duncan.bo...@invalid.invalid (DB) wrote: DB Phillip B Oldham phillip.old...@gmail.com wrote: This make a lot more sense to us, and follows the convention from other languages. It would also mean chaining methods to manipulate lists would be easier: x = [2,1,3] print

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Chris Rebert
On Mon, Jul 20, 2009 at 2:23 PM, Piet van Oostrump...@cs.uu.nl wrote: Duncan Booth duncan.bo...@invalid.invalid (DB) wrote: DB Phillip B Oldham phillip.old...@gmail.com wrote: This make a lot more sense to us, and follows the convention from other languages. It would also mean chaining methods

Re: comments? storing a function in an object

2009-07-20 Thread Gabriel Genellina
En Mon, 20 Jul 2009 14:44:16 -0300, Francesco Bochicchio bieff...@gmail.com escribió: On Jul 20, 6:22 pm, Esmail ebo...@hotmail.com wrote: Hello all, I am trying to store a function and some associated information in an object so that I can later have series of functions in a list that I

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Paul Moore
2009/7/20 Chris Rebert c...@rebertia.com: On Mon, Jul 20, 2009 at 2:23 PM, Piet van Oostrump...@cs.uu.nl wrote: x = [2,1,3] print sorted(x)[0] DB 3 What kind of Python produces that? Assuming you're referring to the latter example, it was added in version 2.4 If you meant the former

Re: How to import pydoc and then use it?

2009-07-20 Thread Albert Hopkins
On Mon, 2009-07-20 at 13:38 -0700, mrstevegross wrote: I know how to use pydoc from the command line. However, because of complicated environmental setup, it would be preferable to run it within a python script as a native API call. That is, my python runner looks a bit like this: import

Re: any suggestions to synchronize typed text and speech ?

2009-07-20 Thread Aahz
In article mailman.3419.1248082444.8015.python-l...@python.org, Stef Mientki stef.mien...@gmail.com wrote: I was afraid of that too, so I dropped the question in several places, and the writer of Scintilla himself came with the perfect answer. ...which was?... -- Aahz (a...@pythoncraft.com)

Re: Auto-generate GUI from a database table structure

2009-07-20 Thread Gabriel Genellina
En Mon, 20 Jul 2009 12:09:47 -0300, Boyd, Craig1 craig1.b...@citi.com escribió: I am trying to write a couple screens to update three or four database tables on Oracle 10g and I was wondering if there was a way to automatically generate some kind of GUI shell based on the tables that I

Re: locale doesn' format

2009-07-20 Thread Jerry Hill
On Mon, Jul 20, 2009 at 5:07 PM, Egon Frerichegon.frer...@nord-com.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I want to format values to the german form eg. 1.034,56 but locale.format() doesn't work for me. Here is a little test program: ... k1 =

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread Scott Burson
On Jul 19, 11:31 am, Frank Buss f...@frank-buss.de wrote: I don't know of a free modern and stable Lisp implementation with mulithreading support for Windows, with a licence with which you can use it in closed source commercial programs Have you looked at ECL? http://ecls.sourceforge.net/

Re: Python Essential Reference, 4th Edition - Now Available!

2009-07-20 Thread Jonathan Corbet
On Sun, 19 Jul 2009 11:03:05 -0500 David Beazley d...@dabeaz.com wrote: I'm pleased to announce the release of the Python Essential Reference, 4th edition, now available at a bookstore near you. More than a year in development, this edition covers Python 2.6, Python 3, and a wide variety of

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread Paul Rubin
vippstar vipps...@gmail.com writes: I don't see how to implement such a thing in my code, Write a function: (if ( x y) ValueError (/ x y)) I meant changing the behavior of integer division in python. Wouldn't that mean 3/2 would also evaluate to ValueError? Yes, the idea

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Niels L. Ellegaard
Phillip B Oldham phillip.old...@gmail.com writes: We often find we need to do manipulations like the above without changing the order of the original list, and languages like JS allow this. We can't work out how to do this in python though, other than duplicating the list, sorting, reversing,

Re: Compilation problem with Python 2.6 and db = 4.7

2009-07-20 Thread Martin v. Löwis
Is there a way to make the bsddb module compile against db=4.7 for python 2.6 (2.4.6, 2.5.4)? I don't think so, no. I didn't find something on it. If you don't want to use pybsddb either, for fear of incompatible API, your only choice is to port _bsddb.c to the newer db versions. BSDDB is

Re: If Scheme is so good why MIT drops it?

2009-07-20 Thread vippstar
On Jul 21, 1:22 am, Paul Rubin http://phr...@nospam.invalid wrote: vippstar vipps...@gmail.com writes: I don't see how to implement such a thing in my code, Write a function:   (if ( x y)       ValueError       (/ x y)) I meant changing the behavior of integer division in python.

Re: Compilation problem with Python 2.6 and db = 4.7

2009-07-20 Thread kiorky
Martin v. Löwis a écrit : Is there a way to make the bsddb module compile against db=4.7 for python 2.6 (2.4.6, 2.5.4)? I don't think so, no. I didn't find something on it. If you don't want to use pybsddb either, for fear of incompatible API, your only choice is to port _bsddb.c to

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Christian Heimes
Niels L. Ellegaard wrote: Phillip B Oldham phillip.old...@gmail.com writes: We often find we need to do manipulations like the above without changing the order of the original list, and languages like JS allow this. We can't work out how to do this in python though, other than duplicating

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Hrvoje Niksic
Phillip B Oldham phillip.old...@gmail.com writes: On Jul 20, 6:08 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: The main reason why you need both lists and tuples is that because a tuple of immutable objects is itself immutable you can use it as a dictionary key. Really? That sounds

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Hrvoje Niksic
Chris Rebert c...@rebertia.com writes: x = [2,1,3] print sorted(x)[0] DB 3 What kind of Python produces that? Assuming you're referring to the latter example, it was added in version 2.4 If you meant the former example, I think that's purely pseudo-Python. sorted([2, 1, 3])[0] evaluates

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Piet van Oostrum
Paul Moore p.f.mo...@gmail.com (PM) wrote: PM 2009/7/20 Chris Rebert c...@rebertia.com: On Mon, Jul 20, 2009 at 2:23 PM, Piet van Oostrump...@cs.uu.nl wrote: x = [2,1,3] print sorted(x)[0] DB 3 What kind of Python produces that? Assuming you're referring to the latter example, it was

  1   2   >