ride tab editor 2.0

2009-06-18 Thread edexter
ride tab editor 2.0 has been released. ride tab editor is a freeware multiplatform tab editor for bass, guitar and drums. included is a csound tool released under a dual license (free for non-profit the qt license in other words). to convert the drum tabs into csound scores. 1c re-released

cx_Logging 2.0

2009-06-18 Thread Anthony Tuininga
What is cx_Logging? cx_Logging is a Python extension module which operates in a fashion similar to the logging module that ships with Python 2.3 and higher. It also has a C interface which allows applications to perform logging independently of or in tandem with Python. Where do I get it?

bzr 1.16 released!

2009-06-18 Thread Jonathan Lange
Bazaar 1.16, codename It's yesterday in California is released! This version of Bazaar contains the beta release of the new ``2a`` repository format, suitable for testing by fearless, advanced users. This format or an updated version of it will become the default format in Bazaar 2.0. Please read

Re: python tutorial

2009-06-18 Thread steve
Robert Kern robert.k...@gmail.com wrote in message news:mailman.1728.1245289092.8015.python-l...@python.org... On 2009-06-17 19:36, steve wrote: Carl Bankspavlovevide...@gmail.com wrote in message news:2f6271b1-5ffa-4cec-81f8-0276ad647...@p5g2000pre.googlegroups.com... On Jun 15, 7:56 pm,

String to unicode - duplicating by function the effect of u prefix

2009-06-18 Thread CiTro
I'm looking for a way to convert a string to it's unicode brother. This means: stringOne = \u0026 stringTwo = u\u0026 print unicode(stringOne) == stringTwo The result is false. What function should I use, to duplicate the effect of the u prefix ? --

Re: python tutorial

2009-06-18 Thread Steven D'Aprano
On Thu, 18 Jun 2009 15:58:37 +1000, steve wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au wrote in message news:pan.2009.06.18.01.42...@remove.this.cybersource.com.au... On Thu, 18 Jun 2009 10:36:01 +1000, steve wrote: 1) Windows does not make a distinction between text and

Re: fastest native python database?

2009-06-18 Thread Pierre Quentel
On 18 juin, 05:28, per perfr...@gmail.com wrote: hi all, i'm looking for a native python package to run a very simple data base. i was originally using cpickle with dictionaries for my problem, but i was making dictionaries out of very large text files (around 1000MB in size) and pickling

Re: String to unicode - duplicating by function the effect of u prefix

2009-06-18 Thread Peter Otten
CiTro wrote: I'm looking for a way to convert a string to it's unicode brother. This means: stringOne = \u0026 stringTwo = u\u0026 print unicode(stringOne) == stringTwo The result is false. What function should I use, to duplicate the effect of the u prefix ? \u... has a special

Re: TypeError: int argument required

2009-06-18 Thread Lawrence D'Oliveiro
In message mailman.1725.1245281180.8015.python-l...@python.org, Rhodri James wrote: On Wed, 17 Jun 2009 12:07:15 +0100, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: [snip example code] You haven't managed to get rid of the backslashes. [snip other example code] Now

Re: fastest native python database?

2009-06-18 Thread Lawrence D'Oliveiro
In message 07ac7d7a-48e1-45e5-a21c- f2c259c75...@j12g2000vbl.googlegroups.com, per wrote: i'm looking for a native python package to run a very simple data base. Use Python mapping objects. Most real-world databases will fit in memory anyway. --

Re: Regarding Python is scripting language or not

