MySQLdb-1.2.3 beta 1 released

2009-02-06 Thread Andy Dustman
After almost two years of not so much going on, I've released MySQLdb-1.2.3 beta 1, the first of a couple of betas before PyCon 2009. Highlights: * Compatible with Python-2.6 (but not yet 3.0) * Fixed some parameter substitution problems * Fixed some build problems on certain platforms *

ANN: GOZERBOT 0.9 RELEASED

2009-02-06 Thread Bart Thate
Finally gozerbot 0.9 has been released. This is a huge step forward to version 1.0 and contains a number of changes: * use json as the format to save data in instead of pickles * let config files also use json, this makes them more readable and human editable * remove popen usage

CrunchyFrog 0.3.3 released

2009-02-06 Thread Andi Albrecht
After a really short period here's a bug fix release for CrunchyFrog. CrunchyFrog 0.3.3 fixes a bunch of minor and some major bugs that slipped into the last release. Download: http://crunchyfrog.googlecode.com/files/crunchyfrog-0.3.3.tar.gz The package archive on Launchpad is already up to

ANN: Webware for Python 1.0.1 released

2009-02-06 Thread Christoph Zwerschke
Webware for Python 1.0.1 has been released. This is the first bugfix release for Webware for Python release 1.0, mainly fixing a problem that could appear when communicating with the threaded application server over a network connection. See the WebKit release notes for details. Webware for

Fastest database solution

2009-02-06 Thread Curt Hash
I'm writing a small application for detecting source code plagiarism that currently relies on a database to store lines of code. The application has two primary functions: adding a new file to the database and comparing a file to those that are already stored in the database. I started out using

Re: urllib2 performance on windows, usb connection

2009-02-06 Thread Duncan Booth
dq d...@gmail.com wrote: This runs great on Ubuntu. I get DL speeds of about 1.5 Mb/s on the SATA HD or on a usb-connected iPod, but if I run the same program on Windows (with a 2 GHz core 2 duo, 7200 rpm sata drive---better hardware specs than the Ubuntu box), it maxes out at about 500

Re: Fastest database solution

2009-02-06 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Curt Hash wrote: I started out using sqlite3, but was not satisfied with the performance results. I then tried using psycopg2 with a local postgresql server, and the performance got even worse. SQLite is in the same process. Communication with

Re: Is c.l.py becoming less friendly?

2009-02-06 Thread Mark Dickinson
On Feb 6, 6:23 am, Hendrik van Rooyen m...@microcorp.co.za wrote: I think this thread has buggered up a perfectly ^^^ Such language. I'm appalled. Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Fastest database solution

2009-02-06 Thread Tino Wildenhain
Hi Curt, Curt Hash wrote: I'm writing a small application for detecting source code plagiarism that currently relies on a database to store lines of code. The application has two primary functions: adding a new file to the database and comparing a file to those that are already stored in the

Question on Strings

2009-02-06 Thread Kalyankumar Ramaseshan
Hi, Excuse me if this is a repeat question! I just wanted to know how are strings represented in python? I need to know in terms of: a) Strings are stored as UTF-16 (LE/BE) or UTF-32 characters? b) They are converted to utf-8 format when it is needed for e.g. when storing the string to disk

Re: Fastest database solution

2009-02-06 Thread Jeroen Ruigrok van der Werven
-On [20090206 09:11], Curt Hash (curt.h...@gmail.com) wrote: I'm writing a small application for detecting source code plagiarism that currently relies on a database to store lines of code. The application has two primary functions: adding a new file to the database and comparing a file to those

Re: i have an query regarding pyodbc

2009-02-06 Thread Rahul
On Feb 6, 3:53 pm, Rahul r.warhe...@gmail.com wrote: On Feb 6, 11:27 am, Rahul r.warhe...@gmail.com wrote: hello all, I have installed pyodbc on my red hat enterprise 4 linux machine but when i go to use that using statement, import pyodbc through python console it gives me error

Changing return of type(obj)

2009-02-06 Thread Ken Elkabany
Hello, I am attempting to fully-simulate an 'int' object with a custom object type. It is part of a library I am creating for python futures and promises. Is there anyway such that type(my_object) can return type 'int'? Or for that matter, any other primitive? I do not care how dirty the solution

Re: Changing return of type(obj)

