Re: Question to python C API

2009-04-15 Thread Andreas Otto
Hi, I want to make a language binding for an existing C library http://libmsgque.sourceforge.net is this possible ? -- http://mail.python.org/mailman/listinfo/python-list

Re: need to start a new project , can python do all that ?

2009-04-15 Thread Aahz
In article <9061ea8f-b4aa-4dbc-89c9-ae6848033...@k2g2000yql.googlegroups.com>, Deep_Feelings wrote: > >now going into python i found that python 3 is just out but recourses >are limited (including IDEs) any help on that ? Stick with Python 2.x -- Aahz (a...@pythoncraft.com) <*>

Re: CrystalFontz 635 project

2009-04-15 Thread Scott Flynn
I think I found the answer to the last question. "A primitive lock is a synchronization primitive that is not owned by a particular thread when locked." -17.2.2. Lock Objects So that's a no. On Wed, Apr 15, 2009 at 8:55 PM, Scott Flynn wrote: > > I'm finally around to playing around with my LCD

Re: [ANN] Falcon - powering innovation

2009-04-15 Thread JanC
Gerhard Häring wrote: > I've never heard of tabular programming before. I guess something similar/related to SQL or LINQ? I don't think this is really a bad idea if you want to support sublanguages for common programming problems... (which seems to be one of their primary language design ideas).

Re: What IDE support python 3.0.1 ?

2009-04-15 Thread Aahz
In article , Brendon Wickham wrote: > >I agree, no IDE needed. Just don't use Notepad! I'm on Mac, so spoiled >for choice of text editors, but I'm sure there's one or 2 good uns if >you're on Windows. Vim and emacs, of course. ;-) -- Aahz (a...@pythoncraft.com) <*> http://www

Re: Modifying the value of a float-like object

2009-04-15 Thread Aahz
In article <3b01d8f1-6a77-4374-b1c2-25bee7cdf...@x3g2000yqa.googlegroups.com>, wrote: > >Steven, I'd appreciate if you could refrain from criticizing so >bluntly so many points. I'd be great if you trusted me more for >knowing what I'm talking about; I've been a programmer for 25 years, >now, an

Re: How to create a virtual serial port?

2009-04-15 Thread JanC
Stuart Davenport wrote: > My point in all this is actually that I ordered a USB GPS Receiver and I just bought one myself a couple of weeks ago. They sell them at 10-13 euro on computer fairs these days, that's too cheap to not buy one... ;) > it wont arrive for another two weeks, being my impa

Re: What IDE support python 3.0.1 ?

2009-04-15 Thread Brendon Wickham
> On IDE's, I'm afraid I'm not going to be much help because I don't use > them.  I prefer to use a decent editor (Emacs in my case, others have > their own preferences) and run my scripts from the command line.  That > said, IDLE (which comes packaged with Python) is a perfectly decent > little ID

Re: What IDE support python 3.0.1 ?

2009-04-15 Thread Scott David Daniels
Ben Finney wrote: ... the upgrade police have not been given your address yet Don't be so sure! We of the Python Secret Upgradepolice ... -- http://mail.python.org/mailman/listinfo/python-list

Re: WHIFF - was: Re: Using Python after a few years of Ruby

2009-04-15 Thread Aaron Watters
> You should perhaps contrast WHIFF with the other offerings for creating > web applications. > > -- Gerhard You're right. Thanks for visiting! I'll have to think. Basically I don't want something which takes over the controls. I'll have to think about a better way to explain what I mean. -

CrystalFontz 635 project

2009-04-15 Thread Scott Flynn
I'm finally around to playing around with my LCD module. I chose Linux for OS, pygtk for the GUI, a CF635 Python library written by Thomas Cauley (found on CF website) for a starting point in sending commands to the LCD, and gobject.io_add_watch for listening for packets coming from the LCD. It bec

Developing modules with ‘pkgutil’

2009-04-15 Thread Ben Finney
Howdy all, With all the current fuss about namespace packages, I'm dealing with a similar goal that I hope is possible with stock Python 2.x. When developing a module intended to be part of an existing package installed on the system, I want to write programs that will import the *in-development*

client-server socket script that crashes on Mac

2009-04-15 Thread Bad Mutha Hubbard
Hi. I know I have some bugs in this, but I'm trying to find out one thing in particular: why the accept() method in the server never returns in OSX. It announces that it is waiting, and the client announces that it is attempting to connect, and both print the same port number, but it just hangs.