2009-06-18 Thread Arnaud Delobelle
Christian Heimes li...@cheimes.de writes: Terry Reedy wrote: If you mean 'be an instance of a class', which I think is the most natural reading, then Python *is* object-oriented and, if I understand what I have read correctly (so that ints are just (unboxed) ints and not members of an int

Re: python tutorial

2009-06-18 Thread steve
Steven D'Aprano ste...@remove.this.cybersource.com.au wrote in message news:pan.2009.06.18.07.05...@remove.this.cybersource.com.au... On Thu, 18 Jun 2009 15:58:37 +1000, steve wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au wrote in message

Re: How can I enumerate (list) serial ports?

2009-06-18 Thread Jason
On Jun 18, 2:20 pm, Tim Golden m...@timgolden.me.uk wrote: but I imagine that, behind the scenes, it's doing some sort of conditional imports according to platform. I have, and yes indeed it does. I imagine you'd have to do something similar to get a list of port names. That's what I

Re: Pythonic way to overwrite a file

2009-06-18 Thread Tim Wintle
On Wed, 2009-06-17 at 14:26 -0400, Cameron Pulsford wrote: This is only supposed to handle text files, so when would reading it all into memory become too much for most computers? I'm guessing there aren't many source files of too great a size. I often use python with server log files - 1Tb of

Re: python tutorial

2009-06-18 Thread Ben Finney
steve st...@nospam.au writes: So far I've been pointed to a discussion of C, a discussion of DOS, and a discussion of Windows NT 4. Great. Glad to see that you know how to use the Internet. Says the person who doesn't want to attach an identity to his messages. (Yes, that's ad hominem if used

Re: Regarding Python is scripting language or not

2009-06-18 Thread Bruno Desthuilliers
Asun Friere a écrit : (snip) OTOH the whole notion of defining OO by the use of classes automatically excludes from consideration prototype-based OO languages (eg. Self) which arguably offer a purer approach to OO than class centric languages. FWIW, there's no notion of class in the minimal

please help...writing set to a file

2009-06-18 Thread yadin
Good day every one! I got this python program that returns me a set like this.. Set ([‘A\n’, B\n’, ‘C\n’, ‘D\n’, ‘E\n’, ‘F\n’, ‘G\n’ ]) And a list pp = [‘100\n’ ‘200\n’ ‘300\n’ ‘400\n’] I was reading this from a file…. How can I transform this to something that looks like this Column1 Column 2

Re: fastest native python database?

2009-06-18 Thread pdpi
On Jun 18, 8:09 am, Pierre Quentel quentel.pie...@wanadoo.fr wrote: On 18 juin, 05:28, per perfr...@gmail.com wrote: hi all, i'm looking for a native python package to run a very simple data base. i was originally using cpickle with dictionaries for my problem, but i was making

Re: please help...writing set to a file

2009-06-18 Thread Benjamin Kaplan
On Thu, Jun 18, 2009 at 5:24 AM, yadin conra2...@yahoo.com wrote: Good day every one! I got this python program that returns me a set like this.. Set ([‘A\n’, B\n’, ‘C\n’, ‘D\n’, ‘E\n’, ‘F\n’, ‘G\n’ ]) And a list pp = [‘100\n’ ‘200\n’ ‘300\n’ ‘400\n’] I was reading this from a file…. How

Re: please help...writing set to a file

2009-06-18 Thread Dave Angel
yadin wrote: Good day every one! I got this python program that returns me a set like this.. Set ([‘A\n’, B\n’, ‘C\n’, ‘D\n’, ‘E\n’, ‘F\n’, ‘G\n’ ]) And a list pp =‘100\n’ ‘200\n’ ‘300\n’ ‘400\n’] I was reading this from a file…. How can I transform this to something that looks like this

Packing a ctypes struct containing bitfields.

2009-06-18 Thread Karthik
Hello Everybody, I'm trying to create a packed structure in ctypes (with one 64-bit element that is bitfielded to 48 bits), unsuccessfully: === from ctypes import * class foo (Structure): _pack_ = 1 _fields_ = [ (bar,c_ulonglong, 48), ]

pyserial question

2009-06-18 Thread Piter_
Hi all. I try to control some equipment from python trough comport. I have not succeeded in pyserial. But if I use this terminal: http://hw-server.com/files/priloha/termv19b.zip http://hw-server.com/software/termv19b.html It works with following settings. Boud rate: 9600 Data bids: 8 Parity:

Re: UDP queue size

2009-06-18 Thread Nick Craig-Wood
Martin P. Hellwig martin.hell...@dcuktec.org wrote: Scott David Daniels wrote: 找尋自己的一片天 wrote: I got a problem about UDP. How do I get the UDP buffer size? When the server had some delay in handling incoming UDP, it will lost some package. I wonder it's because the system buffer

Re: CAD file format specifications?

2009-06-18 Thread Anthra Norell
norseman wrote: Anthra Norell wrote: Andres Acosta wrote: HI there Anthara have you checked out www.Blender.org, It is open source and accepts a lot of your formats. for import and export. Anrdres Anthra Norell wrote: Hi, Anyone working with CAD who knows about numeric data entry? I have

Default namespace and attributes with ElementTree 1.3

2009-06-18 Thread Racinet Georges
Hi there, I've got a problem with the way ElementTree 1.3a3-20070912 handles attributes with the default namespace feature (please feel free to redirect me if this isn't the proper place to discuss such matters). from elementtree import ElementTree as ET e = ET.fromstring('a xmlns=foob

Re: python tutorial

2009-06-18 Thread D'Arcy J.M. Cain
On 18 Jun 2009 07:05:20 GMT Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: Technically, the Windows file systems record the length of text files and so an explicit EOF character is redundant, nevertheless, the behaviour of stopping the read at \0x1A is expected. Whether you want

Re: Exceptions and Object Destruction (was: Problem with apsw and garbage collection)

2009-06-18 Thread Piet van Oostrum
Charles Yeomans char...@declaresub.com (CY) wrote: CY Memory management may be an implementation detail, but it is CY unfortunately one that illustrates the so-called law of leaky CY abstractions. So I think that one has to write code that follows the CY memory management scheme of whatever

Re: python tutorial

2009-06-18 Thread Peter Bell
Steven D'Aprano ste...@remove.this.cybersource.com.au writes http://support.microsoft.com/kb/156258 That says that Windows NT 3.5 and NT 4 couldn't make a distinction between text and binary files. I don't think that advances your case. If they had changed the Windows behaviour, yes, but

Re: generator expression works in shell, NameError in script

2009-06-18 Thread guthrie
On Jun 17, 6:38 pm, Steven Samuel Cole steven.samuel.c...@gmail.com wrote: Still don't really understand why my initial code didn't work, though... Your code certainly looks reasonable, and looks to me like it should work. The comment of partial namespace is interesting, but unconvincing (to me)

Re: Regarding Python is scripting language or not

2009-06-18 Thread Jochen Schulz
Terry Reedy: Jochen Schulz wrote: If, by object-oriented you mean everything has to be put into classes, then Python is not object-oriented. That depends on what you mean by 'put into classes' (and 'everything'). :) What I meant was that in Python you can write code without defining your