2009-02-06 Thread Chris Rebert
On Fri, Feb 6, 2009 at 3:03 AM, Ken Elkabany k...@elkabany.com wrote: Hello, I am attempting to fully-simulate an 'int' object with a custom object type. It is part of a library I am creating for python futures and promises. Is there anyway such that type(my_object) can return type 'int'? Or

Re: kinterbasdb + firebird 1.5 with python 2.6 ?

2009-02-06 Thread Uwe Grauer
Laszlo Nagy wrote: Uwe Grauer írta: Laszlo Nagy wrote: Get it from here: http://www.firebirdsql.org/index.php?op=develsub=python Thanks. Unfortunately, this does not support Firebird 1.5 anymore. I can only find Python 2.5 + Firebird 1.5. But not for Python 2.6. I'm going to downgrade.

Re: sorting for recursive folder rename

2009-02-06 Thread Peter Otten
ianaré wrote: On Dec 16 2008, 7:36 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Tue, 16 Dec 2008 18:20:52 -, ianaré ian...@gmail.com wrote: Hello all, I trying to recursivelyrenamefolders and files, and am looking for some ideas on the best way of doing this. The problem

Re: Changing return of type(obj)

2009-02-06 Thread Christian Heimes
Ken Elkabany schrieb: I would simply subclass 'int', but this object needs to be general enough to pretend to be an 'int', 'NoneType', 'str', etc... A long shot: Can I change the base class on an instance by instance basis depending on the need? Well, now I can imagine having a class factory

Re: Question on Strings

2009-02-06 Thread John Machin
On Feb 6, 9:24 pm, Chris Rebert c...@rebertia.com wrote: On Fri, Feb 6, 2009 at 1:49 AM, Kalyankumar Ramaseshan soft_sm...@yahoo.com wrote: Hi, Excuse me if this is a repeat question! I just wanted to know how are strings represented in python? I need to know in terms of: a)

Re: Fastest database solution

2009-02-06 Thread M.-A. Lemburg
On 2009-02-06 09:10, Curt Hash wrote: I'm writing a small application for detecting source code plagiarism that currently relies on a database to store lines of code. The application has two primary functions: adding a new file to the database and comparing a file to those that are already

Re: Python 3.0 slow file IO

2009-02-06 Thread thomasvang...@gmail.com
Thanks a lot for all the responses. I'll move back to Python 2.5 for compatibility with SciPY and some other third party packages. I'll leave the compilation process for some other day, for now I'm a happy user, mayve In the future I would like to contribute to the developmental process.. --

Re: What is difference between ADO and RDO

2009-02-06 Thread OdarR
On 6 fév, 10:56, Agile Consulting agile.scrapp...@gmail.com wrote: Explain ADO and RDO RU a bot ? Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: is python Object oriented??

2009-02-06 Thread agile
On Jan 31, 1:54 am, Christian Heimes li...@cheimes.de wrote: Michael Torrie schrieb: It all depends on implementation, I think even we can make C object oriented with proper implementation. Indeed, any code based on gobject libraries can be object-oriented in design and function. The

Re: Skipping bytes while reading a binary file?

2009-02-06 Thread Krzysztof Retel
On Feb 5, 11:51 pm, Lionel lionel.ke...@gmail.com wrote: On Feb 5, 3:35 pm, Lionel lionel.ke...@gmail.com wrote: On Feb 5, 2:56 pm, Lionel lionel.ke...@gmail.com wrote: On Feb 5, 2:48 pm, MRAB goo...@mrabarnett.plus.com wrote: Lionel wrote:   Hello,   I have data stored in

Re: Scanning a file character by character

2009-02-06 Thread Jorgen Grahn
On Wed, 4 Feb 2009 22:48:13 -0800 (PST), Spacebar265 spacebar...@gmail.com wrote: Hi. Does anyone know how to scan a file character by character and have each character so I can put it into a variable. I am attempting to make a chatbot and need this to read the saved input to look for

Re: Skipping bytes while reading a binary file?

2009-02-06 Thread Slaunger
You might also want to have a look at a numpy memmap viewed as a recarray. from numpy import dtype, memmap, recarray # Define your record in the file, 4bytes for the real value, # and 4 bytes for the imaginary (assuming Little Endian repr) descriptor = dtype([(r, f4), (i, f4)]) # Now typecast a

Re: programming by evolution?

