Re: unable to print Unicode characters in Python 3

2009-01-28 Thread John Machin
On 28/01/2009 6:32 PM, Martin v. Löwis wrote: Next step? You need to use the Visual Studio debugger to find out where precisely the IOError comes from. Big step. I don't have Visual Studio and have never used it before. Which version of VS do I need to debug which released version of Python

Re: Python-list Digest, Vol 64, Issue 617

2009-01-28 Thread Ferdinand Sousa
> > Secondly, it has no way to display the image drawn on. Is it possible, or >>> do >>> I have to pass the image off to another module's methods? >> >> im.show() this will display the image (and any modification(s) made to it) > >> Example: Draw a Grey Cross Over an Image >> import Image, ImageDr

Re: Receiving data from USB

2009-01-28 Thread Diez B. Roggisch
barithegr...@gmail.com schrieb: Hi Can any body tell me how can i receive data from usb(usrp) in python. http://letmegooglethatforyou.com/?q=python+usb Diez -- http://mail.python.org/mailman/listinfo/python-list

need help

2009-01-28 Thread juvy j
Hi guys, need help on how to read file from other server(linux). thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Re: Best/better way? (histogram)

2009-01-28 Thread Peter Otten
Bernard Rankin wrote: > I've got several versions of code to here to generate a histogram-esque > structure from rows in a CSV file. > > The basic approach is to use a Dict as a bucket collection to count > instances of data items. > > Other than the try/except(KeyError) idiom for dealing with n

Re: errno 22 instead of errno 2

2009-01-28 Thread Tim Golden
Glenn Linderman wrote: open("c:\abc","rb") This simple one-line script, produces errno 22 on Python 2.6, but errno 2 on Python 2.5.2 Is this an unintentional regression? Or is this an intentional bug fix? The file doesn't exist (errno 2) but I guess on Windows it is also somewhat an invali

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-28 Thread Aaron Brady
On Jan 27, 3:16 pm, Reckoner wrote: > I'm not sure this is possible, but I would like to have > a list of  objects > > A=[a,b,c,d,...,z] > > where,  in the midst of a lot of processing I might do something like, > > A[0].do_something_which_changes_the_properties() > > which alter the properties of

ORM recommendation when using "live"/predefined DB?

2009-01-28 Thread Phillip B Oldham
We're trying to move to Python for a few parts of our application. We have a live database, which has been modeled for a specific use, and has other code connecting to and working with it. We'd like to reduce the amount of work we have to do in terms of keeping our python code up-to-date with sche

Re: How many followers of comp.lang.python

2009-01-28 Thread Bruno Desthuilliers
Grant Edwards a écrit : On 2009-01-27, Bruno Desthuilliers wrote: Please visit comp.databases or comp.lang.javascript for really unfriendly and unhelpful places where few happens except "bickering and name-calling". I've always found comp.lang.c to be a rather dangerous place as well. Rea

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-28 Thread John O'Hagan
On Tue, 27 Jan 2009, Reckoner wrote: > I'm not sure this is possible, but I would like to have > a list of objects > > A=[a,b,c,d,...,z] > > where, in the midst of a lot of processing I might do something like, > > A[0].do_something_which_changes_the_properties() > > which alter the properties of

Re: How many followers of comp.lang.python

2009-01-28 Thread Bruno Desthuilliers
rantingrick a écrit : On Jan 27, 10:12 am, Bruno Desthuilliers wrote: All you can say is that he didn't *post* here (at least under his real identity...) for the 9 past years - this doesn't mean he never *reads* (and this, you just have no way to know). Ah, this is a good point. You have to

Re: How to execute a hyperlink?

2009-01-28 Thread Roel Schroeven
Muddy Coder schreef: > Hi Folks, > > Module os provides a means of running shell commands, such as: > > import os > os.system('dir .') > > will execute command dir > > I think a hyperlink should also be executed. I tried: > > os.system('http://somedomain.com/foo.cgi?name=foo&passwd=bar') > >

Re: unable to print Unicode characters in Python 3

2009-01-28 Thread Thorsten Kampe
* John Machin (Tue, 27 Jan 2009 18:03:55 -0800 (PST)) > On Jan 28, 5:56 am, "Martin v. Löwis" wrote: > The only font choice offered apart from "Raster Fonts" in the Command > Prompt window's Properties box is "Lucida Console", not "Lucida Sans > Unicode". It will let me print Cyrillic characters f

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread Bruno Desthuilliers
excord80 a écrit : I need to make a small, relatively low-traffic site that users can create accounts on and log into. Scripts must run as cgi (no mod_python or FastCGI is available). Can anyone recommend a small and simple web framework for Python, maybe similar to Perl's CGI::Application? Wha