Re: please help...writing set to a file

2009-06-18 Thread Alan G Isaac
On 6/18/2009 5:24 AM yadin apparently wrote: I got this python program that returns me a set like this.. Set ([‘A\n’, B\n’, ‘C\n’, ‘D\n’, ‘E\n’, ‘F\n’, ‘G\n’ ]) And a list pp = [‘100\n’ ‘200\n’ ‘300\n’ ‘400\n’] I was reading this from a file…. How can I transform this to something that looks

Re: TypeError: int argument required

2009-06-18 Thread Rhodri James
On Thu, 18 Jun 2009 08:29:53 +0100, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: Now compare that with Lie Ryan's examples which, instead of using backslashes, instead used alternative quotes plus backslashes in one example, and in the other example, alternative quotes,

Re: Packing a ctypes struct containing bitfields.

2009-06-18 Thread Nick Craig-Wood
Karthik karthik301...@gmail.com wrote: Hello Everybody, I'm trying to create a packed structure in ctypes (with one 64-bit element that is bitfielded to 48 bits), unsuccessfully: === from ctypes import * class foo (Structure): _pack_ = 1

command-line one-liners a la Perl?

2009-06-18 Thread kj
I'm a recovering Perl addict, and I'm jonesin' badly for command-line one-liners, like % perl -lne '@f=split \t;print join \t,@f[3,1] if $f[2]=~/frobozz/i' in.txt How can I get my fix with Python? kynn -- http://mail.python.org/mailman/listinfo/python-list

Re: generator expression works in shell, NameError in script

2009-06-18 Thread nn
On Jun 18, 8:38 am, guthrie grguth...@gmail.com wrote: On Jun 17, 6:38 pm, Steven Samuel Cole steven.samuel.c...@gmail.com wrote: Still don't really understand why my initial code didn't work, though... Your code certainly looks reasonable, and looks to me like it should work. The comment

Re: command-line one-liners a la Perl?

2009-06-18 Thread MRAB
kj wrote: I'm a recovering Perl addict, and I'm jonesin' badly for command-line one-liners, like % perl -lne '@f=split \t;print join \t,@f[3,1] if $f[2]=~/frobozz/i' in.txt How can I get my fix with Python? python -c print 'Hello world!' Although you need to remember that Python makes

pyserial. How to set Handshaking to RST on TX.

2009-06-18 Thread Piter_
Hi all I try to drive some equipment trough serial port. So far I could do it with some windows com port terminal if handhaking set to RTS on TX. http://hw-server.com/software/termv19b.html But I cant find out how to set it in pyserial. Thanks in advance for any hint. --

