xml-rpc

2010-03-14 Thread ahmet erdinc yilmaz
Hello, Recenetly we are developing a senior project and decide to use xmlrpclib. However I have some questions. In the documentation I could not find any clue about handling requests? Does the server handles each request in a separate thread? Or is there some queuing mechanism for client

Re: Some PyCon videos won't play

2010-03-14 Thread Niels L. Ellegaard
Lee Harr miss...@hotmail.com writes: I am having a great time watching videos from PyCon. Thanks to everyone who presented, and to those who did such a great job putting the videos up at: http://pycon.blip.tv/ My trouble is that, although most of the videos play perfectly, there are a few

Re: how to start a python script only once

2010-03-14 Thread Francesco Bochicchio
On 13 Mar, 19:45, News123 news1...@free.fr wrote: Hi, I'd like to make sure, that a certain python program will only be run once per host. (linux/windows) so if the program is started a second time it should just terminate and let the other one run. This does not have to be the fastest

Re: python to exe

2010-03-14 Thread Mark Lawrence
Gib Bogle wrote: Mark Lawrence wrote: I'm certain that members of the Guinea Pig Club might have something to say on that one, see :- http://en.wikipedia.org/wiki/Guinea_Pig_Club You mean, something like: That's not funny? No, simply a statement. --

Re: python to exe

2010-03-14 Thread Mark Lawrence
Steven D'Aprano wrote: On Sun, 14 Mar 2010 11:20:15 +1300, Gib Bogle wrote: Mark Lawrence wrote: I'm certain that members of the Guinea Pig Club might have something to say on that one, see :- http://en.wikipedia.org/wiki/Guinea_Pig_Club You mean, something like: That's not funny? Or

Re: xml-rpc

2010-03-14 Thread Martin P. Hellwig
On 03/14/10 08:14, ahmet erdinc yilmaz wrote: Hello, Recenetly we are developing a senior project and decide to use xmlrpclib. However I have some questions. In the documentation I could not find any clue about handling requests? Does the server handles each request in a separate thread? Or is

Re: xml-rpc

2010-03-14 Thread hackingKK
Instead of using the library directly, isn't python-twisted a better choice? happy hacking. Krishnakant. On Sunday 14 March 2010 03:47 PM, Martin P. Hellwig wrote: On 03/14/10 08:14, ahmet erdinc yilmaz wrote: Hello, Recenetly we are developing a senior project and decide to use xmlrpclib.

Re: how to start a python script only once

2010-03-14 Thread Daniel Fetchinson
I'd like to make sure, that a certain python program will only be run once per host. (linux/windows) so if the program is started a second time it should just terminate and let the other one run. This does not have to be the fastest solution, but it should be reliable. I have a few

Re: xml-rpc

2010-03-14 Thread Martin P. Hellwig
On 03/14/10 10:32, hackingKK wrote: Instead of using the library directly, isn't python-twisted a better choice? cut Why? -- mph -- http://mail.python.org/mailman/listinfo/python-list

Re: I passed a fizzbuzz test but failed at recursion.

2010-03-14 Thread Michael Rudolf
Am 10.03.2010 16:55, schrieb Bill: def fizzbuzz(num): if num: if num % 15 is 0: return fizzbuzz(num-1) + 'fizzbuzz \n' elif num % 5 is 0: return fizzbuzz(num-1) + 'buzz \n' elif num % 3 is 0: return fizzbuzz(num-1) + 'fizz \n' else : return

Breaking the __main__ script

2010-03-14 Thread vsoler
Hello, I am still learning python, thus developnig small scripts. Some of them consist only of the main module. While testing them (debugging) I sometimes want to stop the script at a certain point, with something likestop, break, end or something similar. What statement can I use?

Re: Breaking the __main__ script

2010-03-14 Thread Mark Lawrence
vsoler wrote: Hello, I am still learning python, thus developnig small scripts. Some of them consist only of the main module. While testing them (debugging) I sometimes want to stop the script at a certain point, with something likestop, break, end or something similar. What statement

Function that knows its argument's variable name

2010-03-14 Thread Helge Stenström
I want to write function that prints a value of a variable, for debugging. Like: with myVariable = parrot otherVariable = dead probe(myVariable) probe(otherVariable) instead of the longer print myVariable = , myVariable print otherVariable = , otherVariable Is that even possible? The