Re: Python Application Server

2009-01-28 Thread Bruno Desthuilliers
Adi Eyal a écrit : Hi All Could anyone recommend a python application server? My application consists mainly of long running background processes that need to communicate with each other. Features on my wishlist include, process pooling (each process will in general be stateless), monitoring, sc

Re: ORM recommendation when using "live"/predefined DB?

2009-01-28 Thread Bruno Desthuilliers
Phillip B Oldham a écrit : We're trying to move to Python for a few parts of our application. We have a live database, which has been modeled for a specific use, and has other code connecting to and working with it. We'd like to reduce the amount of work we have to do in terms of keeping our pyt

Re: A Twisted Design Decision

2009-01-28 Thread koranthala
On Jan 27, 9:27 pm, koranthala wrote: > On Jan 27, 6:57 pm, Jean-Paul Calderone wrote: > > > > > On Tue, 27 Jan 2009 05:46:25 -0800 (PST), koranthala > > wrote: > > >Twisted, being twisted in its behavior is causing quite a lot of > > >confusion in design decisions. > > > I'm not sure I agree w

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread Jeroen Ruigrok van der Werven
-On [20090127 22:21], excord80 (excor...@gmail.com) wrote: >I need to make a small, relatively low-traffic site that users can >create accounts on and log into. Scripts must run as cgi (no >mod_python or FastCGI is available). Can anyone recommend a small and >simple web framework for Python, maybe

Re: optparse question

2009-01-28 Thread Thorsten Kampe
* Pat (Tue, 27 Jan 2009 14:04:28 -0500) > >> I had no idea people were going to get so upset that I used a > >> Windows example and go off on a tear. > > > > Nobody is upset, and nobody has "gone off on a tear". The point > > about the "Windows example" is that the docs say in a > > close-to-screa

Re: errno 22 instead of errno 2

2009-01-28 Thread Mark Hammond
On 28/01/2009 6:52 PM, Glenn Linderman wrote: open("c:\abc","rb") This simple one-line script, produces errno 22 on Python 2.6, but errno 2 on Python 2.5.2 Is this an unintentional regression? Or is this an intentional bug fix? The file doesn't exist (errno 2) but I guess on Windows it is also

Re: Python Package Managment

2009-01-28 Thread David Cournapeau
On Wed, Jan 28, 2009 at 3:16 PM, Bernard Rankin wrote: > [extracted from pylons-discuss] > > >> >> I hate to pass the buck, but this is Python's fault for not having >> >> reliable package management built in. There's nothing Pylons can do >> >> about it except switch to another programming langu

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread Brian Blais
On Jan 27, 2009, at 16:19 , excord80 wrote: I need to make a small, relatively low-traffic site that users can create accounts on and log into. Scripts must run as cgi (no mod_python or FastCGI is available). Can anyone recommend a small and simple web framework for Python, maybe similar to Perl

Re: ORM recommendation when using "live"/predefined DB?

2009-01-28 Thread Marco Mariani
Phillip B Oldham wrote: Can you recommend an ORM (or similar) package to look into? SQLAlchemy with reflected tables. You can use straight SQL, generate it dynamically via python expressions, go with the ORM, or everything together (in a bucket :) It really pays due respect to the RDBMS, and

Re: Drawing and Displaying an Image with PIL

2009-01-28 Thread W. eWatson
r wrote: Change this line: draw.line((0,0),(20,140), fill=128) To This: draw.line((0,0, 20,140), fill=128) And you should be good to go. Like you said, if you need to combine 2 tuples you can do: (1,2)+(3,4) Yes, that's true, but the big question is how to "see" the final image? Either one emp

Re: New to python, open source Mac OS X IDE?

2009-01-28 Thread Cameron Laird
In article <33d59aa0-e73b-45f8-bdfe-4c78717c6...@v5g2000prm.googlegroups.com>, joseph.a.mar...@gmail.com wrote: >On Jan 27, 6:47 pm, André wrote: >> On Jan 27, 7:06 pm, "joseph.a.mar...@gmail.com" >> >> wrote: >> > Greetings! I've heard enough raving about Python, I'm going to see for >> > mysel

Re: New to python, open source Mac OS X IDE?