Re: command-line one-liners a la Perl?

2009-06-18 Thread unayok
On Jun 18, 9:36 am, kj no.em...@please.post wrote: I'm a recovering Perl addict, and I'm jonesin' badly for command-line one-liners, like   % perl -lne '@f=split \t;print join \t,@f[3,1] if $f[2]=~/frobozz/i' in.txt How can I get my fix with Python? kynn I'd encourage you to learn the

Re: Regarding Python is scripting language or not

2009-06-18 Thread Aaron Brady
On Jun 18, 6:07 am, Jochen Schulz m...@well-adjusted.de wrote: Terry Reedy: Jochen Schulz wrote: If, by object-oriented you mean everything has to be put into classes, then Python is not object-oriented. That depends on what you mean by 'put into classes' (and 'everything'). :) What

Announcing www.python-excel.org

2009-06-18 Thread Chris Withers
Hi All, Google unfortunately has a knack of presenting prospective Python users who need to work with Excel files with information that is now really rather out of date. To try and help with this, I've setup a small website at: http://www.python-excel.org ...to try and list the latest

Re: Newbie queue question

2009-06-18 Thread Piet van Oostrum
Jure Erznožnik jure.erznoz...@gmail.com (JE) wrote: JE Hi, JE I'm pretty new to Python (2.6) and I've run into a problem I just JE can't seem to solve. JE I'm using dbfpy to access DBF tables as part of a little test project. JE I've programmed two separate functions, one that reads the DBF in

Tutorial on working with Excel files in Python (without COM and cross platform!) at EuroPython 2009

2009-06-18 Thread Chris Withers
Hi All, Too many people in the Python community *still* think the only way to work with Excel files in Python is using COM on Windows. To try and correct this, I'm giving a tutorial at this year's EuroPython conference in Birmingham, UK on Monday, 29th June that will cover working with

Re: fastest native python database?

2009-06-18 Thread J Kenneth King
per perfr...@gmail.com writes: hi all, i'm looking for a native python package to run a very simple data base. i was originally using cpickle with dictionaries for my problem, but i was making dictionaries out of very large text files (around 1000MB in size) and pickling was simply too

Re: logging.fileConfig limitations?

2009-06-18 Thread Vinay Sajip
On Jun 17, 9:05 pm, Mani Ghasemlou m...@tungle.com wrote: Hi all, C:\Documents and Settings\ßéäöÜ2\Local Settings\Application Data\MyApp\MyApp.log Now it turns out that the logging module can't find C:/Documents and Settings/ßéäöÜ2/Local Settings/Application Data/MyApp/MyApp.log

A question on scope...

2009-06-18 Thread Wells Oliver
In writing out python classes, it seems the 'self' is optional, meaning that inside a class method, self.foo = bar has the same effect as foo = bar. Is this right? If so, it seems a little odd- what's the rationale? Or am I mistaken? -- Wells Oliver we...@submute.net --

Re: Exotic Logics

2009-06-18 Thread Michael Torrie
William Clifford wrote: I've read one can do all of the 16 binary operations with clever uses of NAND or NOR. That is correct. In fact semiconductor logic is done using these two principle gates. See http://en.wikipedia.org/wiki/NAND_logic . Quite interesting really. --

Re: A question on scope...

2009-06-18 Thread MRAB
Wells Oliver wrote: In writing out python classes, it seems the 'self' is optional, meaning that inside a class method, self.foo = bar has the same effect as foo = bar. Is this right? If so, it seems a little odd- what's the rationale? Or am I mistaken? Inside a function or method foo = bar

Re: TypeError: int argument required

2009-06-18 Thread Lie Ryan
Rhodri James wrote: On Thu, 18 Jun 2009 08:29:53 +0100, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: Now compare that with Lie Ryan's examples which, instead of using backslashes, instead used alternative quotes plus backslashes in one example, and in the other example,

Re: Tutorial on working with Excel files in Python (without COM and cross platform!) at EuroPython 2009