Re: Breaking the __main__ script

2010-03-14 Thread Michael Rudolf
Am 14.03.2010 12:53, schrieb Mark Lawrence: vsoler wrote: I sometimes want to stop the script at a certain point, with something like stop, break, end or something similar. What statement can I use? Something like import sys sys.exit()? Or just raise SystemExit, raise SyntaxError or any

Re: building a dict

2010-03-14 Thread Steve Holden
Andreas Waldenburger wrote: On Sat, 13 Mar 2010 13:42:12 -0800 (PST) vsoler vicente.so...@gmail.com wrote: By the way, I suppose I am the OP. Since I am not an native English speaking person, I do not know what it stands for. Perhaps you can tell me. Perhaps you can find out yourself:

Re: Feeding differeent data types to a class instance?

2010-03-14 Thread Steve Holden
kuru wrote: Hi I have couple classes in the form of class Vector: def __init__(self,x,y,z): self.x=x self.y=y self.z=z This works fine for me. However I want to be able to provide a list, tuple as well as individual arguments like below myvec=Vector(1,2,3) This

Re: Breaking the __main__ script

2010-03-14 Thread Steve Holden
Mark Lawrence wrote: vsoler wrote: Hello, I am still learning python, thus developnig small scripts. Some of them consist only of the main module. While testing them (debugging) I sometimes want to stop the script at a certain point, with something likestop, break, end or something

Re: building a dict

2010-03-14 Thread Andreas Waldenburger
On Sun, 14 Mar 2010 08:36:55 -0400 Steve Holden st...@holdenweb.com wrote: Andreas Waldenburger wrote: On Sat, 13 Mar 2010 13:42:12 -0800 (PST) vsoler vicente.so...@gmail.com wrote: By the way, I suppose I am the OP. Since I am not an native English speaking person, I do not know what

Re: NoSQL Movement?

2010-03-14 Thread D'Arcy J.M. Cain
On Sat, 13 Mar 2010 23:42:31 -0800 Jonathan Gardner jgard...@jonathangardner.net wrote: On Fri, Mar 12, 2010 at 11:23 AM, Paul Rubin no.em...@nospam.invalid wrote: D'Arcy J.M. Cain da...@druid.net writes: Just curious, what database were you using that wouldn't keep up with you?  I use

Re: Breaking the __main__ script

2010-03-14 Thread Joaquin Abian
On 14 mar, 12:34, vsoler vicente.so...@gmail.com wrote: Hello, I am still learning python, thus developnig small scripts. Some of them consist only of the main module. While testing them (debugging) I sometimes want to stop the script at a certain point, with something like    stop, break,

Re: NoSQL Movement?

2010-03-14 Thread Steve Holden
D'Arcy J.M. Cain wrote: On Sat, 13 Mar 2010 23:42:31 -0800 Jonathan Gardner jgard...@jonathangardner.net wrote: On Fri, Mar 12, 2010 at 11:23 AM, Paul Rubin no.em...@nospam.invalid wrote: D'Arcy J.M. Cain da...@druid.net writes: Just curious, what database were you using that wouldn't keep up

Re: how to start a python script only once

2010-03-14 Thread News123
Hi Francesco, Francesco Bochicchio wrote: On 13 Mar, 19:45, News123 news1...@free.fr wrote: Hi, I'd like to make sure, that a certain python program will only be run once per host. (linux/windows) so if the program is started a second time it should just terminate and let the other one

Re: how to start a python script only once

2010-03-14 Thread News123
Hi Daniel, Daniel Fetchinson wrote: I'd like to make sure, that a certain python program will only be run once per host. (linux/windows) so if the program is started a second time it should just terminate and let the other one run. This does not have to be the fastest solution, but it

Re: NoSQL Movement?

2010-03-14 Thread D'Arcy J.M. Cain
On Sun, 14 Mar 2010 10:16:43 -0400 Steve Holden st...@holdenweb.com wrote: A common complaint about large database loads taking a long time comes about because of trying to commit the whole change as a single transaction. Such an approach can indeed causes stresses on the database system, but

Re: Breaking the __main__ script

2010-03-14 Thread python
Michael, Or you could use a real debugger, like pdb http://docs.python.org/library/pdb.html Any reason you prefer PDB over WinPDB? http://winpdb.org/ Thanks, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Some PyCon videos won't play