2009-01-28 Thread Patrick Steiger
I would recommend Netbeans with Python plugin, Eric4 and Komodo Edit, with descending order of preference 2009/1/27 joseph.a.mar...@gmail.com > Greetings! I've heard enough raving about Python, I'm going to see for > myself what all the praise is for! > > I'm on a Mac. I use Netbeans for Java, P

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-28 Thread koranthala
On Jan 28, 2:16 am, Reckoner wrote: > I'm not sure this is possible, but I would like to have > a list of  objects > > A=[a,b,c,d,...,z] > > where,  in the midst of a lot of processing I might do something like, > > A[0].do_something_which_changes_the_properties() > > which alter the properties of

bigint to timestamp

2009-01-28 Thread Shah Sultan Alam
Hi Group, I have file with contents retrieved from mysql DB. which has a time field with type defined bigint(20) I want to parse that field into timestamp format(-MM-DD HH:MM:SS GMT) using python code. The value I found for that field is 212099016004150509 Give me sample code that does the conv

Re: Drawing and Displaying an Image with PIL

2009-01-28 Thread Peter Otten
W. eWatson wrote: > r wrote: >> Change this line: >> draw.line((0,0),(20,140), fill=128) >> >> To This: >> draw.line((0,0, 20,140), fill=128) >> >> And you should be good to go. Like you said, if you need to combine 2 >> tuples you can do: >> (1,2)+(3,4) > Yes, that's true, but the big question

Re: Python Application Server

2009-01-28 Thread Cameron Laird
In article , James Mills wrote: >On Wed, Jan 28, 2009 at 2:42 PM, James Mills > wrote: >(...) > >> Might I recommend circuits (1) as a general purpose >> framework that you can build your application on top of. >> >> circuits will allow you to communicate with long-running >> background processes

Re: New to python, open source Mac OS X IDE?

2009-01-28 Thread 7stud
On Jan 27, 6:07 pm, Burukena wrote: > On 1/27/09 8:44 PM, James Stroud wrote: > > > joseph.a.mar...@gmail.com wrote: > >> Greetings! I've heard enough raving about Python, I'm going to see for > >> myself what all the praise is for! > > >> I'm on a Mac. I use Netbeans for Java, PHP, and C if neede

Re: Drawing and Displaying an Image with PIL

2009-01-28 Thread Bill McClain
On 2009-01-28, W. eWatson wrote: > Yes, that's true, but the big question is how to "see" the final image? > Either one employees another module or writes the file into a folder, then > displays it with a paint program? Does im.show() not work? -Bill -- Sattre Press

Re: Addition of multiprocessing ill-advised? (was: Python 3.0.1)

2009-01-28 Thread Jesse Noller
On Tue, Jan 27, 2009 at 11:36 PM, James Mills wrote: > On Wed, Jan 28, 2009 at 1:49 PM, Ben Finney wrote: >> Steve Holden writes: >>> I think that [Python 2.6 was a rushed release]. 2.6 showed it in the >>> inclusion (later recognizable as somewhat ill-advised so late in the >>> day) of multipro

Re: New to python, open source Mac OS X IDE?

2009-01-28 Thread aspersieman
7stud wrote: On Jan 27, 6:07 pm, Burukena wrote: On 1/27/09 8:44 PM, James Stroud wrote: joseph.a.mar...@gmail.com wrote: Greetings! I've heard enough raving about Python, I'm going to see for myself what all the praise is for! I'm on a Mac. I use Netbeans for Java, P

Re: Addition of multiprocessing ill-advised?

2009-01-28 Thread Steve Holden
James Mills wrote: > On Wed, Jan 28, 2009 at 1:49 PM, Ben Finney wrote: >> Steve Holden writes: >>> I think that [Python 2.6 was a rushed release]. 2.6 showed it in the >>> inclusion (later recognizable as somewhat ill-advised so late in the >>> day) of multiprocessing […] > > Steve: It's just a

Re: bigint to timestamp

2009-01-28 Thread Ulrich Eckhardt
Shah Sultan Alam wrote: > I have file with contents retrieved from mysql DB. > which has a time field with type defined bigint(20) > I want to parse that field into timestamp format(-MM-DD HH:MM:SS > GMT) using python code. Try time.strftime. > The value I found for that field is 212099016004

Re: need help