Re: How to check all elements of a list are same or different

2009-04-15 Thread Miles
On Wed, Apr 15, 2009 at 8:48 PM, Paul Rubin wrote: > I'd use: > >   from operator import eq >   all_the_same = reduce(eq, mylist) That won't work for a sequence of more than two items, since after the first reduction, the reduced value that you're comparing to is the boolean result: >>> reduce(eq

Re: What IDE support python 3.0.1 ?

2009-04-15 Thread Fabio Zadrozny
> I want to start learning python and not wanna waste my time learning > python 2.x ,so i need your advise to what IDE to use for python 3.0.1 > Pydev supports Python 2.x and 3.x. Cheers, Fabio -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to find options for add_command?

2009-04-15 Thread John Machin
On Apr 16, 6:55 am, Muddy Coder wrote: > Hi Folks, > > When I make Menu, and add in menu items, by using add_command, such > as: > > menuObj.add_command(label='Open File', command=self.open_file) > > It works. But, I want to make the GUI looking better. So, I want to > change color, font, size, ba

Re: pyprocessing and exceptions

2009-04-15 Thread Jesse Noller
On Wed, Apr 15, 2009 at 11:32 AM, garyrob wrote: > Hi, > > We're still using Python 2.5 so this question is about the > pyprocessing module rather than the multiprocessing module, but I'm > guessing the answer is the same. > > I tend to use the Pool() object to create slave processes. If > somethi

Re: Equivalent to C bitmasks and enumerations

2009-04-15 Thread John Machin
On Apr 16, 10:13 am, Dave Angel wrote: > > For the Color example, how's this for a starting place: > > class Color(object): >     def __init__(self, name, enum): >         self.enum = enum >         self.name = name >         setattr(Color, name, self) > >     @staticmethod >     def seal(): >    

Re: Where to find options for add_command?

2009-04-15 Thread Steven D'Aprano
On Wed, 15 Apr 2009 13:55:39 -0700, Muddy Coder wrote: > Hi Folks, > > When I make Menu, and add in menu items, by using add_command, such as: > > menuObj.add_command(label='Open File', command=self.open_file) > > It works. But, I want to make the GUI looking better. So, I want to > change colo

Re: Re: Modifying the value of a float-like object

2009-04-15 Thread Dave Angel
Steven D'Aprano wrote: Oh nonsense. Many programming languages have mutable floats. That's irrelevant. Python doesn't. So introducing one will quite likely alter the OP's code's behavior. It doesn't matter if it's possible, it matters whether the existing code's behav

Re: How to check all elements of a list are same or different

2009-04-15 Thread Paul Rubin
John Posner writes: > # get list of object-IDs > ids = map(lambda x: id(x), mylist) > # ALL THE SAME? ... test whether "average ID" matches "first ID" > sum(ids)/len(ids) == ids[0] I don't think you can rely on id's being the same if what you want is that the values are the same: >>>

Re: How to check all elements of a list are same or different

2009-04-15 Thread John Machin
On Apr 16, 8:14 am, Chris Rebert wrote: > > On Wed, Apr 15, 2009 at 5:49 PM, Chris Rebert wrote: > > >> On Wed, Apr 15, 2009 at 2:36 PM, Gaurav Moghe wrote: > > Thanks for the reply. But I am interested in analysing the contents of just > > one list. For example, > > > list1=[1,2,3,4,5,6] > > S

Re: Equivalent to C bitmasks and enumerations

2009-04-15 Thread Dave Angel
Ulrich Eckhardt wrote: Greetings! I'm currently using Python to implement a set of tests for code that is otherwise written in C. This code was wrapped using Boost.Python and is then loaded into Python as module. What I often have in C is this: // bitfield (several flags combined) #define

Re: Re: How to check all elements of a list are same or different

2009-04-15 Thread John Posner
Scott David Daniels wrote: Assuming you really are going for "is" comparison, how about: max(id(x) for x in mylist) == min(id(x) for x in mylist) It has the advantage that if [id(x) for x in mylist] = [2N, 1N, 3N], you get the answer you desire. Oops -- got me! -John -- http://mail.python

Re: What IDE support python 3.0.1 ?

2009-04-15 Thread Rhodri James
On Wed, 15 Apr 2009 23:51:24 +0100, Deep_Feelings wrote: On Apr 16, 1:45 am, Benjamin Peterson wrote: Deep_Feelings gmail.com> writes: > I want to start learning python and not wanna waste my time learning > python 2.x ,so i need your advise to what IDE to use for python 3.0.1 Why do you