2009-02-06 Thread Pascal Costanza
Xah Lee wrote: Pascal Constanza is a Common Lisp fanatic. It's Costanza, not Constanza. Thank you, Pascal -- ELS'09: http://www.european-lisp-symposium.org/ My website: http://p-cos.net Common Lisp Document Repository: http://cdr.eurolisp.org Closer to MOP ContextL:

WIn32api

2009-02-06 Thread K-Dawg
Hi, I have a python script that I want to run in the system tray and system tray only (windows system). I am looking at the win32gui_taskbar.py demo file but am having trouble making sense of what parts do. I understand what the whole does but I want to actually learn what it is doing so I can

Distributing simple tasks

2009-02-06 Thread Noam Aigerman
Hi, Suppose I have an array of functions which I execute in threads (each thread get a slice of the array, iterates over it and executes each function in it's slice one after the other). Now I want to distribute these tasks between two machines, i.e give each machine half of the slices and let it

ANN: SuPy - Script Sketchup with Python

2009-02-06 Thread greg
SuPy 1.0 SuPy is a plugin for the Sketchup 3D modelling application that lets you script it in Python. http://www.cosc.canterbury.ac.nz/SuPy/ This is a first version and is highly experimental. Let me know if it works for you and whether you have any problems. -- Greg Ewing

Re: updating nntplib

2009-02-06 Thread Gerhard Häring
Travis wrote: Hello all, There are some notable deficiencies in nntlib. Here are two: [...] Be sure to add a bug report/patch to the Python bug tracker. http://bugs.python.org/ Anything else will most likely be overlooked or forgotten. -- Gerhard --

Re: Question on Strings

2009-02-06 Thread Hendrik van Rooyen
John Machin s...@le..n.net wrote: By the way, has anyone come up with a name for the shifting effect observed above on str, and also with repr, range, and the iter* family? If not, I suggest that the language's association with the best of English humour be widened so that it be dubbed the Mad

Re: ANN: SuPy - Script Sketchup with Python

2009-02-06 Thread paul
greg schrieb: SuPy 1.0 SuPy is a plugin for the Sketchup 3D modelling application that lets you script it in Python. Great, will give it a try. http://www.cosc.canterbury.ac.nz/SuPy/ I think you meant to write http://www.cosc.canterbury.ac.nz/~greg/SuPy/ This is a first

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

2009-02-06 Thread greyw...@gmail.com
On Jan 28, 4:37 am, John O'Hagan m...@johnohagan.com wrote: 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,

Re: database wrapper ?

2009-02-06 Thread Christian
On Feb 1, 5:56 pm, Stef Mientki stef.mien...@gmail.com wrote: Is SQLalchemy the best / most popular database wrapper ? Are there any alternatives ? As others have confirmed, SQLAlchemy is far and away the most popular Python ORM. Another one to have a look at though is Dejavu

Re: database wrapper ?

2009-02-06 Thread Christian
On Feb 6, 10:17 am, Christian christ...@dowski.com wrote: One of its distinctives is that ... Not sure how I forgot this, but Dejavu also lets you write your datastore queries in a LINQ-like syntax. Robert Brewer, the author, is giving a talk [1] about it at this year's PyCon in the US.

Re: Using cPickle

2009-02-06 Thread Steve Holden
mmcclaf wrote: Hi there, I have to make a small database using cPickle. I'm having troubles trying to read in the information if it's more than one line. I'm pretty sure it's in the line for line in stuff: Can anyone help me out? Basically the end result is wanting it to look something like

Object explorer for python ?

2009-02-06 Thread Linuxguy123
Is there a (stand alone ?) object explorer for python objects such as the PyQt4 collection ? How else could I find out what is in PyQt4.QtCore, .QtGui and .QtWebKit ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Power Point Slides

2009-02-06 Thread Benjamin Kaplan
On Fri, Feb 6, 2009 at 7:09 AM, Steve Holden st...@holdenweb.com wrote: Tehseen Siddiqui wrote: DISCLAIMER: The information in this email is confidential and may be legally privileged. [... etc.] What information?

RE: Distributing simple tasks

2009-02-06 Thread Noam Aigerman
Hi, The delta between the finishing times of each machine is insignificant compared to the actual runtime, thus I don't feel it's necessary at the moment. Anyway, I want to keep it simple until I understand how to distribute tasks J Thanks! From: Thomas Raef [mailto:tr...@ebasedsecurity.com]

Re: ANN: SuPy - Script Sketchup with Python

2009-02-06 Thread Steve Spicklemire
Hi Greg, Hm... SuPy not found on this sever. ;-( Is there a better URL.. or did I just check too soon? thanks, -steve On Feb 5, 2009, at 11:56 PM, greg wrote: SuPy 1.0 SuPy is a plugin for the Sketchup 3D modelling application that lets you script it in Python.

Re: Tkinter w.pack()?

2009-02-06 Thread W. eWatson
... The use of letmegooglethatforyou (not my video tool, by the way) is to point out that with the right search string you could have answered the question for yourself. Since you didn't appear to know that Google allowed you to search a single site (something I perhaps take for granted) I am

Re: Changing return of type(obj)

2009-02-06 Thread Ken Elkabany
I would simply subclass 'int', but this object needs to be general enough to pretend to be an 'int', 'NoneType', 'str', etc... A long shot: Can I change the base class on an instance by instance basis depending on the need? Well, now I can imagine having a class factory that will spawn for me the

RE: Distributing simple tasks

2009-02-06 Thread Thomas Raef
Hi, Suppose I have an array of functions which I execute in threads (each thread get a slice of the array, iterates over it and executes each function in it's slice one after the other). Now I want to distribute these tasks between two machines, i.e give each machine half of the slices and let

Re: i have an query regarding pyodbc

2009-02-06 Thread Rahul
On Feb 6, 11:27 am, Rahul r.warhe...@gmail.com wrote: hello all, I have installed pyodbc on my red hat enterprise 4 linux machine but when i go to use that using statement, import pyodbc through python console it gives me error as ImportError : dynamic module does not define init

thread-local data

2009-02-06 Thread Emanuele D'Arrigo
Hi everybody, Assuming a snippet such as: threadLocalData = threading.local() threadLocalData.myDictionary = self.myDictionary is it correct to say that threadLocalData.myDictionary is NOT a thread- local -copy- of self.myDictionary but it's actually pointing to the same object? If that's the

Using cPickle

2009-02-06 Thread mmcclaf
Hi there, I have to make a small database using cPickle. I'm having troubles trying to read in the information if it's more than one line. I'm pretty sure it's in the line for line in stuff: Can anyone help me out? Basically the end result is wanting it to look something like what is down below

Re: Python Power Point Slides

2009-02-06 Thread Steve Holden
Tehseen Siddiqui wrote: DISCLAIMER: The information in this email is confidential and may be legally privileged. [... etc.] What information? -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC

Re: ANN: SuPy - Script Sketchup with Python

2009-02-06 Thread Gary Herron
greg wrote: SuPy 1.0 SuPy is a plugin for the Sketchup 3D modelling application that lets you script it in Python. http://www.cosc.canterbury.ac.nz/SuPy/ That URL fails with a 404 - not found. (At least for me at this moment in time.) This is a first version and is highly

Re: WIn32api

2009-02-06 Thread K-Dawg
I have come up with what I need and will try tweaking some things that hopefully will help me learn what some of this stuff does. In the meantime, I am having an issue: class *KeepAlive*(threading.Thread): def *__init__*(*self*): *self*.count = 0

Re: Question on Strings

2009-02-06 Thread MRAB
John Machin wrote: On Feb 6, 9:24 pm, Chris Rebert c...@rebertia.com wrote: On Fri, Feb 6, 2009 at 1:49 AM, Kalyankumar Ramaseshan soft_sm...@yahoo.com wrote: Hi, Excuse me if this is a repeat question! I just wanted to know how are strings represented in python? I need to know in terms

Re: Question on Strings

2009-02-06 Thread Chris Rebert
On Fri, Feb 6, 2009 at 1:49 AM, Kalyankumar Ramaseshan soft_sm...@yahoo.com wrote: Hi, Excuse me if this is a repeat question! I just wanted to know how are strings represented in python? I need to know in terms of: a) Strings are stored as UTF-16 (LE/BE) or UTF-32 characters? IIRC,

Re: Question on Strings

2009-02-06 Thread Tino Wildenhain
Hi, Kalyankumar Ramaseshan wrote: Hi, Excuse me if this is a repeat question! I just wanted to know how are strings represented in python? It depents on if you mean python2.x or python3.x - the model changed. Python 2.x knows str and unicode - the former a sequence of single byte

Re: Object explorer for python ?

2009-02-06 Thread Mike Driscoll
On Feb 6, 9:49 am, Linuxguy123 linuxguy...@gmail.com wrote: Is there a (stand alone ?) object explorer for python objects such as the PyQt4 collection ? How else could I find out what is in PyQt4.QtCore, .QtGui and .QtWebKit ? Thanks I like WingWare for this sort of thing, but you might

Re: Tkinter w.pack()?

2009-02-06 Thread MRAB
W. eWatson wrote: ... The use of letmegooglethatforyou (not my video tool, by the way) is to point out that with the right search string you could have answered the question for yourself. Since you didn't appear to know that Google allowed you to search a single site (something I perhaps

Re: thread-local data

2009-02-06 Thread MRAB
Emanuele D'Arrigo wrote: Hi everybody, Assuming a snippet such as: threadLocalData = threading.local() threadLocalData.myDictionary = self.myDictionary is it correct to say that threadLocalData.myDictionary is NOT a thread- local -copy- of self.myDictionary but it's actually pointing to

Re: Tkinter w.pack()?

2009-02-06 Thread Steve Holden
W. eWatson wrote: ... The use of letmegooglethatforyou (not my video tool, by the way) is to point out that with the right search string you could have answered the question for yourself. Since you didn't appear to know that Google allowed you to search a single site (something I perhaps

Re: Is c.l.py becoming less friendly?

2009-02-06 Thread Richard Levasseur
On Feb 5, 8:02 am, Dan Upton up...@virginia.edu wrote: On Thu, Feb 5, 2009 at 11:00 AM, mk mrk...@gmail.com wrote: (duck) 542 comp.lang.python rtfm 467 comp.lang.python shut+up 263 comp.lang.perl rtfm 45 comp.lang.perl shut+up But over how many messages for each group?  Wouldn't

Re: thread-local data

2009-02-06 Thread Diez B. Roggisch
Emanuele D'Arrigo schrieb: Hi everybody, Assuming a snippet such as: threadLocalData = threading.local() threadLocalData.myDictionary = self.myDictionary is it correct to say that threadLocalData.myDictionary is NOT a thread- local -copy- of self.myDictionary but it's actually pointing to the

Re: thread-local data

2009-02-06 Thread Diez B. Roggisch
Diez B. Roggisch schrieb: Emanuele D'Arrigo schrieb: Hi everybody, Assuming a snippet such as: threadLocalData = threading.local() threadLocalData.myDictionary = self.myDictionary is it correct to say that threadLocalData.myDictionary is NOT a thread- local -copy- of self.myDictionary but

Re: Question on Strings

2009-02-06 Thread Terry Reedy
John Machin wrote: The UTF-n siblings are *external* representations. 2.x: a_unicode_object.decode('UTF-16') - an_str_object 3.x: an_str_object.decode('UTF-16') - a_bytes_object That should be .encode() to bytes, which is the coded form. .decode is bytes = str/unicode --

Re: Changing return of type(obj)

2009-02-06 Thread Terry Reedy
Ken Elkabany wrote: Hello, I am attempting to fully-simulate an 'int' object with a custom object type. It is part of a library I am creating for python futures and promises. Is there anyway such that type(my_object) can return type 'int'? Or for that matter, any other primitive? I do not

Re: i have an query regarding pyodbc

2009-02-06 Thread Diez B. Roggisch
Rahul schrieb: On Feb 6, 3:53 pm, Rahul r.warhe...@gmail.com wrote: On Feb 6, 11:27 am, Rahul r.warhe...@gmail.com wrote: hello all, I have installed pyodbc on my red hat enterprise 4 linux machine but when i go to use that using statement, import pyodbc through python console it gives me

Re: What is difference between ADO and RDO

2009-02-06 Thread Scott David Daniels
OdarR wrote: On 6 fév, 10:56, Agile Consulting agile.scrapp...@gmail.com wrote: Explain ADO and RDO RU a bot ? I expect someone is experimenting with their spam generator. -- http://mail.python.org/mailman/listinfo/python-list

Re: Have you ever thought to know your intelligence level?

2009-02-06 Thread Diez B. Roggisch
His IQ must suck considering all the spelling errorsor is that not also a measure of one's IQ? I'm pretty sure there is a legasthenic nobel prize winner out there... so *if* it were a measure of IQ, it would make the whole affair even more braindead. I'd rather say he is of limited

Re: Distributing simple tasks

2009-02-06 Thread Terry Reedy
Noam Aigerman wrote: Hi, Suppose I have an array of functions which I execute in threads (each thread get a slice of the array, iterates over it and executes each function in it’s slice one after the other). Now I want to distribute these tasks between two machines, i.e give each machine

Returning a variable number of things...

2009-02-06 Thread r0g
Hi There, I have a function that uses *args to accept a variable number of parameters and I would like it to return a variable number of objects. I could return a list but I would like to take advantage of tuple unpacking with the return values e.g. def unpack_struct( a_string, *args ):

Re: updating nntplib

2009-02-06 Thread Terry Reedy
Gerhard Häring wrote: Travis wrote: Hello all, There are some notable deficiencies in nntlib. Here are two: [...] Be sure to add a bug report/patch to the Python bug tracker. http://bugs.python.org/ Anything else will most likely be overlooked or forgotten. It is my impression that

Re: Returning a variable number of things...

2009-02-06 Thread Chris Rebert
On Fri, Feb 6, 2009 at 10:50 AM, r0g aioe@technicalbloke.com wrote: Hi There, I have a function that uses *args to accept a variable number of parameters and I would like it to return a variable number of objects. I could return a list but I would like to take advantage of tuple

Re: Returning a variable number of things...

2009-02-06 Thread Stephen Hansen
On Fri, Feb 6, 2009 at 10:50 AM, r0g aioe@technicalbloke.com wrote: Hi There, I have a function that uses *args to accept a variable number of parameters and I would like it to return a variable number of objects. I could return a list but I would like to take advantage of tuple

Re: Using cPickle

2009-02-06 Thread mmcclaf
On Feb 6, 10:25 am, Steve Holden st...@holdenweb.com wrote: mmcclaf wrote: Hi there, I have to make a small database using cPickle. I'm having troubles trying to read in the information if it's more than one line. I'm pretty sure it's in the line for line in stuff: Can anyone help me

Re: What is difference between ADO and RDO

2009-02-06 Thread OdarR
On 6 fév, 19:36, Scott David Daniels scott.dani...@acm.org wrote: OdarR wrote: On 6 fév, 10:56, Agile Consulting agile.scrapp...@gmail.com wrote: Explain ADO and RDO RU a bot ? I expect someone is experimenting with their spam generator. An agile one :) Olivier --

Parallel port interfacing in python on Vista x64

2009-02-06 Thread SiWi
I have done some googling on this topic, but I haven't found anything thats really working on Vista x64. The most promising result I found was the Inpout32.dll: http://logix4u.net/Legacy_Ports/Parallel_Port/A_tutorial_on_Parallel_port_Interfacing.html But when using some code like that, I can't

Installation directory for extensions on Unix

2009-02-06 Thread Osmo Salomaa
I have written an extension (a.k.a. plugin or add-on, not C-extension) system for my application and I'm going to ship two extensions with it. Each extension is in a directory of its own and that directory contains Python files and various data files, e.g. Glade XML files and PNG icons. Where

Re: ANN: SuPy - Script Sketchup with Python

2009-02-06 Thread member thudfoo
On Fri, Feb 6, 2009 at 8:27 AM, Gary Herron gher...@islandtraining.com wrote: greg wrote: SuPy 1.0 SuPy is a plugin for the Sketchup 3D modelling application that lets you script it in Python. http://www.cosc.canterbury.ac.nz/SuPy/ That URL fails with a 404 - not found. (At

Re: thread-local data

2009-02-06 Thread Emanuele D'Arrigo
Thank you both MRAB and Diez. I think I'll stick to making copies inside a thread-protected section unless I need to speed up things, at which point I might go for the key exception path. Thank you again! Manu -- http://mail.python.org/mailman/listinfo/python-list

Re: Parallel port interfacing in python on Vista x64

2009-02-06 Thread Diez B. Roggisch
SiWi schrieb: I have done some googling on this topic, but I haven't found anything thats really working on Vista x64. The most promising result I found was the Inpout32.dll: http://logix4u.net/Legacy_Ports/Parallel_Port/A_tutorial_on_Parallel_port_Interfacing.html But when using some code like

Re: Fastest database solution

2009-02-06 Thread Curt Hash
On Fri, Feb 6, 2009 at 2:12 AM, Roger Binns rog...@rogerbinns.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Curt Hash wrote: I started out using sqlite3, but was not satisfied with the performance results. I then tried using psycopg2 with a local postgresql server, and the

Re: Parallel port interfacing in python on Vista x64

2009-02-06 Thread SiWi
On Feb 6, 8:55 pm, Diez B. Roggisch de...@nospam.web.de wrote: SiWi schrieb: I have done some googling on this topic, but I haven't found anything thats really working on Vista x64. The most promising result I found was the Inpout32.dll:

Re: Using cPickle

2009-02-06 Thread MRAB
mmcclaf wrote: On Feb 6, 10:25 am, Steve Holden st...@holdenweb.com wrote: mmcclaf wrote: Hi there, I have to make a small database using cPickle. I'm having troubles trying to read in the information if it's more than one line. I'm pretty sure it's in the line for line in stuff: Can anyone

Re: Fastest database solution

2009-02-06 Thread Curt Hash
On Fri, Feb 6, 2009 at 5:19 AM, M.-A. Lemburg m...@egenix.com wrote: On 2009-02-06 09:10, Curt Hash wrote: I'm writing a small application for detecting source code plagiarism that currently relies on a database to store lines of code. The application has two primary functions: adding a new

Trouble sorting a list of objects by attributes

2009-02-06 Thread Robocop
Hello again, I've found myself stumped when trying to organize this list of objects. The objects in question are timesheets which i'd like to sort by four attributes: class TimeSheet: department = string engagement = string date = datetime.date stare_hour = datetime.time My ultimate

Trouble sorting a list of objects by attributes

2009-02-06 Thread rdmurray
Quoth Robocop btha...@physics.ucsd.edu: Hello again, I've found myself stumped when trying to organize this list of objects. The objects in question are timesheets which i'd like to sort by four attributes: class TimeSheet: department = string engagement = string date =

Re: Trouble sorting a list of objects by attributes

2009-02-06 Thread Miki
I've found myself stumped when trying to organize this list of objects.  The objects in question are timesheets which i'd like to sort by four attributes: class TimeSheet:   department = string   engagement = string   date = datetime.date   stare_hour = datetime.time My ultimate goal

Re: subprocess returncode windows

2009-02-06 Thread Andrew
On Feb 5, 9:17 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 05 Feb 2009 17:34:29 -0200, Andrew andrew.replo...@gmail.com   escribió: On Dec 16 2008, 5:11 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Tue, 16 Dec 2008 17:21:35 -0200, Andrew

Re: Trouble sorting a list of objects by attributes

2009-02-06 Thread bearophileHUGS
Robocop: then within each department block of the list, have it organized by projects. I don't know what does it means. timesheets.sort(key=operator.attrgetter('string')) Try something like: timesheets.sort(key=attrgetter(department, engagement, date, stare_hour)) My brain might explode if

Re: Ordered dict by default

2009-02-06 Thread Cameron Simpson
On 05Feb2009 01:47, bearophileh...@lycos.com bearophileh...@lycos.com wrote: | [...] But even if the average performance becomes a | little worse I think making the default Python dict as ordered is a | positive change for Python too, because built-ins are meant to be as | flexible as possible,

Re: urllib2 performance on windows, usb connection

2009-02-06 Thread dq
Martin v. Löwis wrote: So does anyone know what the deal is with this? Why is the same code so much slower on Windows? Hope someone can tell me before a holy war erupts :-) Only the holy war can give an answer here. It certainly has *nothing* to do with Python; Python calls the operating