2010-03-14 Thread David Boddie
On Saturday 13 March 2010 20:01, Terry Reedy wrote: On 3/13/2010 11:23 AM, Lee Harr wrote: I am having a great time watching videos from PyCon. Thanks to everyone who presented, and to those who did such a great job putting the videos up at: http://pycon.blip.tv/ My trouble is that,

Re: iterator/generator

2010-03-14 Thread Steve Holden
vsoler wrote: I am working on a script that reads data from an excel workbook. The data is located in a named range whose first row contains the headers. It works!!! I find it superb that python is able to do such things!!! Now my questions. a. My ranges can in practice be quite big, and

Re: Is it possible to use re2 from Python?

2010-03-14 Thread Kev Dwyer
On Sun, 14 Mar 2010 08:57:36 -0700, _wolf wrote: how can i use re2 from Python? Hello Wolf, There's a recent thread about this on the python-dev list, Unfortunately it seems to suggest that there are no Python bindings at present. Cheers, Kev --

Re: Feeding differeent data types to a class instance?

2010-03-14 Thread kuru
Hi Thank you so much for all these great suggestions. I will have time today to try all these and see which one works best for me cheers -- http://mail.python.org/mailman/listinfo/python-list

What does Error: 'module' object is not callable Mean?

2010-03-14 Thread Cal Who
The below code produces the error as indicated. But, in E:\Python26\Lib\site-packages\ffnet\tools I see: drawffnet.py drawffnet.pyc drawffnet.pyo Is that what it is looking for? I'm not sure what not callable means. Could it be referencing to nn rather than drawffnet? What should I

Re: python to exe

2010-03-14 Thread Jonathan Hartley
On Mar 13, 1:45 pm, pyt...@bdurham.com wrote: Robin, do you of an alternate compilter it doesn't work (py2exe) on my windows 7 box I can assure you that Py2exe does work on Windows 7 (my firm develops commercial Python applications packaged using Py2exe running on Windows 7), but it

problem with variable and function

2010-03-14 Thread Alex Hall
Hi all, I have a file with a dictionary and a function. The dictionary holds the name of the function, and the function references the dictionary. If I put the dictionary first, the function is happy but the dictionary says the function is not defined. If I switch the two and put the function

Re: Breaking the __main__ script

2010-03-14 Thread Tim Chase
pyt...@bdurham.com wrote: Or you could use a real debugger, like pdb http://docs.python.org/library/pdb.html Any reason you prefer PDB over WinPDB? http://winpdb.org/ I always count in the standard library as a big plus over any add-ons It's nice to know about alternatives such as WinPDB,

Re: What does Error: 'module' object is not callable Mean?

2010-03-14 Thread Stephen Hansen
On Sun, Mar 14, 2010 at 10:20 AM, Cal Who calwhonos...@roadrunner.comwrote: from ffnet.tools import drawffnet import pylab drawffnet(nn) #Error: 'module' object is not callable First and foremost, please please please: don't describe or paraphrase tracebacks when asking for help, show

Re: python to exe

2010-03-14 Thread python
Jonathan, I summarised a all the alternatives to py2exe I could find, here: http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdgoutput=html Really great work - thanks for sharing this with all of us!!! Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with variable and function

2010-03-14 Thread Jason Tackaberry
Hi Alex, On Sun, 2010-03-14 at 14:26 -0400, Alex Hall wrote: Reverse it, though: def myFunc(): myOtherVar=myVar myVar={ 1:myFunc } and the function myFunc does not see the dictionary. The code you provided works just fine (as one would expect). If you can provide an example

Re: Some PyCon videos won't play

2010-03-14 Thread Terry Reedy
On 3/14/2010 11:14 AM, David Boddie wrote: On Saturday 13 March 2010 20:01, Terry Reedy wrote: On 3/13/2010 11:23 AM, Lee Harr wrote: I am having a great time watching videos from PyCon. Thanks to everyone who presented, and to those who did such a great job putting the videos up at:

Re: What does Error: 'module' object is not callable Mean?

2010-03-14 Thread Benjamin Kaplan
On Sun, Mar 14, 2010 at 2:20 PM, Cal Who calwhonos...@roadrunner.comwrote: The below code produces the error as indicated. But, in E:\Python26\Lib\site-packages\ffnet\tools I see: drawffnet.py drawffnet.pyc drawffnet.pyo Is that what it is looking for? I'm not sure what not