Re: What IDE support python 3.0.1 ?

2009-04-15 Thread Deep_Feelings
On Apr 16, 2:35 am, Ben Finney wrote: > Deep_Feelings writes: > > On Apr 16, 1:45 am, Benjamin Peterson wrote: > > > Why do you think you're wasting time with 2.x? > > > yes.. > > The question was, why do you think that? > > > should i write 2.x code then after a year or so i have to upgrade to

Re: What IDE support python 3.0.1 ?

2009-04-15 Thread Ben Finney
Deep_Feelings writes: > On Apr 16, 1:45 am, Benjamin Peterson wrote: > > Why do you think you're wasting time with 2.x? > > yes.. The question was, why do you think that? > should i write 2.x code then after a year or so i have to upgrade to > 3.0 :( ? What gives you the impression you will

Re: need to start a new project , can python do all that ?

2009-04-15 Thread Deep_Feelings
On Apr 16, 1:59 am, "Rhodri James" wrote: > On Wed, 15 Apr 2009 15:54:45 +0100, Deep_Feelings   > wrote: > > > thank you so much ,rest assured that the code will me tested very well > > (in real world situation) before using it. > > That's not sufficient.  It isn't enough that your program works,

Re: reading arguments in python script when passed from URL

2009-04-15 Thread Rhodri James
On Wed, 15 Apr 2009 07:24:24 +0100, phaneendra s wrote: hi alll.. iam invoking a python script from a standalone client which looks lik this String command="ln -s /usr/lib /tmp/lin"; //creating a soft link URL url = new URL("http://server-name/cgi-bin/finalexec1.py?command= "+comman

Re: How to check all elements of a list are same or different

2009-04-15 Thread Scott David Daniels
John Posner wrote: ...This solution relies on the object ID -- no hashability required: # get list of object-IDs ids = map(lambda x: id(x), mylist) # ALL THE SAME? ... test whether "average ID" matches "first ID" sum(ids)/len(ids) == ids[0] Assuming you really are going for "is" comparison,

Re: Re: How to check all elements of a list are same or different

2009-04-15 Thread Rhodri James
On Wed, 15 Apr 2009 23:56:45 +0100, John Posner wrote: Chris Rebert wrote: Ah, okay. Then you want: def all_same(lst): return len(set(lst)) == 1 def all_different(lst): return len(set(lst)) == len(lst) Note that these require all the elements of the list to be hashable. This solut

Re: need to start a new project , can python do all that ?

2009-04-15 Thread Rhodri James
On Wed, 15 Apr 2009 15:54:45 +0100, Deep_Feelings wrote: thank you so much ,rest assured that the code will me tested very well (in real world situation) before using it. That's not sufficient. It isn't enough that your program works, it also has to satisfy the regulatory authorities other

Re: Re: How to check all elements of a list are same or different

2009-04-15 Thread John Posner
Chris Rebert wrote: Ah, okay. Then you want: def all_same(lst): return len(set(lst)) == 1 def all_different(lst): return len(set(lst)) == len(lst) Note that these require all the elements of the list to be hashable. This solution relies on the object ID -- no hashability required:

Re: What IDE support python 3.0.1 ?

2009-04-15 Thread Deep_Feelings
On Apr 16, 1:45 am, Benjamin Peterson wrote: > Deep_Feelings gmail.com> writes: > > > > > I want to start learning python and not wanna waste my time learning > > python 2.x ,so i need your advise to what IDE to use for python 3.0.1 > > Why do you think you're wasting time with 2.x? yes.. shoul

Re: What IDE support python 3.0.1 ?

2009-04-15 Thread Benjamin Peterson
Deep_Feelings gmail.com> writes: > > I want to start learning python and not wanna waste my time learning > python 2.x ,so i need your advise to what IDE to use for python 3.0.1 Why do you think you're wasting time with 2.x? -- http://mail.python.org/mailman/listinfo/python-list

Re: Testing in Python mailing list broken?

2009-04-15 Thread Scott David Daniels
Scott David Daniels wrote: Does anyone know if the Testing in Python mailing list is broken or turned off? It was running almost too many messages, but now there has been a _huge_ silence. --Scott David Daniels scott.dani...@acm.org Never mind, I've seen a couple posts. -- http://mail.python.o