Re: Question on Strings

2009-02-06 Thread John Machin
On Feb 7, 5:23 am, Terry Reedy tjre...@udel.edu wrote: John Machin wrote: The UTF-n siblings are *external* representations. 2.x: a_unicode_object.decode('UTF-16') - an_str_object 3.x: an_str_object.decode('UTF-16') - a_bytes_object That should be .encode() to bytes, which is the coded

Re: Flattening lists

2009-02-06 Thread Rhamphoryncus
On Feb 5, 1:16 pm, Michele Simionato michele.simion...@gmail.com wrote: On Feb 5, 7:24 pm, a...@pythoncraft.com (Aahz) wrote: In article a22c77c4-a812-4e42-8972-6f3eedf72...@l33g2000pri.googlegroups.com, Michele Simionato  michele.simion...@gmail.com wrote: Looks fine to me. In some

Re: Using cPickle

2009-02-06 Thread mmcclaf
On Feb 6, 3:09 pm, MRAB goo...@mrabarnett.plus.com wrote: mmcclaf wrote: On Feb 6, 10:25 am, Steve Holden st...@holdenweb.com wrote: mmcclaf wrote: Hi there, I have to make a small database using cPickle. I'm having troubles trying to read in the information if it's more than one line.

Re: Ordered dict by default