Re: What does Error: 'module' object is not callable Mean?

2010-03-14 Thread MRAB
Cal Who wrote: The below code produces the error as indicated. But, in E:\Python26\Lib\site-packages\ffnet\tools I see: drawffnet.py drawffnet.pyc drawffnet.pyo Is that what it is looking for? I'm not sure what not callable means. Could it be referencing to nn rather than

Re: What does Error: 'module' object is not callable Mean?

2010-03-14 Thread Terry Reedy
On 3/14/2010 2:20 PM, Cal Who wrote: The below code produces the error as indicated. But, in E:\Python26\Lib\site-packages\ffnet\tools I see: drawffnet.py drawffnet is a module initialized from drawffnet.py (or either of the below) drawffnet.pyc drawffnet.pyo Is that what

Re: problem with variable and function

2010-03-14 Thread Chris Rebert
On Sun, Mar 14, 2010 at 10:26 AM, Alex Hall mehg...@gmail.com wrote: Hi all, I have a file with a dictionary and a function. The dictionary holds the name of the function, and the function references the dictionary. If I put the dictionary first, the function is happy but the dictionary says

Re: What does Error: 'module' object is not callable Mean?

2010-03-14 Thread Cal Who
- Original Message - From: Stephen Hansen To: Cal Who Cc: python-list@python.org Sent: Sunday, March 14, 2010 2:33 PM Subject: Re: What does Error: 'module' object is not callable Mean? On Sun, Mar 14, 2010 at 10:20 AM, Cal Who calwhonos...@roadrunner.com wrote:

Re: problem with variable and function

2010-03-14 Thread Alex Hall
Below is pasted the function which is looking for the funcs dictionary, as well as the dictionary. They appear in my py file in this order, yet I get an error in nextMode() that global name 'funcs' is not defined. Oddly, the keys dictionary works fine; it is defined above the nextMode function.

Re: python to exe

2010-03-14 Thread John Bokma
David Monaghan monaghand.da...@gmail.com writes: of Google. If they haven't used it, I don't really consider the gentle reminder that LMGTFY gives too harsh. If you do, you're too much of a gentle soul to be on the internet at all; someone might say Boo to you at any moment. Beware. I've no

Re: problem with variable and function

2010-03-14 Thread Chris Rebert
On 3/14/10, Chris Rebert c...@rebertia.com wrote: On Sun, Mar 14, 2010 at 10:26 AM, Alex Hall mehg...@gmail.com wrote: Hi all, I have a file with a dictionary and a function. The dictionary holds the name of the function, and the function references the dictionary. If I put the dictionary

Re: problem with variable and function

2010-03-14 Thread Alex Hall
#we now have the default mode to be used, but what if it is disabled? if(sys.modules[modeNames[mode]].enabled=='False'): nextMode() How is this call supposed to work when `funcs` (which nextMode() uses) hasn't been defined yet?! That seems to have done it, thanks. Sorry about top-posting;

Re: how to start a python script only once

2010-03-14 Thread Glazner
On Mar 13, 8:45 pm, News123 news1...@free.fr wrote: Hi, I'd like to make sure, that a certain python program will only be run once per host. (linux/windows) so if the program is started a second time it should just terminate and let the other one run. This does not have to be the fastest

sqlite3 is sqlite 2?

2010-03-14 Thread Laszlo Nagy
gand...@ubuntu:~$ python Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type help, copyright, credits or license for more information. import sqlite3 sqlite3.version '2.4.1' Is it possible to install a real sqlite version 3 somehow? I really need it because I have

Re: Breaking the __main__ script

2010-03-14 Thread Michael Rudolf
Am 14.03.2010 16:03, schrieb pyt...@bdurham.com: Any reason you prefer PDB over WinPDB? http://winpdb.org/ Yes. I don't have Windows except one one PC :P -- http://mail.python.org/mailman/listinfo/python-list

messages

2010-03-14 Thread siva kumar
For Good messages please visit http://messagezonehere.blogspot.com/2010/03/friendly-messages.html -- http://mail.python.org/mailman/listinfo/python-list

Re: python to exe

2010-03-14 Thread David Monaghan
On Sun, 14 Mar 2010 13:10:32 -0600, John Bokma j...@castleamber.com wrote: David Monaghan monaghand.da...@gmail.com writes: of Google. If they haven't used it, I don't really consider the gentle reminder that LMGTFY gives too harsh. If you do, you're too much of a gentle soul to be on the