2009-06-18 Thread Mike Driscoll
On Jun 18, 10:38 am, Chris Withers ch...@simplistix.co.uk wrote: Hi All, Too many people in the Python community *still* think the only way to work with Excel files in Python is using COM on Windows. To try and correct this, I'm giving a tutorial at this year's EuroPython conference in

Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 14:50:28 +1200, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 7x63ew3uo9@ruckus.brouhaha.com, wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: I don't think any countable set, even a countably-infinite set, can have a

Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 14:50:28 +1200, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 7x63ew3uo9@ruckus.brouhaha.com, wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: I don't think any countable set, even a countably-infinite set, can have a

Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 14:50:28 +1200, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 7x63ew3uo9@ruckus.brouhaha.com, wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: I don't think any countable set, even a countably-infinite set, can have a

Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 07:35:35 +0200, Jaime Fernandez del Rio jaime.f...@gmail.com wrote: On Wed, Jun 17, 2009 at 4:50 AM, Lawrence D'Oliveirol...@geek-central.gen.new_zealand wrote: In message 7x63ew3uo9@ruckus.brouhaha.com,  wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand

Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 07:37:32 -0400, Charles Yeomans char...@declaresub.com wrote: On Jun 17, 2009, at 2:04 AM, Paul Rubin wrote: Jaime Fernandez del Rio jaime.f...@gmail.com writes: I am pretty sure that a continuous sequence of curves that converges to a continuous curve, will do so

Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 08:18:52 -0700 (PDT), Mark Dickinson dicki...@gmail.com wrote: On Jun 17, 3:46 pm, Paul Rubin http://phr...@nospam.invalid wrote: Mark Dickinson dicki...@gmail.com writes: It looks as though you're treating (a portion of?) the Koch curve as the graph of a function f from

Re: Measuring Fractal Dimension ?

2009-06-18 Thread Charles Yeomans
On Jun 18, 2009, at 2:19 PM, David C. Ullrich wrote: On Wed, 17 Jun 2009 07:37:32 -0400, Charles Yeomans char...@declaresub.com wrote: On Jun 17, 2009, at 2:04 AM, Paul Rubin wrote: Jaime Fernandez del Rio jaime.f...@gmail.com writes: I am pretty sure that a continuous sequence of curves

Re: walking a directory with very many files

2009-06-18 Thread Lie Ryan
Mike Kazantsev wrote: On Wed, 17 Jun 2009 03:42:02 GMT Lie Ryan lie.1...@gmail.com wrote: Mike Kazantsev wrote: In fact, on modern filesystems it doesn't matter whether you accessing /path/f9e95ea4926a4 with million files in /path or /path/f/9/e/95ea with only hundred of them in each path.

Re: python tutorial

2009-06-18 Thread Robert Kern
On 2009-06-18 00:57, steve wrote: Robert Kernrobert.k...@gmail.com wrote in message news:mailman.1728.1245289092.8015.python-l...@python.org... On 2009-06-17 19:36, steve wrote: Carl Bankspavlovevide...@gmail.com wrote in message

ERROR: how to use a text file in a module?

2009-06-18 Thread Moni GV
Hi, Help with a No such file ... error. I have the next folder structure: ---Network contains:     --packets.py     --Temp contains:    -test.py Well, within packets.py I do this: from Temp.test import * Within test.py I do this: f = open (topo.txt, r) The error is: No such file topo.txt

Re: python tutorial

2009-06-18 Thread Lie Ryan
Ben Finney wrote: You started out asking how to *interpret* it, which is fine for this forum; but discussing it here isn't going to lead automatically to any *midification* to a document developed within the core of Python. I definitely want to see how python doc be midified, last time I

Re: python tutorial

2009-06-18 Thread Ethan Furman
steve wrote: Robert Kern robert.k...@gmail.com wrote in message news:mailman.1728.1245289092.8015.python-l...@python.org... On 2009-06-17 19:36, steve wrote: Carl Bankspavlovevide...@gmail.com wrote in message news:2f6271b1-5ffa-4cec-81f8-0276ad647...@p5g2000pre.googlegroups.com... On Jun

Re: Regarding Python is scripting language or not

2009-06-18 Thread Terry Reedy
Jochen Schulz wrote: Terry Reedy: Jochen Schulz wrote: If, by object-oriented you mean everything has to be put into classes, then Python is not object-oriented. That depends on what you mean by 'put into classes' (and 'everything'). :) What I meant was that in Python you can write code

Help: Group based synchronize decorator

2009-06-18 Thread Vishal Shetye
I want to synchronize calls using rw locks per 'group' and my implementation is similar to http://code.activestate.com/recipes/465057/ except that I have my own Lock implementation. All my synchronized functions take 'whatGroup' as param. My lock considers 'group' while deciding on granting