2009-02-06 Thread MRAB
Cameron Simpson wrote: On 05Feb2009 01:47, bearophileh...@lycos.com bearophileh...@lycos.com wrote: | [...] But even if the average performance becomes a | little worse I think making the default Python dict as ordered is a | positive change for Python too, because built-ins are meant to be as |

Re: urllib2 performance on windows, usb connection

2009-02-06 Thread MRAB
dq wrote: Martin v. Löwis wrote: So does anyone know what the deal is with this? Why is the same code so much slower on Windows? Hope someone can tell me before a holy war erupts :-) Only the holy war can give an answer here. It certainly has *nothing* to do with Python; Python calls

Re: Using multiprocessing from a Windows service

2009-02-06 Thread Mark Hammond
On 6/02/2009 4:21 PM, Volodymyr Orlenko wrote: In the patch I submitted, I simply check if the name of the supposed module ends with .exe. It works fine for my case, but maybe this is too general. Is there a chance that a Python module would end in .exe? IIRC, py2exe may create executables

Re: WIn32api

2009-02-06 Thread Mark Hammond
On 7/02/2009 3:28 AM, K-Dawg wrote: You might like to seek out the python-win32 mailing list for stuff like this where more people tend to pay attention to windows problems. This works if I call run() specifically. But when I try to initiate the thread with .start() I get the following error