Re: Breaking the __main__ script

2010-03-14 Thread python
Any reason you prefer PDB over WinPDB? http://winpdb.org/ Yes. I don't have Windows except one one PC :P WinPDB runs on non-Windows platforms :) Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite3 is sqlite 2?

2010-03-14 Thread Ryan Kelly
On Fri, 2010-03-12 at 06:48 +0100, Laszlo Nagy wrote: gand...@ubuntu:~$ python Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type help, copyright, credits or license for more information. import sqlite3 sqlite3.version '2.4.1' Is it possible to install a

Re: python to exe

2010-03-14 Thread John Bokma
David Monaghan monaghand.da...@gmail.com writes: On Sun, 14 Mar 2010 13:10:32 -0600, John Bokma j...@castleamber.com wrote: David Monaghan monaghand.da...@gmail.com writes: of Google. If they haven't used it, I don't really consider the gentle reminder that LMGTFY gives too harsh. If you do,

Re: Breaking the __main__ script

2010-03-14 Thread Joaquin Abian
On 14 mar, 20:35, Michael Rudolf spamfres...@ch3ka.de wrote: Am 14.03.2010 16:03, schrieb pyt...@bdurham.com: Any reason you prefer PDB over WinPDB? http://winpdb.org/ Yes. I don't have Windows except one one PC :P WinPdb is crossplatform. Is build with --

Re: sqlite3 is sqlite 2?

2010-03-14 Thread John Bokma
Laszlo Nagy gand...@shopzeus.com writes: gand...@ubuntu:~$ python Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type help, copyright, credits or license for more information. import sqlite3 sqlite3.version '2.4.1' Is it possible to install a real sqlite

Re: Breaking the __main__ script

2010-03-14 Thread Joaquin Abian
On 14 mar, 20:35, Michael Rudolf spamfres...@ch3ka.de wrote: Am 14.03.2010 16:03, schrieb pyt...@bdurham.com: Any reason you prefer PDB over WinPDB? http://winpdb.org/ Yes. I don't have Windows except one one PC :P Sorry, i hit the wrong key. Again: winpdb is crossplatform. It uses a

Python unicode and Windows cmd.exe

2010-03-14 Thread Guillermo
Hi, I would appreciate if someone could point out what am I doing wrong here. Basically, I need to save a string containing non-ascii characters to a file encoded in utf-8. If I stay in python, everything seems to work fine, but the moment I try to read the file with another Windows program,

sqlite savepoint problem (was: Re: sqlite3 is sqlite 2?)