Re: python tutorial

2009-06-18 Thread Piet van Oostrum
Peter Bell peter.b...@com.au (PB) wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au PB writes http://support.microsoft.com/kb/156258 PB That says that Windows NT 3.5 and NT 4 couldn't make PB a distinction between text and binary files. I don't think PB that advances your case.

Re: python tutorial

2009-06-18 Thread Terry Reedy
1) Windows does not make a distinction between text and binary files. 'Windows', in its broad sense of Windoes system, includes the standards and protocols mandated by its maker, Microsoft Corporation, and implemented in its C compiler, which it uses to compile the software that other

Re: Once again, comparison wxpython with PyQt

2009-06-18 Thread Sebastian Wiesner
pdpi – Donnerstag, 18. Juni 2009 17:22 On Jun 18, 3:49 pm, Diez B. Roggisch de...@nospam.web.de wrote: Hans Müller wrote: Here we have to select between wxPython and PyQt for a medium size project. In this project several hundred dialogs are to be created. This work will be done by a

Re: Once again, comparison wxpython with PyQt

2009-06-18 Thread Mike Driscoll
On Jun 18, 8:35 am, Hans Müller heint...@web.de wrote: Here we have to select between wxPython and PyQt for a medium size project. In this project several hundred dialogs are to be created. This work will be done by a program generator which has to re-written. The question now is which

Re: Perl's @foo[3,7,1,-1] ?

2009-06-18 Thread Hyuga
On Jun 13, 6:22 pm, Brian Quinlan br...@sweetapp.com wrote: MRAB wrote: Brian Quinlan wrote: kj wrote: In slrnh37t2p.63e.n...@irishsea.home.craig-wood.com Nick Craig-Wood n...@craig-wood.com writes: However I can't think of the last time I wanted to do this - array elements having

Re: Measuring Fractal Dimension ?

2009-06-18 Thread Arnaud Delobelle
David C. Ullrich ullr...@math.okstate.edu writes: On Wed, 17 Jun 2009 08:18:52 -0700 (PDT), Mark Dickinson dicki...@gmail.com wrote: On Jun 17, 3:46 pm, Paul Rubin http://phr...@nospam.invalid wrote: Mark Dickinson dicki...@gmail.com writes: It looks as though you're treating (a portion

Re: Newbie queue question

2009-06-18 Thread Jure Erznožnik
Thanks for the suggestions. I've been looking at the source code of threading support objects and I saw that non-blocking requests in queues use events, while blocking requests just use InterlockedExchange. So plain old put/get is much faster and I've managed to confirm this today with further

Generator functions subclass generator?

2009-06-18 Thread Terry Reedy
An iterator class is a class with an __iter__ method that returns self and a __next__ method that on each call returns one not-yet-returned item of the actual or virtual collection it represents and raises StopIteration when there are no more items to return. 'Generator' (3.1 name) is one of

xlutils 1.3.2 released!

2009-06-18 Thread Chris Withers
Hi All, I'm pleased to announce a new release of xlutils. This is a small collection of utilities that make use of both xlrd and xlwt to process Microsoft Excel files. The list of utilities included in this release are: xlutils.copy Tools for copying xlrd.Book objects to xlwt.Workbook

Re: ERROR: how to use a text file in a module?

2009-06-18 Thread Rhodri James
On Thu, 18 Jun 2009 19:57:46 +0100, Moni GV tamuz...@yahoo.es wrote: Help with a No such file ... error. I have the next folder structure: ---Network contains:     --packets.py     --Temp contains:    -test.py Well, within packets.py I do this: from Temp.test import * Wildcarded imports

Re: python tutorial

2009-06-18 Thread Aahz
In article mailman.1745.1245326792.8015.python-l...@python.org, D'Arcy J.M. Cain da...@druid.net wrote: I really loved CP/M in its day but isn't it time we let go? +1 QOTW -- Aahz (a...@pythoncraft.com) * http://www.pythoncraft.com/ as long as we like the same operating

TestFixtures 1.6.0 released!

2009-06-18 Thread Chris Withers
Hi All, I'm pleased to announce the first advertised release of TestFixtures. This is a collection of helpers and mock objects that are useful when writing unit tests or doc tests. The modules currently included are: *Comparison* This class lets you instantiate placeholders that can be

Allocating memory to pass back via ctypes callback function