Re: RELEASED Python 2.6.2

2009-04-15 Thread Scott David Daniels
Barry Warsaw wrote: On behalf of the Python community, I'm happy to announce the availability of Python 2.6.2. This is the latest production-ready version in the Python 2.6 series. Dozens of issues have been fixed since Python 2.6.1 was released back in December. Please see the NEWS file fo

Re: How to check all elements of a list are same or different

2009-04-15 Thread Gaurav Moghe
Thanks! That works! On Wed, Apr 15, 2009 at 6:14 PM, Chris Rebert wrote: > > On Wed, Apr 15, 2009 at 5:49 PM, Chris Rebert wrote: > >> > >> On Wed, Apr 15, 2009 at 2:36 PM, Gaurav Moghe wrote: > >> > Hi, > >> > > >> > I am an amateur python user I wanted to know how do I know whether all > >>

Re: Equivalent to C bitmasks and enumerations

2009-04-15 Thread Wojtek Walczak
On Wed, 15 Apr 2009 12:51:31 +0200, Ulrich Eckhardt wrote: Hi, > I'm currently using Python to implement a set of tests for code that is > otherwise written in C. This code was wrapped using Boost.Python and is > then loaded into Python as module. ... > What I'm looking for is a suggestion how to

What IDE support python 3.0.1 ?

2009-04-15 Thread Deep_Feelings
I want to start learning python and not wanna waste my time learning python 2.x ,so i need your advise to what IDE to use for python 3.0.1 thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: pdftk

2009-04-15 Thread ThomasHeetderks
Bugzilla from r.ba...@fz-juelich.de wrote: > > > Does one know about a python interface to pdftk? > Or something similar which can be used to fill a form by fdf data. > ...Or if you want to return the PDF as a Django response: from subprocess import Popen, PIPE cmd = 'pdftk.exe %s fill_form

Re: How to check all elements of a list are same or different

2009-04-15 Thread Chris Rebert
> On Wed, Apr 15, 2009 at 5:49 PM, Chris Rebert wrote: >> >> On Wed, Apr 15, 2009 at 2:36 PM, Gaurav Moghe wrote: >> > Hi, >> > >> > I am an amateur python user I wanted to know how do I know whether all >> > the >> > contents of a list are all same or all different? Now, I could certainly >> > w

Re: How to check all elements of a list are same or different

2009-04-15 Thread Gaurav Moghe
Hi Chris, Thanks for the reply. But I am interested in analysing the contents of just one list. For example, list1=[1,2,3,4,5,6] So, the logical statement would probably be: if list1==(contains all same values), print "Same">False if list1==(contains all different values), print "Differen

Re: Lambda alternative?

2009-04-15 Thread Paul Rubin
Duncan Booth writes: > dumped = dumps(air) > t = loads(dumped) > print t # works fine Hmm, well, that doesn't really pickle the function; it pickles a class instance that records where the class definition was and (on unpickling) imports that module. Maybe that is sufficient for this purpose. -

Re: How to check all elements of a list are same or different

2009-04-15 Thread Chris Rebert
On Wed, Apr 15, 2009 at 2:36 PM, Gaurav Moghe wrote: > Hi, > > I am an amateur python user I wanted to know how do I know whether all the > contents of a list are all same or all different? Now, I could certainly > write a loop with a counter. But is there a ready command for that? Checked > a lot

python twitter

2009-04-15 Thread Wes James
Anyone know if there is a twit for python? I did http://twitter.com/python, but nope on that I was looking for twit py announcements, etc... thx, -wj -- http://mail.python.org/mailman/listinfo/python-list

How to check all elements of a list are same or different

2009-04-15 Thread Gaurav Moghe
Hi, I am an amateur python user I wanted to know how do I know whether all the contents of a list are all same or all different? Now, I could certainly write a loop with a counter. But is there a ready command for that? Checked a lot of docs and this mailing list, but didnt get anything worthwhile

Re: Interrupt Python C API

2009-04-15 Thread googler . 1 . webmaster
hi, yes, thats true, Alan Touring told us, so it would be nice to let the user abort it. Is there a chance for windows, too? -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] RELEASED Python 2.6.2

2009-04-15 Thread Barry Warsaw
On Apr 15, 2009, at 4:47 PM, Russell E. Owen wrote: Thank you for 2.6.2. I see the Mac binary installer isn't out yet (at least it is not listed on the downloads page). Any chance that it will be compatible with 3rd party Tcl/Tk? Most recent releases have not been; the only way I know to ma