2010-03-14 Thread Laszlo Nagy
That's the sqlite *bindings* version: sqlite3.version '2.4.1' sqlite3.sqlite_version '3.6.16' Thanks. I tried it and RELEASE command didn't work: import sqlite3 conn = sqlite3.connect(':memory:') with conn: ... conn.execute(BEGIN) ... conn.execute(create table a ( i

Re: Breaking the __main__ script

2010-03-14 Thread Michael Rudolf
Am 14.03.2010 21:08, schrieb pyt...@bdurham.com: Any reason you prefer PDB over WinPDB? http://winpdb.org/ Yes. I don't have Windows except one one PC :P WinPDB runs on non-Windows platforms :) Uh, OK. Then the name mislead me ;) But yeah, I prefer a console based debugger. --

Re: Is it possible to use re2 from Python?

2010-03-14 Thread Vlastimil Brom
2010/3/14 _wolf wolfgang.l...@gmail.com: ... i would like to use re2 from Python (preferrably Python 3.1) and was excited to see files like make_unicode_groups.py in the distro (maybe just used during the build process?). those however were not deployed on my machine. ... If you would need a

Re: Breaking the __main__ script

2010-03-14 Thread Steve Holden
pyt...@bdurham.com wrote: Any reason you prefer PDB over WinPDB? http://winpdb.org/ Yes. I don't have Windows except one one PC :P WinPDB runs on non-Windows platforms :) One might reasonably argue that it has a pretty couter-intuitive name, then. regards Steve -- Steve Holden

Re: What does Error: 'module' object is not callable Mean?

2010-03-14 Thread Cal Who
Thanks for the replies. That fixed it but produced another problem. There are two plotting routines below. Either one will work without error. But the combo produces: The exception unknown software exception (0x4015) occurred in the application at location 0x1e05b62a. in a dialog box and the

Re: sqlite savepoint problem (was: Re: sqlite3 is sqlite 2?)

2010-03-14 Thread Ryan Kelly
On Fri, 2010-03-12 at 07:46 +0100, Laszlo Nagy wrote: import sqlite3 conn = sqlite3.connect(':memory:') with conn: ... conn.execute(BEGIN) ... conn.execute(create table a ( i integer)) ... conn.execute(insert into a values (1)) ... conn.execute(savepoint sp1) ...

Re: What does Error: 'module' object is not callable Mean?

2010-03-14 Thread Cal Who
MRAB pyt...@mrabarnett.plus.com wrote in message news:mailman.745.1268592389.23598.python-l...@python.org... Cal Who wrote: The below code produces the error as indicated. But, in E:\Python26\Lib\site-packages\ffnet\tools I see: drawffnet.py drawffnet.pyc drawffnet.pyo Is

Re: What does Error: 'module' object is not callable Mean?

2010-03-14 Thread Cal Who
Terry Reedy tjre...@udel.edu wrote in message news:mailman.746.1268592481.23598.python-l...@python.org... On 3/14/2010 2:20 PM, Cal Who wrote: The below code produces the error as indicated. But, in E:\Python26\Lib\site-packages\ffnet\tools I see: drawffnet.py drawffnet is a

Re: Python unicode and Windows cmd.exe

2010-03-14 Thread Neil Hodgson
Guillermo: I then open the file m.txt with notepad, and I see mañana normally. I save (again, no actual modifications), go back to the dos prompt, do type m.txt and this time it works! I get mañana. When notepad opens the file, the encoding is already UTF-8, so short of a UTF-8 bom being

Re: What does Error: 'module' object is not callable Mean?

2010-03-14 Thread Chris Rebert
On Sun, Mar 14, 2010 at 12:58 PM, Cal Who calwhonos...@roadrunner.com wrote: snip Second question: Is it common to group all the from statements at the top of the program or to put them by the relavent code as I have here? The former. Cheers, Chris -- http://blog.rebertia.com --

Re: Some PyCon videos won't play

2010-03-14 Thread Terry Reedy
On 3/14/2010 2:41 PM, Terry Reedy wrote: On 3/14/2010 11:14 AM, David Boddie wrote: You should still be able to get at the videos themselves by inspecting the page contents, looking for download links like this one:

Re: python to exe

2010-03-14 Thread CM
On Mar 14, 4:04 pm, David Monaghan monaghand.da...@gmail.com wrote: On Sun, 14 Mar 2010 13:10:32 -0600, John Bokma j...@castleamber.com wrote: David Monaghan monaghand.da...@gmail.com writes: of Google. If they haven't used it, I don't really consider the gentle reminder that LMGTFY gives

Re: Python unicode and Windows cmd.exe

2010-03-14 Thread Guillermo
   That is what happens: the file now starts with a BOM \xEB\xBB\xBF as you can see with a hex editor. Is this an enforced convention under Windows, then? My head's aching after so much pulling at my hair, but I have the feeling that the problem only arises when text travels through the dos

Re: Python unicode and Windows cmd.exe

2010-03-14 Thread Joaquin Abian
On 14 mar, 22:22, Guillermo guillermo.lis...@googlemail.com wrote:    That is what happens: the file now starts with a BOM \xEB\xBB\xBF as you can see with a hex editor. Is this an enforced convention under Windows, then? My head's aching after so much pulling at my hair, but I have the

Re: sqlite savepoint problem

2010-03-14 Thread Laszlo Nagy
From memory you can't issue a CREATE TABLE statement inside a transaction, at least not at the default isolation level. Such a statement will automatically commit the current transaction. Doesn't help with your current problem but worth pointing out :-) Thank you. I'll keep in mind. When

Re: Python unicode and Windows cmd.exe

2010-03-14 Thread Terry Reedy
On 3/14/2010 4:40 PM, Guillermo wrote: Hi, I would appreciate if someone could point out what am I doing wrong here. Basically, I need to save a string containing non-ascii characters to a file encoded in utf-8. If I stay in python, everything seems to work fine, but the moment I try to read

Re: Python unicode and Windows cmd.exe

2010-03-14 Thread Neil Hodgson
Guillermo: Is this an enforced convention under Windows, then? My head's aching after so much pulling at my hair, but I have the feeling that the problem only arises when text travels through the dos console... The console is commonly using Code Page 437 which is most compatible with old

Re: Is it possible to use re2 from Python?

2010-03-14 Thread _wolf
i am afraid that thread goes straight perpendicular to what re2 is supposed to be, or do. my suggestion for these folks would be to create a new, clean interface to stop the violence that comes with the Python ``re`` interface, and open the thing up so one can plug in ``re`` implementations as

Re: Is it possible to use re2 from Python?

2010-03-14 Thread _wolf
There's a recent thread about this on the python-dev list, pointers? i searched but didn’t find anything. -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite savepoint problem

2010-03-14 Thread Laszlo Nagy
I'm now confused. Also, I could not find anything about these isolation levels on the sqlite website. The only think I could find is PRAGMA read_uncommited. If that is the same as setting isolation_level to None, then I don't want it. Yes, it is. Here is a test: import os import sqlite3

Re: Python unicode and Windows cmd.exe

2010-03-14 Thread Guillermo
   The console is commonly using Code Page 437 which is most compatible with old DOS programs since it can display line drawing characters. You can change the code page to UTF-8 with chcp 65001 That's another issue in my actual script. A twofold problem, actually: 1) For me chcp gives 850

Re: sqlite savepoint problem

2010-03-14 Thread Ryan Kelly
On Fri, 2010-03-12 at 08:48 +0100, Laszlo Nagy wrote: I'm now confused. Also, I could not find anything about these isolation levels on the sqlite website. The only think I could find is PRAGMA read_uncommited. If that is the same as setting isolation_level to None, then I don't want

Re: Python unicode and Windows cmd.exe

2010-03-14 Thread Neil Hodgson
Guillermo: 2) My script gets output from a Popen call (to execute a Powershell script [new Windows shell language] from Python; it does make sense!). I suppose changing the Windows codepage for a single Popen call isn't straightforward/possible? You could try SetConsoleOutputCP and