Re: Using cPickle

2009-02-06 Thread MRAB
mmcclaf wrote: On Feb 6, 3:09 pm, MRAB goo...@mrabarnett.plus.com wrote: mmcclaf wrote: On Feb 6, 10:25 am, Steve Holden st...@holdenweb.com wrote: mmcclaf wrote: Hi there, I have to make a small database using cPickle. I'm having troubles trying to read in the information if it's more than

Re: Trouble sorting a list of objects by attributes

2009-02-06 Thread Robocop
On Feb 6, 1:03 pm, bearophileh...@lycos.com wrote: Robocop: then within each department block of the list, have it organized by projects. I don't know what does it means. timesheets.sort(key=operator.attrgetter('string')) Try something like: timesheets.sort(key=attrgetter(department,

Re: Trouble sorting a list of objects by attributes

2009-02-06 Thread Robocop
On Feb 6, 1:03 pm, bearophileh...@lycos.com wrote: Robocop: then within each department block of the list, have it organized by projects. I don't know what does it means. timesheets.sort(key=operator.attrgetter('string')) Try something like: timesheets.sort(key=attrgetter(department,

Re: Trouble sorting a list of objects by attributes

2009-02-06 Thread Robocop
On Feb 6, 2:17 pm, Robocop btha...@physics.ucsd.edu wrote: On Feb 6, 1:03 pm, bearophileh...@lycos.com wrote: Robocop: then within each department block of the list, have it organized by projects. I don't know what does it means.

Re: Trouble sorting a list of objects by attributes

2009-02-06 Thread Robocop
On Feb 6, 2:20 pm, Robocop btha...@physics.ucsd.edu wrote: On Feb 6, 2:17 pm, Robocop btha...@physics.ucsd.edu wrote: On Feb 6, 1:03 pm, bearophileh...@lycos.com wrote: Robocop: then within each department block of the list, have it organized by projects. I don't know what

Re: Trouble sorting a list of objects by attributes

2009-02-06 Thread Terry Reedy
Robocop wrote: UH OH GUYS! line 110, in sorter timesheets.sort(key=attrgetter(department, engagement, date,start)) TypeError: attrgetter expected 1 arguments, got 4 Um... what version of Python are you running? Alway specify. (Too many people do not). In 3.0 from operator import

  1   2   3   >