2009-01-28 Thread Steve Holden
juvy j wrote: > Hi guys, > > need help on how to read file from other server(linux). > Which service do you plan to use: FTP, HTTP and NFS are three possibilities that immediately come to mind, all well handled by {ython standard library modules. A little more background might help. regards S

Re: Addition of multiprocessing ill-advised? (was: Python 3.0.1)

2009-01-28 Thread Jesse Noller
On Tue, Jan 27, 2009 at 10:49 PM, Ben Finney wrote: > (Continuing a side topic of a different discussion) > > Steve Holden writes: > >> I think that [Python 2.6 was a rushed release]. 2.6 showed it in the >> inclusion (later recognizable as somewhat ill-advised so late in the >> day) of multiproc

Re: Addition of multiprocessing ill-advised?

2009-01-28 Thread Jesse Noller
On Wed, Jan 28, 2009 at 8:32 AM, Steve Holden wrote: ...snip... >> I have found no problems with it - I've recently integrated it with my >> event/component framework (1). In my library I use Process, Pipe >> and Value. >> > It will be a great library in time, but the code was immature and > insuf

Re: bigint to timestamp

2009-01-28 Thread Steve Holden
Shah Sultan Alam wrote: > Hi Group, > I have file with contents retrieved from mysql DB. > which has a time field with type defined bigint(20) > I want to parse that field into timestamp format(-MM-DD HH:MM:SS > GMT) using python code. > The value I found for that field is 212099016004150509 >

Re: need help

2009-01-28 Thread Tim Chase
need help on how to read file from other server(linux). Which service do you plan to use: FTP, HTTP and NFS are three possibilities that immediately come to mind, Or scp, or sftp, or rsync, or SMB, or AFS, or IMAP, or POP3, or instant-message, or VCS sync (svn/hg/git/bzr/cvs/darcs/whatever)

Re: Python Application Server

2009-01-28 Thread Adi Eyal
Hi All Thanks for the responses - I'll look into Circuits and Twisted, the both seem to be relevant. Adi -- http://mail.python.org/mailman/listinfo/python-list

Re: Addition of multiprocessing ill-advised?

2009-01-28 Thread Steve Holden
Jesse Noller wrote: [...] > So yes, I see Steve's point - multiprocessing *was* disruptive, and it > inclusion late in the game siphoned off resources that could have been > used elsewhere. Again, I'll take the responsibility for soiling the > pool this way. I do however think, that python 2.6 is o

Re: Best/better way? (histogram)

2009-01-28 Thread Bernard Rankin
> > The simplest. That would be #3, cleaned up a bit: > > from collections import defaultdict > from csv import DictReader > from pprint import pprint > from operator import itemgetter > > def rows(filename): > infile = open(filename, "rb") > for row in DictReader(infile): > yi

Re: bigint to timestamp

2009-01-28 Thread Jon Clements
On Jan 28, 1:50 pm, Steve Holden wrote: > Shah Sultan Alam wrote: > > Hi Group, > > I have file with contents retrieved from mysql DB. > > which has a time field with type defined bigint(20) > > I want to parse that field into timestamp format(-MM-DD HH:MM:SS > > GMT) using python code. > > Th

Re: A Twisted Design Decision

2009-01-28 Thread Jean-Paul Calderone
On Wed, 28 Jan 2009 02:02:57 -0800 (PST), koranthala wrote: On Jan 27, 9:27 pm, koranthala wrote: On Jan 27, 6:57 pm, Jean-Paul Calderone wrote: [snip] Thank you Jean-Paul. My code is more complex than what I have mentioned. When I mentioned msg.send, the msg object actually gets the data

Re: Python Application Server

2009-01-28 Thread bobicanprogram
On Jan 27, 11:23 pm, Adi Eyal wrote: > Hi All > > Could anyone recommend a python application server? My application > consists mainly of long running background processes that need to > communicate with each other. Features on my wishlist include, process > pooling (each process will in general b

Re: Calling Python-tk code from C/C++

2009-01-28 Thread bobicanprogram
On Jan 27, 12:29 pm, "Gabriel Genellina" wrote: > En Tue, 27 Jan 2009 07:42:01 -0200, Rajorshi Biswas > escribió: > > > Hello all, This is my first post to this mailing list. Our requirement > > is to invoke a Tkinter python panel from a C++ GUI app where both GUI > > windows would run in 2 separ

how to optimize object creation/reading from file?

2009-01-28 Thread perfreem
hi, i am doing a series of very simple string operations on lines i am reading from a large file (~15 million lines). i store the result of these operations in a simple instance of a class, and then put it inside of a hash table. i found that this is unusually slow... for example: class myclass(o

Re: A Twisted Design Decision

2009-01-28 Thread koranthala
On Jan 28, 7:10 pm, Jean-Paul Calderone wrote: > On Wed, 28 Jan 2009 02:02:57 -0800 (PST), koranthala > wrote: > >On Jan 27, 9:27 pm, koranthala wrote: > >> On Jan 27, 6:57 pm, Jean-Paul Calderone wrote: > > [snip] > > >> Thank you Jean-Paul. > >> My code is more complex than what I have menti

Python 3.0, 'Hello' < 42

2009-01-28 Thread towitowi
Hello, In the 3.0 changes list there is mentioned that "<"-compares are not supported anymore if the compared types are different (except numbers). Like 42 < "Hello" did return True of False depending on the implementation but is now a TypeError. But the document also mentions that the result i

RE: How to execute a hyperlink?

2009-01-28 Thread Barak, Ron
Hi Muddy, http://docs.python.org/library/urllib2.html may help. Bye, Ron. -Original Message- From: Muddy Coder [mailto:cosmo_gene...@yahoo.com] Sent: Wednesday, January 28, 2009 03:00 To: python-list@python.org Subject: How to execute a hyperlink? Hi Folks, Module os provides a means o

Re: how to optimize object creation/reading from file?

2009-01-28 Thread Bruno Desthuilliers
perfr...@gmail.com a écrit : hi, i am doing a series of very simple string operations on lines i am reading from a large file (~15 million lines). i store the result of these operations in a simple instance of a class, and then put it inside of a hash table. i found that this is unusually slow..

Re: New to python, open source Mac OS X IDE?

2009-01-28 Thread Cameron Laird
In article , 7stud wrote: . . . >> Vim and a terminal works for me, specifically with screen. > >What does 'with screen' mean? > http://www.gnu.org/software/screen/ > -- http://mail.python.org/mailman/listinfo/python-list

Re: How to execute a hyperlink?

2009-01-28 Thread Jeff McNeil
On Jan 27, 7:59 pm, Muddy Coder wrote: > Hi Folks, > > Module os provides a means of running shell commands, such as: > > import os > os.system('dir .') > > will execute command dir > > I think a hyperlink should also be executed. I tried: > > os.system('http://somedomain.com/foo.cgi?name=foo&pass

file date/time on windows

2009-01-28 Thread m.banaouas
hi, I noticed recently that the value of file date/time I get with python: time.strftime('%Y-%m-%d %H:%M', time.gmtime(os.stat(fullname).st_mtime)) is forwarding by one hour the real file date/time. Example: file A.txt: 2009-01-18 16:13 returned valeur: 2009-01-28 15:13 Is there a simple way t

win32com.client / Trendlines

2009-01-28 Thread mathieu
Hi there, I am trying to use win32com.client, but I do not think I fully grasp the concept. So far I copied chunk of code from the net to write my script. It worked well until I could not find any example on Trendlines. According to doc it should be as simple as: wc.Chart.SeriesCollection(1).Tr

Re: A Twisted Design Decision

2009-01-28 Thread Jean-Paul Calderone
On Wed, 28 Jan 2009 06:30:32 -0800 (PST), koranthala wrote: On Jan 28, 7:10 pm, Jean-Paul Calderone wrote: On Wed, 28 Jan 2009 02:02:57 -0800 (PST), koranthala wrote: >On Jan 27, 9:27 pm, koranthala wrote: >> On Jan 27, 6:57 pm, Jean-Paul Calderone wrote: > [snip] >> Thank you Jean-Paul.

Re: Why doesn't eval of generator expression work with locals?

2009-01-28 Thread Gabriel Genellina
En Wed, 28 Jan 2009 01:36:57 -0200, Steve Holden escribió: Gabriel Genellina wrote: En Tue, 27 Jan 2009 22:17:16 -0200, Robert Kern escribió: I *thought* I did understand this until I came to this example: 1) id(globals()), id(locals()) (11239760, 11239760) # ok, globals and locals are

Re: win32com.client / Trendlines

2009-01-28 Thread mathieu
On Jan 28, 4:21 pm, mathieu wrote: > Hi there, > >   I am trying to use win32com.client, but I do not think I fully grasp > the concept. So far I copied chunk of code from the net to write my > script. It worked well until I could not find any example on > Trendlines. According to doc it should be

Re: New to python, open source Mac OS X IDE?

2009-01-28 Thread Kevin Walzer
joseph.a.mar...@gmail.com wrote: Greetings! I've heard enough raving about Python, I'm going to see for myself what all the praise is for! I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you even use an IDE for Python? Any recommendations on open source Python environments? Tha

Re: file date/time on windows

2009-01-28 Thread MRAB
m.banaouas wrote: hi, I noticed recently that the value of file date/time I get with python: time.strftime('%Y-%m-%d %H:%M', time.gmtime(os.stat(fullname).st_mtime)) is forwarding by one hour the real file date/time. Example: file A.txt: 2009-01-18 16:13 returned valeur: 2009-01-28 15:13 Is t

Re: how to optimize object creation/reading from file?

2009-01-28 Thread perfreem
On Jan 28, 10:06 am, Bruno Desthuilliers wrote: > perfr...@gmail.com a écrit : > > > > > hi, > > > i am doing a series of very simple string operations on lines i am > > reading from a large file (~15 million lines). i store the result of > > these operations in a simple instance of a class, and t

Re: A Twisted Design Decision

2009-01-28 Thread koranthala
On Jan 28, 8:36 pm, Jean-Paul Calderone wrote: > On Wed, 28 Jan 2009 06:30:32 -0800 (PST), koranthala > wrote: > >On Jan 28, 7:10 pm, Jean-Paul Calderone wrote: > >> On Wed, 28 Jan 2009 02:02:57 -0800 (PST), koranthala > >> wrote: > >> >On Jan 27, 9:27 pm, koranthala wrote: > >> >> On Jan 27

Re: How to execute a hyperlink?

2009-01-28 Thread Cameron Laird
In article <8uvfl.45$n_6...@newsfe22.ams2>, Roel Schroeven wrote: >Muddy Coder schreef: >> Hi Folks, >> >> Module os provides a means of running shell commands, such as: >> >> import os >> os.system('dir .') >> >> will execute command dir >> >> I think a hyperlink should also be executed. I t

writing large dictionaries to file using cPickle

2009-01-28 Thread perfreem
hello all, i have a large dictionary which contains about 10 keys, each key has a value which is a list containing about 1 to 5 million (small) dictionaries. for example, mydict = {key1: [{'a': 1, 'b': 2, 'c': 'hello'}, {'d', 3, 'e': 4, 'f': 'world'}, ...], key2: [...]} in total

Re: A Twisted Design Decision

2009-01-28 Thread Chris Mellon
On Wed, Jan 28, 2009 at 10:05 AM, koranthala wrote: > On Jan 28, 8:36 pm, Jean-Paul Calderone wrote: >> On Wed, 28 Jan 2009 06:30:32 -0800 (PST), koranthala >> wrote: >> >On Jan 28, 7:10 pm, Jean-Paul Calderone wrote: >> >> On Wed, 28 Jan 2009 02:02:57 -0800 (PST), koranthala >> >> wrote: >>

Re: writing large dictionaries to file using cPickle

2009-01-28 Thread python
Hi, Change: pickle.dump(mydict, pfile) to: pickle.dump(mydict, pfile, -1 ) I think you will see a big difference in performance and also a much smaller file on disk. BTW: What type of application are you developing that creates so many dictionaries? Sounds interesting. Malcolm -- http://mail

Re: unable to print Unicode characters in Python 3

2009-01-28 Thread jefm
this is alink explaining how to add new fonts to the command line (e.g. Lucida Sans Unicode) http://phatness.com/node/1643 -- http://mail.python.org/mailman/listinfo/python-list

Re: A Twisted Design Decision

2009-01-28 Thread Jean-Paul Calderone
On Wed, 28 Jan 2009 08:05:13 -0800 (PST), koranthala wrote: On Jan 28, 8:36 pm, Jean-Paul Calderone wrote: [snip] Why isn't the return value of protocol.send propagated back to msg.send? It sounds like it should be. Jean-Paul Thank you very much again Jean-Paul for helping me out. I am una

Re: writing large dictionaries to file using cPickle

2009-01-28 Thread perfreem
On Jan 28, 11:32 am, pyt...@bdurham.com wrote: > Hi, > > Change: > > pickle.dump(mydict, pfile) > > to: > > pickle.dump(mydict, pfile, -1 ) > > I think you will see a big difference in performance and also a much > smaller file on disk. > > BTW: What type of application are you developing that crea

Re: How many followers of comp.lang.python

2009-01-28 Thread Grant Edwards
On 2009-01-28, Bruno Desthuilliers wrote: >> very interesting. We should have a vote as to who would be the >> most likely candidate, now that would be a good thread :) > > Waste of time as far as I'm concerned. Usenet? Wasting time? Never! -- Grant Edwards grante

Re: writing large dictionaries to file using cPickle

2009-01-28 Thread Christian Heimes
perfr...@gmail.com schrieb: > but this takes just as long... any ideas ? is there a different module > i could use that's more suitable for large dictionaries ? > thank you very much. Have a look at ZODB. -- http://mail.python.org/mailman/listinfo/python-list

Re: How many followers of comp.lang.python

2009-01-28 Thread Jeremiah Dodds
On Tue, Jan 27, 2009 at 10:07 AM, rantingrick wrote: > I curious of how many are "really" out there. I have been watching the > list for some time but basically see the same 10 or so people > answering questions. > > Reply to this message so we can see how many exists here > > Thanks > -- > http:

Windows PIL installer question

2009-01-28 Thread cjl
Is there any way to run the PIL installer from the command line on Windows in 'silent' mode, without displaying the install screens or requiring user interaction? -- http://mail.python.org/mailman/listinfo/python-list

Re: A Twisted Design Decision

2009-01-28 Thread koranthala
> You can still interact via return values.  You should be thinking about > a Deferred in the same way as you think about a function which returns > a result synchronously.  The Deferred represents the result, even though > it isn't the result itself (since the result doesn't exist yet).  Anything

Re: Process crash with no reason

2009-01-28 Thread gil . shinar
On Jan 27, 5:59 pm, Philip Semanchuk wrote: > On Jan 27, 2009, at 10:34 AM, gil.shi...@gmail.com wrote: > > > > > On Jan 27, 2:10 pm, Tim Golden wrote: > >> gil.shi...@gmail.com wrote: > >>> On Jan 26, 8:40 pm, Philip Semanchuk wrote: > On Jan 26, 2009, at 1:13 PM, gil.shi...@gmail.com wrot

small python-cgi wiki?

2009-01-28 Thread Bernard Rankin
Hello, I'm looking to set up a small private wiki, and am looking for recommendations. Some sort of CGI based package that I could just untar somewhere web accessable via Apache would be great. Any ideas? Thanks, :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Package Managment

2009-01-28 Thread Bernard Rankin
> > [extracted from pylons-discuss] > > > > > >> >> I hate to pass the buck, but this is Python's fault for not having > >> >> reliable package management built in. There's nothing Pylons can do > >> >> about it except switch to another programming language. > >> > [SNIP] > >> > >> Without Setu

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-28 Thread koranthala
On Jan 28, 5:42 pm, koranthala wrote: > On Jan 28, 2:16 am, Reckoner wrote: > > > > > I'm not sure this is possible, but I would like to have > > a list of  objects > > > A=[a,b,c,d,...,z] > > > where,  in the midst of a lot of processing I might do something like, > > > A[0].do_something_which_c

Reuse of DB-API 2.0 cursors for multiple queries?

2009-01-28 Thread moreati
Today, I used the adodbapi module against an SQL Server Express database. I was surprised to get an exception, when I attempted to submit a second query with my cursor object. The full session is below. With cx_Oracle I've become used to reusing a cursor for subsequent queries. The PEP doesn't spe

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-28 Thread Paul McGuire
On Jan 27, 3:16 pm, Reckoner wrote: > The trick is that I would like A to be mysteriously aware that > something about the  object 'a' has changed so that when I revisit A, > I will know that the other items in the list need to be refreshed to > reflect the changes in A as a result of changing 'a'

Re: Process crash with no reason

2009-01-28 Thread Philip Semanchuk
On Jan 28, 2009, at 12:12 PM, gil.shi...@gmail.com wrote: On Jan 27, 5:59 pm, Philip Semanchuk wrote: On Jan 27, 2009, at 10:34 AM, gil.shi...@gmail.com wrote: On Jan 27, 2:10 pm, Tim Golden wrote: Then how are you interacting with Sybase? I'm using python's functions to run sybase sql

Re: unable to print Unicode characters in Python 3

2009-01-28 Thread Martin v. Löwis
> Big step. I don't have Visual Studio and have never used it before. > Which version of VS do I need to debug which released version of Python > 2.X and where do I get that VS from? Or do I need to build Python from > source to be able to debug it? You need Visual Studio 2008 (Professional, not s

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-28 Thread Reckoner
On Jan 28, 9:16 am, koranthala wrote: > On Jan 28, 5:42 pm, koranthala wrote: > > > > > On Jan 28, 2:16 am, Reckoner wrote: > > > > I'm not sure this is possible, but I would like to have > > > a list of objects > > > > A=[a,b,c,d,...,z] > > > > where, in the midst of a lot of processing I mig

Re: New to python, open source Mac OS X IDE?

2009-01-28 Thread Pierre-Alain Dorange
joseph.a.mar...@gmail.com wrote: > Greetings! I've heard enough raving about Python, I'm going to see for > myself what all the praise is for! > > I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you > even use an IDE for Python? > > Any recommendations on open source Python envi

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-28 Thread koranthala
On Jan 28, 10:39 pm, Reckoner wrote: > On Jan 28, 9:16 am, koranthala wrote: > > > > > On Jan 28, 5:42 pm, koranthala wrote: > > > > On Jan 28, 2:16 am, Reckoner wrote: > > > > > I'm not sure this is possible, but I would like to have > > > > a list of  objects > > > > > A=[a,b,c,d,...,z] > > >

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread excord80
On Jan 28, 4:57 am, Bruno Desthuilliers wrote: > > What about:http://thraxil.org/code/cgi_app/ > > (yes, it is a port of CGI::Application, and FWIW it's mentionned on the > CGI::Application's wiki). > Nice find. Thank you. Interesting project. It seems to be only one fairly short file (perhaps t

Re: Why doesn't eval of generator expression work with locals?

2009-01-28 Thread Steve Holden
Gabriel Genellina wrote: > En Wed, 28 Jan 2009 01:36:57 -0200, Steve Holden > escribió: >> Gabriel Genellina wrote: >>> En Tue, 27 Jan 2009 22:17:16 -0200, Robert Kern >>> escribió: > >>> I *thought* I did understand this until I came to this example: >>> >>> 1) >> id(globals()), id(locals()

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread excord80
On Jan 28, 5:05 am, Jeroen Ruigrok van der Werven wrote: > > Werkzeug[1] should be in your line, I think. > > [1]http://werkzeug.pocoo.org/ > Again, the solution must work for plain vanilla CGI. I don't have WSGI available. But thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: small python-cgi wiki?

2009-01-28 Thread excord80
On Jan 28, 12:02 pm, Bernard Rankin wrote: > > I'm looking to set up a small private wiki, and am looking for > recommendations. > > Some sort of CGI based package that I could just untar somewhere web > accessable via Apache would be great. There are a number of them listed at http://wiki.pyt

Re: Why doesn't eval of generator expression work with locals?

2009-01-28 Thread Scott David Daniels
Gabriel Genellina wrote: En Wed, 28 Jan 2009 01:36:57 -0200, Steve Holden escribió: Gabriel Genellina wrote: En Tue, 27 Jan 2009 22:17:16 -0200, Robert Kern escribió: I *thought* I did understand this until I came to this example: 1) id(globals()), id(locals()) (11239760, 11239760) Thi