Re: Python unicode and Windows cmd.exe

2010-03-14 Thread Guillermo
2) My script gets output from a Popen call (to execute a Powershell script [new Windows shell language] from Python; it does make sense!). I suppose changing the Windows codepage for a single Popen call isn't straightforward/possible? Nevermind. I'm able to change Windows' codepage to 65001

Re: What does Error: 'module' object is not callable Mean?

2010-03-14 Thread Cal Who
I cleaned up the code by moving all the imports to the top. There are two plotting routines shown below. Either one will work without error. But when I include both, running produces: The exception unknown software exception (0x4015) occurred in the application at location 0x1e05b62a.

[ANNC] pynguin-0.4 (python turtle graphics application)

2010-03-14 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release

Re: sqlite savepoint problem

2010-03-14 Thread Ryan Kelly
On Fri, 2010-03-12 at 08:32 +0100, Laszlo Nagy wrote: From memory you can't issue a CREATE TABLE statement inside a transaction, at least not at the default isolation level. Such a statement will automatically commit the current transaction. Doesn't help with your current problem but

Re: python to exe

2010-03-14 Thread Steven D'Aprano
On Sun, 14 Mar 2010 14:11:18 -0600, John Bokma wrote: One could argue, sure. But to me it's just the same as posting GFY (don't want to upset the tender soulds again with the F-word. Are you *still* going on about this thing? Sheesh. You've made your point. You don't think posting links to

Re: What does Error: 'module' object is not callable Mean?

2010-03-14 Thread Cal Who
I found it. Had to use figure to create a new figure! Cal Who calwhonos...@roadrunner.com wrote in message news:hnjp6f$l...@news.eternal-september.org... I cleaned up the code by moving all the imports to the top. There are two plotting routines shown below. Either one will work without

Understanding the CPython dict implementation

2010-03-14 Thread Terry Reedy
I found this PyCon2010 presentation to be excellent: The Mighty Dictionary, Branden Craig Rhodes, 30 min. http://pycon.blip.tv/file/3264041/ Even knowing Python for over a decade, I learned a few things. Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python unicode and Windows cmd.exe