2009-06-18 Thread Scott
Hi, I'm using python ctypes to interact with the C API of a commercial-off- the-shelf application. I need to implement callback functions which will be called by the application. The callbacks take as a parameter a char** parameter for which the callback function will allocate memory and set

Re: ATT Usenet Netnews Service Shutting Down

2009-06-18 Thread Jive Dadson
newsmas...@bellsouth.net wrote: Please note that on or around July 15, 2009, ATT will no longer be offering access to the Usenet Netnews service. If you wish to continue reading Usenet newsgroups, access is available through third-party vendors. http://support.att.net/usenet Distribution:

Re: Measuring Fractal Dimension ?

2009-06-18 Thread Mark Dickinson
On Jun 18, 7:26 pm, David C. Ullrich ullr...@math.okstate.edu wrote: On Wed, 17 Jun 2009 08:18:52 -0700 (PDT), Mark Dickinson Right.  Or rather, you treat it as the image of such a function, if you're being careful to distinguish the curve (a subset of R^2) from its parametrization (a

Re: Exotic Logics

2009-06-18 Thread Dave Angel
Michael Torrie wrote: William Clifford wrote: I've read one can do all of the 16 binary operations with clever uses of NAND or NOR. That is correct. In fact semiconductor logic is done using these two principle gates. See http://en.wikipedia.org/wiki/NAND_logic . Quite interesting

Re: question about a command like 'goto ' in Python's bytecode orit's just a compiler optimization?

2009-06-18 Thread JanC
Hendrik van Rooyen wrote: It is my opinion that it is not possible to make a useful machine, virtual or real, which executes instructions sequentially, if the instruction set does not contain a conditional jump of some sort. I have tried doing it using conditional calls, and it fails on the

Re: python tutorial

2009-06-18 Thread Carl Banks
On Jun 17, 5:36 pm, steve st...@nospam.au wrote: Carl Banks pavlovevide...@gmail.com wrote in message news:2f6271b1-5ffa-4cec-81f8-0276ad647__begin_mask_n#9g02mg7!__...__end_mask_i?a63jfad$...@p5g2000pre.googlegroups.com... On Jun 15, 7:56 pm, steve st...@nospam.au wrote: I was just looking

Re: Measuring Fractal Dimension ?

2009-06-18 Thread Paul Rubin
David C. Ullrich ullr...@math.okstate.edu writes: obviously converges to f, but not uniformly. On a closed interval, any continuous function is uniformly continuous. Isn't (-?, ?) closed? What is your version of the definition of closed? I think the whole line is closed, but I hadn't

Is this pylint error message valid or silly?

2009-06-18 Thread Matthew Wilson
Here's the code that I'm feeding to pylint: $ cat f.py from datetime import datetime def f(c=today): if c == today: c = datetime.today() return c.date() And here's what pylint says: $ pylint -e f.py No config file found, using default

Re: Packing a ctypes struct containing bitfields.

2009-06-18 Thread Karthik
On Jun 18, 6:29 pm, Nick Craig-Wood n...@craig-wood.com wrote: Karthik karthik301...@gmail.com wrote:  Hello Everybody,  I'm trying to create a packed structure in ctypes (with one 64-bit  element that is bitfielded to 48 bits),  unsuccessfully: ===  

Re: GUI(eclipse+pydev/SPE) freeze when doing python auto-completion under Linux

2009-06-18 Thread Fabio Zadrozny
yes, the same problem even on an empty program. every file has the same problem. for example, if I new a file and input the following: import os os. after I input '.', it will pop up the window, and i can select the function of os module or continue input. but after that, no action can be

Re: Tutorial on working with Excel files in Python (without COM and cross platform!) at EuroPython 2009

2009-06-18 Thread John Machin
Mike Driscoll kyosohma at gmail.com writes: On Jun 18, 10:38 am, Chris Withers ch...@simplistix.co.uk wrote: working with Excel files in Python using the pure-python libraries xlrd, xlwt and xlutils. As I recall, these utilities don't allow the programmer to access Excel's formulas. Is

Re: Once again, comparison wxpython with PyQt

2009-06-18 Thread Jive Dadson
Qt has far better documentation, and it has Qt Designer. The documentation is a big deal. I wrote a little project in wxPython, and I spent 90% of my time just trying to find the names of member functions and then to figure out what they do. Why not use Qt C++? I like Python a lot. Heck,

Calling subprocess with arguments