Re: zProblem

2009-04-15 Thread norseman
Gabriel Genellina wrote: En Tue, 14 Apr 2009 18:42:32 -0300, norseman escribió: Gabriel Genellina wrote: En Mon, 13 Apr 2009 15:13:53 -0300, norseman escribió: Gabriel Genellina wrote: Below there is an attempt to reproduce the layout you describe in the PDF: from Tkinter import *

Re: sharing/swapping items between lists

2009-04-15 Thread MRAB
samwyse wrote: On Apr 15, 8:13 am, Aaron Brady wrote: On Apr 15, 6:57 am, samwyse wrote: Here's my idea: generate all possible pairs: import itertools players = [chr(c) for c in xrange(ord('a'),ord('z')+1)] all_pairs = list(itertools.combinations(players,2)) partition the list: def choos

Re: IronPython newbie: not clear on imports and assemblies

2009-04-15 Thread Mike Driscoll
On Apr 15, 3:31 pm, Thomas Gagne wrote: > OK--I also haven't programmed on .NET before. > > My goal is to play with the "EssentialPDF" libraries inside IronPython. >   But I'm not clear on how to import (load?) Essential's .dll files.  Of > course, all the samples files are in C# and VB.  I guess

Re: RELEASED Python 2.6.2

2009-04-15 Thread Ned Deily
In article , "Russell E. Owen" wrote: > I see the Mac binary installer isn't out yet (at least it is not listed > on the downloads page). Any chance that it will be compatible with 3rd > party Tcl/Tk? > > Most recent releases have not been; the only way I know to make a > compatible build is

Re: Lambda alternative?

2009-04-15 Thread Caleb Hattingh
On Wed, 15 Apr 2009 15:47:05 +0200, wrote: But, lambda functions can't be pickled. I would like to pickle my objects, and i would really like to use parallel python (which requires pickling). If you are fixated on using lambda, you could probably use Recipe 7.6: Pickling Code Objects in the

Where to find options for add_command?

2009-04-15 Thread Muddy Coder
Hi Folks, When I make Menu, and add in menu items, by using add_command, such as: menuObj.add_command(label='Open File', command=self.open_file) It works. But, I want to make the GUI looking better. So, I want to change color, font, size, background, for the label of Open File. I got clobbered.

Re: RELEASED Python 2.6.2

2009-04-15 Thread Russell E. Owen
Thank you for 2.6.2. I see the Mac binary installer isn't out yet (at least it is not listed on the downloads page). Any chance that it will be compatible with 3rd party Tcl/Tk? Most recent releases have not been; the only way I know to make a compatible build is to build the installer on a ma

Re: show PDF in wxPython?

2009-04-15 Thread alejandro
Thank you both! -- http://mail.python.org/mailman/listinfo/python-list

Re: Serialization format of gdb trace data between many different machines.

2009-04-15 Thread joshbaptiste
On Apr 15, 2:21 pm, MRAB wrote: > joshbaptiste wrote: > > I have a corewatch.py program on ~400+ Linux machines that collect > > core file gdb output and sends the output traces via email to > > developers. I what to convert the script for all output to be sent to > > a centralized server also wri

Re:

2009-04-15 Thread Benjamin Kaplan
On Wed, Apr 15, 2009 at 4:35 PM, fridash13 wrote: > i am quite new to python ... > > i made a small script ,, for active directory using python > > all the script does is basicly explor the AD for a number of tasks .. > > * 1 .Find a user (quick method) > * 2 .Find a computer (quick method) > * 3

[no subject]

2009-04-15 Thread fridash13
i am quite new to python ... i made a small script ,, for active directory using python all the script does is basicly explor the AD for a number of tasks .. * 1 .Find a user (quick method) * 2 .Find a computer (quick method) * 3 .List all users * 4 .List users in an OU * 5 .List all groups * 6

Re: platform.machine(): ImportError: No module named select

2009-04-15 Thread Ali H. Caliskan
I'm using Arch Linux and the current python version is 2.6.1, so I did create a custom python3 package by myself and tried to install it on /opt directory. I believe it's a installation issue, because I skipped "make test" part during compilation, which failed with some errors. ali > > It should

Re: IronPython newbie: not clear on imports and assemblies