2010-03-14 Thread Mark Tolonen
Terry Reedy tjre...@udel.edu wrote in message news:hnjkuo$n1...@dough.gmane.org... On 3/14/2010 4:40 PM, Guillermo wrote: Adding the byte that some call a 'utf-8 bom' makes the file an invalid utf-8 file. Not true. From http://unicode.org/faq/utf_bom.html: Q: When a BOM is used, is it

Re: Python unicode and Windows cmd.exe

2010-03-14 Thread Alf P. Steinbach
* Mark Tolonen: Terry Reedy tjre...@udel.edu wrote in message news:hnjkuo$n1...@dough.gmane.org... On 3/14/2010 4:40 PM, Guillermo wrote: Adding the byte that some call a 'utf-8 bom' makes the file an invalid utf-8 file. Not true. From http://unicode.org/faq/utf_bom.html: Q: When a BOM

Re: iterator/generator

2010-03-14 Thread Patrick Maupin
First of all, as Steve Holden mentioned, do look at xlrd. It's awesome. Second, for your (a) question, if you want an iterator, that's quite easy: matriz = iter(matriz) matriz.next() # Discard the first one for i in matriz: This technique works really well, especially if you have sub-loops.

Re: result of os.times() is different with 'time' command Options

2010-03-14 Thread Tim Roberts
hiral hiralsmaill...@gmail.com wrote: ... Output: real0.0m0.010002421s user0.0m0.0s sys 0.0m0.0s Command: $ time ls Output: real0m0.007s user0m0.000s sys 0m0.000s Is this the intended behaviour? What is it that you are wondering about? The formatting difference

dll in project?

2010-03-14 Thread Alex Hall
Hi all, I have a dll I am trying to use, but I get a Windows error 126, the specified module could not be found. Here is the code segment: nvdaController=ctypes.windll.LoadLibrary(nvdaControllerClient32.dll) I have the specified dll file in the same directory as the file trying to use said dll,

Re: Are there in Python some static web site generating tools like webgen, nanoc or webby in Ruby ?

2010-03-14 Thread John Nagle
The HTMLTemplate module is useful for static web page generation. It doesn't do much. It's not a content management system. If you just need to generate a page with some data items filled in, it's fine. If you need more than that, there are bigger packages, but they have more baggage.

Re: Understanding the CPython dict implementation

2010-03-14 Thread John Nagle
Terry Reedy wrote: I found this PyCon2010 presentation to be excellent: The Mighty Dictionary, Branden Craig Rhodes, 30 min. http://pycon.blip.tv/file/3264041/ Even knowing Python for over a decade, I learned a few things. Terry Jan Reedy Is this available as a paper?

File existence check with partial filename

2010-03-14 Thread Sang-Ho Yun
I learned that I can check the existence of a file using os.path.isfile(filename). What if I need to check if there is a file that contains HV in the filename? What should I do? Thank you, Sang-Ho -- http://mail.python.org/mailman/listinfo/python-list

Re: dll in project?

2010-03-14 Thread Alf P. Steinbach
* Alex Hall: Hi all, I have a dll I am trying to use, but I get a Windows error 126, the specified module could not be found. Here is the code segment: nvdaController=ctypes.windll.LoadLibrary(nvdaControllerClient32.dll) I have the specified dll file in the same directory as the file

Re: File existence check with partial filename

2010-03-14 Thread Alf P. Steinbach
* Sang-Ho Yun: I learned that I can check the existence of a file using os.path.isfile(filename). What if I need to check if there is a file that contains HV in the filename? What should I do? code from __future__ import print_function import os for filename in os.listdir( . ):

Re: File existence check with partial filename

2010-03-14 Thread Gary Herron
Alf P. Steinbach wrote: * Sang-Ho Yun: I learned that I can check the existence of a file using os.path.isfile(filename). What if I need to check if there is a file that contains HV in the filename? What should I do? code from __future__ import print_function import os for

Re: NoSQL Movement?

2010-03-14 Thread Jonathan Gardner
On Sun, Mar 14, 2010 at 6:55 AM, D'Arcy J.M. Cain da...@druid.net wrote: On Sat, 13 Mar 2010 23:42:31 -0800 Jonathan Gardner jgard...@jonathangardner.net wrote: On Fri, Mar 12, 2010 at 11:23 AM, Paul Rubin no.em...@nospam.invalid wrote: D'Arcy J.M. Cain da...@druid.net writes: Just curious,

  1   2   >