2009-06-18 Thread Tyler Laing
I've been trying any variation I can think of to do this properly, but here's my problem: I want to execute this command string: vlc -I rc This allows vlc to be controlled via a remote interface instead of the normal gui interface. Now, say, I try this from subprocess: p=subprocess.Popen('vlc

Re: generator expression works in shell, NameError in script

2009-06-18 Thread ryles
On Jun 18, 9:56 am, nn prueba...@latinmail.com wrote: On Jun 18, 8:38 am, guthrie grguth...@gmail.com wrote: On Jun 17, 6:38 pm, Steven Samuel Cole steven.samuel.c...@gmail.com wrote: Still don't really understand why my initial code didn't work, though... Your code certainly looks

KeyboardInterrupt eats my error and then won't be caught

2009-06-18 Thread Philip Semanchuk
Hi all, I need help understanding how Python deals with Ctrl-C. A user has reported a bug in my posix_ipc module. When a Python app is waiting to acquire an IPC semaphore and the user hits Ctrl-C, my code should return a custom error indicating that the semaphore wait was interrupted by a

Re: GUI(eclipse+pydev/SPE) freeze when doing python auto-completion under Linux

2009-06-18 Thread Wei, Xiaohai
Thanks for your reply. where is the error log? I can not find it at /var/log I have a virtual network card to bridge kvm virtual machine. will it cause problem? as you said configuration of interpretor, how should I configure the interpretor? Thanks James On Fri, Jun 19, 2009 at 9:32 AM,

Re: generator expression works in shell, NameError in script

2009-06-18 Thread greg
ssc wrote: class SignupForm(Form): titles = ['Dr', 'Miss', 'Mr', 'Mrs', 'Ms',] title_choices = [(0, '')] + list((titles.index(t)+1, t) for t in titles) Does the generator expression have its own little namespace or so ? Yes. The generator expression is a function, with its own

Re: generator expression works in shell, NameError in script

2009-06-18 Thread greg
nn wrote: This is certainly an odd one. This code works fine under 2.6 but fails in Python 3.1. class x: ... lst=[2] ... gen=[lst.index(e) for e in lst] In 3.x it was decided that the loop variables in a list comprehension should be local, and not leak into the surrounding scope.

Re: Is this pylint error message valid or silly?

2009-06-18 Thread Ben Finney
Matthew Wilson m...@tplus1.com writes: Here's the code that I'm feeding to pylint: $ cat f.py from datetime import datetime def f(c=today): if c == today: c = datetime.today() return c.date() And here's what pylint says: $

Re: Packing a ctypes struct containing bitfields.

2009-06-18 Thread Lawrence D'Oliveiro
In message ec2dda8a-8139-46f8-808b- cc9eaa632...@d19g2000prh.googlegroups.com, Karthik wrote: from ctypes import * Don't do that. -- http://mail.python.org/mailman/listinfo/python-list

Re: walking a directory with very many files

2009-06-18 Thread Lawrence D'Oliveiro
In message 20090618081423.2e035...@coercion, Mike Kazantsev wrote: On Thu, 18 Jun 2009 10:33:49 +1200 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 20090617214535.10866...@coercion, Mike Kazantsev wrote: On Wed, 17 Jun 2009 23:04:37 +1200 Lawrence D'Oliveiro

[issue6301] Error in tutorial section 7.2

2009-06-18 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Even if the Win32 API functions do not have a concept of text/binary files, the C library functions that MS provides, and Python uses, have. See http://msdn.microsoft.com/en-us/library/yeby3zcb(VS.71).aspx -- resolution: - works for me

[issue6303] print does not appear in the 3.x documentation index

2009-06-18 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: If you're referring to the general index, there is a print() (built-in function) entry in http://docs.python.org/dev/py3k/genindex-P.html. Am I missing another index? -- resolution: - works for me status: open - closed

[issue6304] Confusing error message when passing bytes to print with file pointing to a binary file

2009-06-18 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: How would you propose to fix this? print() should certainly not catch all TypeErrors and raise a new one... Maybe exception chaining could be used, so that print raises a TypeError of its own with the cause being the original message?

[issue6305] islice doesn't accept large stop values

2009-06-18 Thread Thomas Guest
New submission from Thomas Guest t...@wordaligned.org: Python 3.0 (r30:67503, Jan 7 2009, 16:22:01) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin from itertools import islice, count islice(count(), (131) - 1) itertools.islice object at 0x63a0c0 islice(count(), (131)) Traceback

  1   2   >