2009-04-15 Thread Benjamin Kaplan
On Wed, Apr 15, 2009 at 4:31 PM, Thomas Gagne wrote: > OK--I also haven't programmed on .NET before. > > My goal is to play with the "EssentialPDF" libraries inside IronPython. > But I'm not clear on how to import (load?) Essential's .dll files. Of > course, all the samples files are in C# and V

[no subject]

2009-04-15 Thread fridash13
i am quite new to python ... i made a small script ,, for active directory using python all the script does is basicly explor the AD for a number of tasks .. * 1 .Find a user (quick method) * 2 .Find a computer (quick method) * 3 .List all users * 4 .List users in an OU * 5 .List all groups * 6

WHIFF - was: Re: Using Python after a few years of Ruby

2009-04-15 Thread Gerhard Häring
Aaron Watters wrote: > On Apr 15, 3:49 am, Tim Hoffman wrote: > >> There are plenty of python web frameworks, some have quite different >> approaches, >> what suits you will depend very much on your own bias, interest. > > I've had a lot of luck with WHIFF > ( http://whiff.sourceforge.net ) > Of

Re: need to start a new project , can python do all that ?

2009-04-15 Thread Stef Mientki
there's even already written an EPD in Python, but I can't find it right now, googling is difficult, because EPD stand for the more popular Ebthought Python Distro :-( cheers, Stef -- http://mail.python.org/mailman/listinfo/python-list

IronPython newbie: not clear on imports and assemblies

2009-04-15 Thread Thomas Gagne
OK--I also haven't programmed on .NET before. My goal is to play with the "EssentialPDF" libraries inside IronPython. But I'm not clear on how to import (load?) Essential's .dll files. Of course, all the samples files are in C# and VB. I guess I"m wondering if Essential's libraries (assembl

Testing in Python mailing list broken?

2009-04-15 Thread Scott David Daniels
Does anyone know if the Testing in Python mailing list is broken or turned off? It was running almost too many messages, but now there has been a _huge_ silence. --Scott David Daniels scott.dani...@acm.org -- http://mail.python.org/mailman/listinfo/python-list

Re: platform.machine(): ImportError: No module named select

2009-04-15 Thread Ned Deily
In article , "Ali H. Caliskan" wrote: > I'm trying to use "platform.machine()" function, but it doesn't work on > python 3.0.1. Am I doing something wrong here or is it suppose to not work > on py3k? The errors I get while using the python interpreter: > > >>> import platform > >>> platform.mac

Re: need to start a new project , can python do all that ?

2009-04-15 Thread Deep_Feelings
now going into python i found that python 3 is just out but recourses are limited (including IDEs) any help on that ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Modifying the value of a float-like object

2009-04-15 Thread Dan Goodman
eric.le.bi...@spectro.jussieu.fr wrote: I initially tried to create a Float_ref class that inherits from numpy.array, so that objects of the new class behave like numpy.array in calculations, but also contain an "uncertainty" atribute, but this is apparently not allowed ("cannot create 'builtin_f

Re: Equivalent to C bitmasks and enumerations

2009-04-15 Thread Scott David Daniels
Ulrich Eckhardt wrote: Greetings! I'm currently using Python to implement a set of tests for code that is otherwise written in C. This code was wrapped using Boost.Python and is then loaded into Python as module. What I often have in C is this: // bitfield (several flags combined) #define

Re: [Python-Dev] Correction: Python Bug Day on April 25

2009-04-15 Thread Maciej Fijalkowski
On Wed, Apr 15, 2009 at 1:10 PM, Georg Brandl wrote: > Hi, > > I managed to screw up the date, so here it goes again: > > I'd like to announce that there will be a Python Bug Day on April 25. > As always, this is a perfect opportunity to get involved in Python > development, or bring your own issu

Re: zProblem

2009-04-15 Thread norseman
Steven D'Aprano wrote: On Tue, 14 Apr 2009 14:42:32 -0700, norseman wrote: Grids are uniform! Same size, non-changing across whole backdrop. There is nothing in uniform that says X==Y. Units along axis need not be same. Corners don't even have to be 90degrees. (Spherical) But they must measur

Re: ANN: PyGUI 2.0.1

2009-04-15 Thread Suraj Barkale
Greg Ewing canterbury.ac.nz> writes: > > PyGUI 2.0.1 is available: > Thank you very much for this GUI toolkit. I always wanted something like this on windows. I installed this and tried out the tests on Python 2.6.1 and Windows XP SP3. Following are my observations. I will try to send some patch

Correction: Python Bug Day on April 25

2009-04-15 Thread Georg Brandl
Hi, I managed to screw up the date, so here it goes again: I'd like to announce that there will be a Python Bug Day on April 25. As always, this is a perfect opportunity to get involved in Python development, or bring your own issues to attention, discuss them and (hopefully) resolve them togethe

Re: binary file compare...

2009-04-15 Thread Nigel Rantor
Adam Olsen wrote: The chance of *accidentally* producing a collision, although technically possible, is so extraordinarily rare that it's completely overshadowed by the risk of a hardware or software failure producing an incorrect result. Not when you're using them to compare lots of files. Tr

Re: binary file compare...

2009-04-15 Thread Adam Olsen
On Apr 15, 11:04 am, Nigel Rantor wrote: > The fact that two md5 hashes are equal does not mean that the sources > they were generated from are equal. To do that you must still perform a > byte-by-byte comparison which is much less work for the processor than > generating an md5 or sha hash. > > I

Re: Unable to abort a FTP command?

2009-04-15 Thread Scott David Daniels
_...@163.com wrote: Thank you. You are right, retrbinary did not notice I want to abort, so it won't break the recv loop and close data connection def getpart(self, ftp_filename, rest, cnt, out_filename): self.outf = open(out_filename, 'wb') self.cnt = cnt self.han

platform.machine(): ImportError: No module named select

2009-04-15 Thread Ali H. Caliskan
Hi! I'm trying to use "platform.machine()" function, but it doesn't work on python 3.0.1. Am I doing something wrong here or is it suppose to not work on py3k? The errors I get while using the python interpreter: >>> import platform >>> platform.machine() Traceback (most recent call last): File

Re: Serialization format of gdb trace data between many different machines.

2009-04-15 Thread MRAB
joshbaptiste wrote: I have a corewatch.py program on ~400+ Linux machines that collect core file gdb output and sends the output traces via email to developers. I what to convert the script for all output to be sent to a centralized server also written in python and displayed via webpage. My fir

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-15 Thread M.-A. Lemburg
On 2009-04-15 19:59, P.J. Eby wrote: > At 06:15 PM 4/15/2009 +0200, M.-A. Lemburg wrote: >> The much more common use case is that of wanting to have a base package >> installation which optional add-ons that live in the same logical >> package namespace. > > Please see the large number of Zope and

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-15 Thread James Y Knight
On Apr 15, 2009, at 12:15 PM, M.-A. Lemburg wrote: The much more common use case is that of wanting to have a base package installation which optional add-ons that live in the same logical package namespace. The PEP provides a way to solve this use case by giving both developers and users

Serialization format of gdb trace data between many different machines.

2009-04-15 Thread joshbaptiste
I have a corewatch.py program on ~400+ Linux machines that collect core file gdb output and sends the output traces via email to developers. I what to convert the script for all output to be sent to a centralized server also written in python and displayed via webpage. My first thought was a simpl

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-15 Thread M.-A. Lemburg
On 2009-04-15 19:38, James Y Knight wrote: > > On Apr 15, 2009, at 12:15 PM, M.-A. Lemburg wrote: > >> The much more common use case is that of wanting to have a base package >> installation which optional add-ons that live in the same logical >> package namespace. >> >> The PEP provides a way to

Re: sharing/swapping items between lists

2009-04-15 Thread Aaron Brady
On Apr 15, 11:29 am, samwyse wrote: > On Apr 15, 8:56 am, Aaron Brady wrote: > > > > > The randomizing solution isn't quite suitable for 16 teams.  With 5 > > teams/1 court, and 5 teams/2 courts, 6 teams/2 courts, the solution > > comes within seconds.  For 7 teams/3 courts, the solution takes a

Re: segmentation fault while using ctypes

2009-04-15 Thread sanket
On Apr 14, 9:00 pm, bieff...@gmail.com wrote: > On Apr 15, 12:39 am, sanket wrote: > > > > > Hello All, > > > I am dealing with this weird bug. > > I have a function in C and I have written python bindings for it using > > ctypes. > > > I can call this function for couple of times and then suddenl

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-15 Thread P.J. Eby
At 06:15 PM 4/15/2009 +0200, M.-A. Lemburg wrote: The much more common use case is that of wanting to have a base package installation which optional add-ons that live in the same logical package namespace. Please see the large number of Zope and PEAK distributions on PyPI as minimal examples

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-15 Thread P.J. Eby
At 09:10 AM 4/15/2009 -0700, Aahz wrote: For the benefit of us bystanders, could you summarize your vote at this point? Given the PEP's intended goals, if you do not oppose the PEP, are there any changes you think should be made? I'm +1 on Martin's original version of the PEP, subject to the p

Re: How to query object of GUI?

2009-04-15 Thread Scott David Daniels
John McMonagle wrote: Muddy Coder wrote: I need to query the ID of GUI, in Tkinter, but don't know how to do it. This is my code: ... Pass the name of the label as an argument to the callback. Below is a short working example: ... lab = 'test' menubar.add_command(label=lab, comman

Re: binary file compare...

2009-04-15 Thread SpreadTooThin
On Apr 15, 8:04 am, Grant Edwards wrote: > On 2009-04-15, Martin wrote: > > > > > Hi, > > > On Mon, Apr 13, 2009 at 10:03 PM, Grant Edwards wrote: > >> On 2009-04-13, SpreadTooThin wrote: > > >>> I want to compare two binary files and see if they are the same. > >>> I see the filecmp.cmp functi

Re: Using Python after a few years of Ruby

2009-04-15 Thread Aaron Watters
On Apr 15, 3:49 am, Tim Hoffman wrote: > There are plenty of python web frameworks, some have quite different > approaches, > what suits you will depend very much on your own bias, interest. I've had a lot of luck with WHIFF ( http://whiff.sourceforge.net ) Of course I wrote it and just released

Re: Play sound at wanted frequency

2009-04-15 Thread Scott David Daniels
Diez B. Roggisch wrote: Matteo schrieb: I need to playback a sound on a linux machine of a pre-determined frequency like, say, 440 Hz. How can I do that with python? I found the ossaudiodev package, but it says that the ossaudiodev.write() method accepts data as a raw string. It doesn't explain

Re: Modifying the value of a float-like object

2009-04-15 Thread Suraj Barkale
spectro.jussieu.fr> writes: > > Hello, > > Is there a way to easily build an object that behaves exactly like a > float, but whose value can be changed? The goal is to maintain a list > [x, y,…] of these float-like objects, and to modify their value on the > fly (with something like x.value =

Re: binary file compare...

2009-04-15 Thread Nigel Rantor
Grant Edwards wrote: We all rail against premature optimization, but using a checksum instead of a direct comparison is premature unoptimization. ;) And more than that, will provide false positives for some inputs. So, basically it's a worse-than-useless approach for determining if two files

Re: binary file compare...

2009-04-15 Thread Nigel Rantor
Martin wrote: On Wed, Apr 15, 2009 at 11:03 AM, Steven D'Aprano wrote: The checksum does look at every byte in each file. Checksumming isn't a way to avoid looking at each byte of the two files, it is a way of mapping all the bytes to a single number. My understanding of the original question

Re: Question to python C API

2009-04-15 Thread Stefan Behnel
Andreas Otto wrote: > I have the following question ... > > I write a custom "*.init" method and expect a variable number or arguments What's a "*.init" method? Do you mean SomeType.__init__() ? > This are my questions: > > 1.I need something like a for loop to analyse this argumen

Re: Lambda alternative?

2009-04-15 Thread Duncan Booth
mousemeat wrote: > Will i then be able to pickle 'rock', and any object that may contain > 'rock' as one of it's fields? I'm not sure that i will, but i'll give > it a shot. > So long as the functions are defined at module level, not nested inside some other namespace it will work fine. -- htt

Re: Lambda alternative?

2009-04-15 Thread Duncan Booth
Paul Rubin wrote: > Duncan Booth writes: >> What exactly is your objection to using a named function here?... >> Surely that would solve your pickle problem *and* give you more >> meaningful tracebacks in your exceptions? > > I don't think it would help the pickle

Re: Python Bug Day on April 23

2009-04-15 Thread MRAB
Georg Brandl wrote: Hi, I'd like to announce that there will be a Python Bug Day on April 23. As always, this is a perfect opportunity to get involved in Python development, or bring your own issues to attention, discuss them and (hopefully) resolve them together with the core developers. We wi

Re: Python and XML Help

2009-04-15 Thread Scott David Daniels
ookrin wrote: I am still learning. And it's not that I won't take the advice for using ElementTree, I just currently don't know anything about it. I just didn't want to say, "I have no idea what you're talking about!" to Scott cause I figured that would be rude, but I guess so is not saying

  1   2   >