Re: ctypes with Compaq Visual Fortran 6.6B *.dll (Windows XP), passing of integer and real values

2009-01-28 Thread alex
Jon Thank you for your answer. I tried it with no success. However I tried with tst=cdll.LoadLibrary("f:\\scratch\\test2\\footst.dll") instead of tst=windll.LoadLibrary("f:\\scratch\\test2\\footst.dll") and it runs now with no error message, I can't figure for now why, but it's great! This is mot

Re: Dynamic methods and lambda functions

2009-01-28 Thread coutinhoti...@gmail.com
Hi! I had the same problem myself. Mark's detailed explanation really helped me understand. I ended up doing something like: class A: def __init__(self): names = 'n1', 'n2' for n in names: setattr(self, "get%s" % n, self._createGetter(n)) def _createGetter(se

Re: Python 3.0, 'Hello' < 42

2009-01-28 Thread Martin v. Löwis
> But the document also mentions that the result is not strictly > "undefined" but "reproducable undetermined". What specific document are you looking at, and where specifically does it say that? I can't believe that the quotation marks indicate an actual quote, in particular because "reproducible

Quickbooks

2009-01-28 Thread Stephen Chapman
Has anyone Implemented the Quickbooks COM object in Python. If so can you give me an Idea of where to begin. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread Jeroen Ruigrok van der Werven
-On [20090128 19:01], excord80 (excor...@gmail.com) wrote: >Again, the solution must work for plain vanilla CGI. I don't have WSGI >available. But thank you. It works for plain CGI. I myself use it for FCGI. -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン ht

Re: unable to print Unicode characters in Python 3

2009-01-28 Thread Ross Ridge
John Machin writes: > The only font choice offered apart from "Raster Fonts" in the Command > Prompt window's Properties box is "Lucida Console", not "Lucida Sans > Unicode". It will let me print Cyrillic characters from a C program, > but not Chinese. I'm off looking for how to get a better font.

Re: Python 3.0, 'Hello' < 42

2009-01-28 Thread Scott David Daniels
towit...@gmail.com wrote: Hello, In the 3.0 changes list there is mentioned that "<"-compares are not supported anymore if the compared types are different (except numbers). Like 42 < "Hello" did return True of False depending on the implementation but is now a TypeError. But the document als

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-28 Thread Reckoner
On Jan 27, 9:46 pm, Steven D'Aprano wrote: > On Tue, 27 Jan 2009 13:16:36 -0800, Reckoner wrote: > > I'm not sure this is possible, but I would like to have a list of > > objects > > > A=[a,b,c,d,...,z] > > > where, in the midst of a lot of processing I might do something like, > > > A[0].do_some

  1   2   >