pycap piano roll drum machine system 1.0

2009-04-14 Thread edexter
Pycap piano/drum machine system is at 1.0. To install install the demo and then copy the latest file over it.. in this release fixed the save file. text to describe the colums is loaded from a text file that can be defined befour use. buttons are bigger. help file to do: cosmetic stuff like

[ANN] OPy Meeting - April 23, 2009 at Noon in One Partner's Place

2009-04-14 Thread Kevin D . Smith
The next OPy meeting will be held in the Alpha Room in One Partner's Place (near the National Weather Center) on April 23, 2009 at noon.  Ryan May will be giving an introduction to Python 3.  We will be having a drawing for two prizes donated by the Pearson Education User Group Program.  Since

Re: Can I import from a directory that starts with a dot (.) ?

2009-04-14 Thread Jason Scheirer
On Apr 13, 5:51 pm, Matthew Wilson m...@tplus1.com wrote: I want to have .foo directory that contains some python code.  I can't figure out how to import code from that .foo directory.  Is this even possible? TIA Matt Yes, but it's not a particularly recommended thing to do as it is CRAZY.

Re: Can I import from a directory that starts with a dot (.) ?

2009-04-14 Thread Gary Herron
Matthew Wilson wrote: I want to have .foo directory that contains some python code. I can't figure out how to import code from that .foo directory. Is this even possible? TIA Matt -- http://mail.python.org/mailman/listinfo/python-list Python starts up with a list of directories to search

Re: zProblem

2009-04-14 Thread Gabriel Genellina
En Mon, 13 Apr 2009 15:13:53 -0300, norseman norse...@hughes.net escribió: Gabriel Genellina wrote: Now, if ... summarizes your problem, I think you should use the place geometry manager, not grid (nor pack). The Tkinter documentation [1] is rather short but the Tcl docs [2] have more

Re: how to fit a gamma distribution

2009-04-14 Thread Kushal Kumaran
On Tue, Apr 14, 2009 at 6:51 AM, ning luwen ninglu...@gmail.com wrote: i already have tried. and try to  use the module scipy.optimize.leastsq to fit, but neither get a good return or just break out like this. is there any other good way?or something wrong with my code? I suggest you try

Using Python after a few years of Ruby

2009-04-14 Thread blahemailblah
Although I'm not 100% new to Python, most of my experience using high- level languages is with Ruby. I had a job doing Rails web development a little ways back and I really enjoyed it. At my current workplace though, we're looking at using Python and I'm trying to get back into the Python groove

Re: Using Python after a few years of Ruby

2009-04-14 Thread Jason Scheirer
On Apr 14, 12:01 am, blahemailb...@gmail.com wrote: Although I'm not 100% new to Python, most of my experience using high- level languages is with Ruby. I had a job doing Rails web development a little ways back and I really enjoyed it. At my current workplace though, we're looking at using

read file with multiple data per line

2009-04-14 Thread Eduardo
Hello all, I googled a lot but couldn't find anything that i could consider a possible solution (though i am fairly new to the language and i think this is the main cause of my failure). This is the beginning of the file i have to parse: Modified System 32728 2NHST1 C1 56

Re: read file with multiple data per line

2009-04-14 Thread Steven D'Aprano
On Tue, 14 Apr 2009 00:15:18 -0700, Eduardo wrote: Hello all, I googled a lot but couldn't find anything that i could consider a possible solution (though i am fairly new to the language and i think this is the main cause of my failure). You haven't actually said what the problem is. What

ctypes - random access to address space

2009-04-14 Thread janislaw
Hi, I am currently doing a project in which I interface to a PCI card. To ease the prototyping, I call the API functions, which map the address space of the card to a process memory. I acquire the location in the process memory mapped to an address space using card API, resulting in a c

Re: ctypes - random access to address space

2009-04-14 Thread Diez B. Roggisch
janislaw schrieb: Hi, I am currently doing a project in which I interface to a PCI card. To ease the prototyping, I call the API functions, which map the address space of the card to a process memory. I acquire the location in the process memory mapped to an address space using card API,

Re: sending and receiving ipv6 multicasts

2009-04-14 Thread Kai Timmer
On 13 Apr., 19:51, Martin v. Löwis mar...@v.loewis.de wrote: On the receiving side, you also need to set the IPV6_JOIN_GROUP socket option - else your kernel doesn't know you are interested in packets for that address. You need to bind to the multicast port, and optionally to the multicast

Should we separate business logic and ORM mapping classes?

2009-04-14 Thread 一首诗
Hi, ( First, this is not a question about if we should use ORM. It's question for these who are already using it. ) Usually, I only use ORM, like sqlalchemy just as an abstraction layer of database. So these mapping objects I wrote only contains data but not behavior. For example, if I have

Re: sharing/swapping items between lists

2009-04-14 Thread Aaron Brady
On Apr 13, 11:52 pm, Aaron Brady castiro...@gmail.com wrote: On Apr 13, 10:04 am, Ross ross.j...@gmail.com wrote: On Apr 11, 1:10 pm, a...@pythoncraft.com (Aahz) wrote: In article 4fd78ac3-ba83-456b-b768-3a0043548...@f19g2000vbf.googlegroups.com, Ross  ross.j...@gmail.com wrote:

Downloading folders from a server

2009-04-14 Thread zaheer . agadi
Hi , I am trying to download folders using webDAV Protocol, I want to download the folders which in turn have many other folders. I am trying to read each and every folder and create the folder locally.How do I do this? If I have a folder structure like the following Folder1 | |_

Re: Should we separate business logic and ORM mapping classes?

2009-04-14 Thread Diez B. Roggisch
一首诗 wrote: Hi, ( First, this is not a question about if we should use ORM. It's question for these who are already using it. ) Usually, I only use ORM, like sqlalchemy just as an abstraction layer of database. So these mapping objects I wrote only contains data but not behavior.

Nicing a thread

2009-04-14 Thread jesper
Hi, I would like to spawn a thread (on Unix) with a lower priority (higher niceness) than the main thread (which should stay at nice 0). What I have done is something like: import threading, os class MyThread(threading.Thread): def __init__(self): threading.Thread.__init__(self)

Re: Automatically generating arithmetic operations for a subclass

2009-04-14 Thread Arnaud Delobelle
Arnaud Delobelle arno...@googlemail.com writes: binops = ['add', 'sub', 'mul', 'div', 'radd', 'rsub'] # etc unops = ['neg', 'abs', invert'] # etc Oops. There's a missing quote above. It should have been, of course: unops = ['neg', 'abs', 'invert'] # etc binop_meth = def __%s__(self,

Re: Python inside C++

2009-04-14 Thread Ken Seehart
AJ Mayorga wrote: Hello all, I am looking for a way to statically compile pythonxx.dll into my C++ application, so that I can use It as an internal scripting language and either run the native python code or take an ELF from py2exe/pyinstaller and run that. The machines that will have

Automatically generating arithmetic operations for a subclass

2009-04-14 Thread Steven D'Aprano
I have a subclass of int where I want all the standard arithmetic operators to return my subclass, but with no other differences: class MyInt(int): def __add__(self, other): return self.__class__(super(MyInt, self).__add__(other)) # and so on for __mul__, __sub__, etc. My

Re: Automatically generating arithmetic operations for a subclass

2009-04-14 Thread Paul McGuire
On Apr 14, 4:09 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: I have a subclass of int where I want all the standard arithmetic operators to return my subclass, but with no other differences: class MyInt(int):     def __add__(self, other):         return

Re: Using Python after a few years of Ruby

2009-04-14 Thread Stefaan Himpe
Hi, 1) Is there anything like a Python build tool? (Or do I even need something like that?) If you're going to run the python source code, you don't need anything. Python builds what it needs automagically. Some tools exist to build stand-alone executables though, if you'd like to do so (e.g.

Re: Automatically generating arithmetic operations for a subclass

2009-04-14 Thread Gerard Flanagan
Steven D'Aprano wrote: I have a subclass of int where I want all the standard arithmetic operators to return my subclass, but with no other differences: class MyInt(int): def __add__(self, other): return self.__class__(super(MyInt, self).__add__(other)) # and so on for __mul__,

Re: Python inside C++

2009-04-14 Thread Christian Heimes
Ken Seehart wrote: Picky note: The phrase statically compile pythonxx.dll into my C++ application is not quite correct. A DLL is dynamically linked, not statically linked. All this means is that you ship pythonxx.dll with your application along with any other DLLs and pyd files you might

Re: Automatically generating arithmetic operations for a subclass

2009-04-14 Thread andrew cooke
Arnaud Delobelle wrote: I do this: binops = ['add', 'sub', 'mul', 'div', 'radd', 'rsub'] # etc unops = ['neg', 'abs', invert'] # etc binop_meth = def __%s__(self, other): return type(self)(int.__%s__(self, other)) unop_meth = def __%s__(self): return

Re: ANN: PyGUI 2.0

2009-04-14 Thread greg
Terry Reedy wrote: Does it work with 3.0? As it stands, almost certainly not. But you're welcome to try running it through 2to3 and see what happens. Relevant libraries would have to be available for 3.0 as well -- not sure what the state of play is there. -- Greg --

binary file compare...

2009-04-14 Thread SpreadTooThin
I want to compare two binary files and see if they are the same. I see the filecmp.cmp function but I don't get a warm fuzzy feeling that it is doing a byte by byte comparison of two files to see if they are they same. What should I be using if not filecmp.cmp? --

Re: How to create a virtual serial port?

2009-04-14 Thread JanC
Scott David Daniels wrote: I'ms confused by this statement. What physical connector does your serial port use to get the serial data to the Mac? I only have one 3-year old Mac laptop to look at, and I just don't see anything that I would call a serial port. USB *is* a serial port...

win32 wins settings

2009-04-14 Thread Toff
hello I don't understand why this doesn't woks. def setwins(self): from win32com.client import GetObject objWMIService = GetObject(winmgmts: {impersonationLevel=impersonate}!.\\root\\cimv2) colNicConfigs = objWMIService.ExecQuery (SELECT * FROM

Re: Automatically generating arithmetic operations for a subclass

2009-04-14 Thread Diez B. Roggisch
andrew cooke wrote: Arnaud Delobelle wrote: I do this: binops = ['add', 'sub', 'mul', 'div', 'radd', 'rsub'] # etc unops = ['neg', 'abs', invert'] # etc binop_meth = def __%s__(self, other): return type(self)(int.__%s__(self, other)) unop_meth = def __%s__(self): return

Re: read file with multiple data per line

2009-04-14 Thread Piet van Oostrum
Eduardo edumlo...@gmail.com (E) wrote: E Hello all, E I googled a lot but couldn't find anything that i could consider a E possible solution (though i am fairly new to the language and i think E this is the main cause of my failure). E This is the beginning of the file i have to parse: E

Re: Automatically generating arithmetic operations for a subclass

2009-04-14 Thread Arnaud Delobelle
Steven D'Aprano ste...@remove.this.cybersource.com.au writes: I have a subclass of int where I want all the standard arithmetic operators to return my subclass, but with no other differences: class MyInt(int): def __add__(self, other): return self.__class__(super(MyInt,

Re: any(), all() and empty iterable

2009-04-14 Thread Tim Chase
Peter Pearson wrote: On Sun, 12 Apr 2009 06:53:24 -0500, Tim Chase wrote: From the docs: all(iterable) Return True if all elements of the iterable are true. Equivalent to: def all(iterable): for element in iterable: if not

Re: design question, metaclasses?

2009-04-14 Thread Piet van Oostrum
Darren Dale dsdal...@gmail.com (DD) wrote: DD On Apr 11, 2:15 pm, Darren Dale dsdal...@gmail.com wrote: I am working on a project that provides a high level interface to hdf5 files by implementing a thin wrapper around h5py. I would like to generalize the project so the same API can be used

Re: path to executing .py file

2009-04-14 Thread MRAB
tiefeng wu wrote: Hello everybody! I'm working on my code repository (svn) auto-backup script which get hotcopy of svn repository directory to a directory named by date in same location where script file is, it executed by a timer program every 00:00 clock. Everything works fine when I'm

how to know argument name with which a function of extended c called

2009-04-14 Thread rahul
Hi, i need to write a 'c extension function' in this function i need to change argument value with which this function called. ie, if a python code like import changeValue as c arg=old value c.changeValue(arg) print arg then it print

Re: sharing/swapping items between lists

2009-04-14 Thread Aahz
In article f64c9de2-3285-4f74-adb8-2111c78b7...@37g2000yqp.googlegroups.com, Ross ross.j...@gmail.com wrote: On Apr 13, 9:08=A0am, a...@pythoncraft.com (Aahz) wrote: In article c569228f-f391-4317-83a2-08621c601...@r8g2000yql.googlegroups.= com, Ross =A0ross.j...@gmail.com wrote: I'm sorry...my

Re: wxpython question

2009-04-14 Thread Mike Driscoll
On Apr 13, 9:12 pm, Clemens Anhuth blackw...@nexgo.de wrote: isam uraiqat wrote: I HATE VISTA!! it just needed to be installed on the site packages library, because it was installed by default on program files, hope this might help another poor vista user Hello. Can you explain?

Modifying the value of a float-like object

2009-04-14 Thread Eric . Le . Bigot
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 = 3.14) so that any expression like x +y uses

Re: Automatically generating arithmetic operations for a subclass

2009-04-14 Thread Arnaud Delobelle
andrew cooke and...@acooke.org writes: Arnaud Delobelle wrote: I do this: binops = ['add', 'sub', 'mul', 'div', 'radd', 'rsub'] # etc unops = ['neg', 'abs', invert'] # etc binop_meth = def __%s__(self, other): return type(self)(int.__%s__(self, other)) unop_meth = def

Re: how to know argument name with which a function of extended c called

2009-04-14 Thread John Machin
On Apr 14, 10:35 pm, rahul rahul03...@gmail.com wrote: Hi,   i need to write a 'c extension function' in this function i need to change argument value with  which this function called. The appropriate way for a function to give output is to return a value, or a tuple of values. example: def

Re: any(), all() and empty iterable

2009-04-14 Thread Arnaud Delobelle
Tim Chase python.l...@tim.thechases.com writes: Peter Pearson wrote: On Sun, 12 Apr 2009 06:53:24 -0500, Tim Chase wrote: From the docs: all(iterable) Return True if all elements of the iterable are true. Equivalent to: def all(iterable):

Re: how to know argument name with which a function of extended c called

2009-04-14 Thread Arnaud Delobelle
rahul rahul03...@gmail.com writes: Hi, i need to write a 'c extension function' in this function i need to change argument value with which this function called. ie, if a python code like import changeValue as c arg=old value

Re: ValueError: I/O operation on closed file

2009-04-14 Thread Vinay Sajip
On Apr 14, 6:43 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Mon, 13 Apr 2009 16:44:44 -0700 (PDT), dj d.a.aberna...@gmail.com And Dennis' revised script works for me on Python 2.6 and [after converting print x to print(x)] Python 3.0 (both ActivePython installations). Regards, Vinay

iPython help, Docstring [source file open failed]

2009-04-14 Thread Kegan
I use iPython installed from macport. When I am in the iPython shell, I do the following: In [8]: from datetime import timedelta In [9]: timedelta?? Type: type Base Class: type 'type' String Form:type 'datetime.timedelta' Namespace: Interactive File:

Re: Automatically generating arithmetic operations for a subclass

2009-04-14 Thread andrew cooke
Arnaud Delobelle wrote: andrew cooke and...@acooke.org writes: Arnaud Delobelle wrote: class MyInt(int): for op in binops: exec binop_meth % (op, op) for op in unops: exec unop_meth % (op, op) del op what's the del for? Without it, 'op' would end

Re: any(), all() and empty iterable

2009-04-14 Thread Carl Banks
On Apr 12, 10:45 am, Tim Chase python.l...@tim.thechases.com wrote: That's why you ask Do you have any books called 'Robinson Crusoe'? rather than Are all your books called 'Robinson Crusoe'?. Mu.  If I don't have any books...Have you stopped beating all your wives?  The question makes the

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

2009-04-14 Thread M.-A. Lemburg
On 2009-04-07 19:46, P.J. Eby wrote: At 04:58 PM 4/7/2009 +0200, M.-A. Lemburg wrote: On 2009-04-07 16:05, P.J. Eby wrote: At 02:30 PM 4/7/2009 +0200, M.-A. Lemburg wrote: Wouldn't it be better to stick with a simpler approach and look for __pkg__.py files to detect namespace packages

Re: any(), all() and empty iterable

2009-04-14 Thread John Posner
Tim Chase wrote: I still prefer Return False if any element of the iterable is not true or Return False if any element in the iterable is false because that describes exactly what the algorithm does. Granted, anybody with a mote of Python skills can tell that from the algorithm, but if you're

Re: Modifying the value of a float-like object

2009-04-14 Thread Eric . Le . Bigot
It looks like what is needed here are a kind of mutable float. Is there a simple way of creating such a type? I don't mind changing the value through x.value = 1.23 instead of x = 1.23... :) On Apr 14, 3:03 pm, eric.le.bi...@spectro.jussieu.fr wrote: Hello, Is there a way to easily build an

Help with run command + variable.

2009-04-14 Thread Daniel Holm
Hi everybody, I'm creating my first app (SixA @ http://www.launchpad/gsixaxis) and I have gtk.combobox to chose a profile. When a profile is chosen I save the profiles name as a variable, and now I want to combine a command with the variable. Lets say that the user choses th profile firefox.

Re: Modifying the value of a float-like object

2009-04-14 Thread David Robinow
On Tue, Apr 14, 2009 at 9:03 AM, eric.le.bi...@spectro.jussieu.fr wrote: 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

Re: Modifying the value of a float-like object

2009-04-14 Thread David Smith
eric.le.bi...@spectro.jussieu.fr wrote: It looks like what is needed here are a kind of mutable float. Is there a simple way of creating such a type? I don't mind changing the value through x.value = 1.23 instead of x = 1.23... :) On Apr 14, 3:03 pm, eric.le.bi...@spectro.jussieu.fr wrote:

Re: Modifying the value of a float-like object

2009-04-14 Thread Christian Heimes
eric.le.bi...@spectro.jussieu.fr wrote: 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

subprocess: reading from stdout hangs process termination, waiting for ENTER keyboard signal

2009-04-14 Thread giohappy
Hello everyone. I'm trying to use subprocess module to launch a Windows console application. The application prints some results to standard output and then waits for the user to press any key to terminte. I can't control this behaviour, as the application is not mine... I'm stuck at the very

Re: Modifying the value of a float-like object

2009-04-14 Thread MRAB
Christian Heimes wrote: eric.le.bi...@spectro.jussieu.fr wrote: 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

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

2009-04-14 Thread P.J. Eby
At 05:02 PM 4/14/2009 +0200, M.-A. Lemburg wrote: I don't see the emphasis in the PEP on Linux distribution support and the remote possibility of them wanting to combine separate packages back into one package as good argument for adding yet another separate hierarchy of special files which

Re: Modifying the value of a float-like object

2009-04-14 Thread Peter Otten
eric.le.bi...@spectro.jussieu.fr wrote: Alternatively, I'd be happy with a way of handling numerical uncertainties in Python calculations (such as in calculate the value and uncertainty of a*sin(b) knowing that a=3.0 +/- 0.1 and b=1.00 +/- 0.01). Naive no warranties implementation: from

Re: subprocess: reading from stdout hangs process termination, waiting for ENTER keyboard signal

2009-04-14 Thread MRAB
giohappy wrote: Hello everyone. I'm trying to use subprocess module to launch a Windows console application. The application prints some results to standard output and then waits for the user to press any key to terminte. I can't control this behaviour, as the application is not mine... I'm

Re: read file with multiple data per line

2009-04-14 Thread Eduardo
On Apr 14, 12:32 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Tue, 14 Apr 2009 00:15:18 -0700, Eduardo wrote: Hello all, I googled a lot but couldn't find anything that i could consider a possible solution (though i am fairly new to the language and i think this is

Re: ANN: PyGUI 2.0

2009-04-14 Thread Terry Reedy
greg wrote: Terry Reedy wrote: Does it work with 3.0? As it stands, almost certainly not. But you're welcome to try running it through 2to3 and see what happens. Relevant libraries would have to be available for 3.0 as well -- not sure what the state of play is there. Probably something

History of python syntax development?

2009-04-14 Thread Ritwik
Hi all, I'm doing some work in programming languages and I'm looking for a short history of python development, from the point of view of the initial development of the syntax. I know I can go through the mailing lists and news groups (and I am doing that at the moment), and the python history

Re: Automatically generating arithmetic operations for a subclass

2009-04-14 Thread Sebastian Wiesner
Steven D'Aprano – Dienstag, 14. April 2009 11:09 I have a subclass of int where I want all the standard arithmetic operators to return my subclass, but with no other differences: class MyInt(int): def __add__(self, other): return self.__class__(super(MyInt,

Re: History of python syntax development?

2009-04-14 Thread Daniel Fetchinson
I'm doing some work in programming languages and I'm looking for a short history of python development, from the point of view of the initial development of the syntax. I know I can go through the mailing lists and news groups (and I am doing that at the moment), and the python history blog

ANNOUNCING Tahoe-LAFS v1.4

2009-04-14 Thread zooko
ANNOUNCING Tahoe, the Least-Authority Filesystem, v1.4 The allmydata.org team is pleased to announce the release of version 1.4.1 of Tahoe, the Lightweight-Authorization Filesystem. This is the first release of Tahoe-LAFS which was created solely as a labor of love by volunteers -- it is no

Re: sharing/swapping items between lists

2009-04-14 Thread Ross
On Apr 14, 5:57 am, a...@pythoncraft.com (Aahz) wrote: In article f64c9de2-3285-4f74-adb8-2111c78b7...@37g2000yqp.googlegroups.com, Ross  ross.j...@gmail.com wrote: On Apr 13, 9:08=A0am, a...@pythoncraft.com (Aahz) wrote: In article

Re: sharing/swapping items between lists

2009-04-14 Thread Ross
On Apr 14, 10:34 am, Ross ross.j...@gmail.com wrote: On Apr 14, 5:57 am, a...@pythoncraft.com (Aahz) wrote: In article f64c9de2-3285-4f74-adb8-2111c78b7...@37g2000yqp.googlegroups.com, Ross  ross.j...@gmail.com wrote: On Apr 13, 9:08=A0am, a...@pythoncraft.com (Aahz) wrote: In

Re: any(), all() and empty iterable

2009-04-14 Thread John O'Hagan
On Tue, 14 Apr 2009, Carl Banks wrote: On Apr 12, 10:45 am, Tim Chase python.l...@tim.thechases.com wrote: That's why you ask Do you have any books called 'Robinson Crusoe'? rather than Are all your books called 'Robinson Crusoe'?. Mu.  If I don't have any books...Have you stopped

show PDF in wxPython?

2009-04-14 Thread alejandro
I would like to import a pdf in a wxPython widget, but didn't find any solution. The imported PDF should work like if it were open in IE or Mozilla... Sugestions? Solutions? P.S. I would like to thank Dennis Lee Bieber for the help about parallel ports... I forgot to do it :-( --

Re: any(), all() and empty iterable

2009-04-14 Thread Luis Alberto Zarrabeitia Gomez
Quoting John O'Hagan resea...@johnohagan.com: An exception, or at least a specific mention of the case of empty iterables in the docs (as Tim Chase suggested), would have baffled me less than my program telling me that the same items were both ubiquitous and entirely absent from a list of

Re: sending and receiving ipv6 multicasts

2009-04-14 Thread Martin v. Löwis
I get the following error: socket.error: [Errno 22] Invalid argument. So it complains about the multicast address. The fragment py import socket py s = socket.inet_pton(socket.AF_INET6, ff02::1) py sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) py sock.bind(('', 9090)) py

Re: Using Python after a few years of Ruby

2009-04-14 Thread Emmanuel Surleau
Hi 1) Is there anything like a Python build tool? (Or do I even need something like that?) If you're going to run the python source code, you don't need anything. Python builds what it needs automagically. Some tools exist to build stand-alone executables though, if you'd like to do so

Re: Using Python after a few years of Ruby

2009-04-14 Thread Emmanuel Surleau
Hi there, Ruby transfuge too. Although I'm not 100% new to Python, most of my experience using high- level languages is with Ruby. I had a job doing Rails web development a little ways back and I really enjoyed it. At my current workplace though, we're looking at using Python and I'm trying

Re: ANN: PyGUI 2.0

2009-04-14 Thread member thudfoo
On Tue, Apr 14, 2009 at 10:02 AM, Terry Reedy tjre...@udel.edu wrote: greg wrote: [...] fwiw, the following python script could be used, when run from the Tests directory, to selectively run the numbered tests: - runtests.py import glob import os

Re: DVCSs wreck tkFileDialog

2009-04-14 Thread Alan G Isaac
More info: URL:http://sourceforge.net/mailarchive/forum.php?thread_name=A46CBF978138744AAC019E6FF055EAB70F30AE%40apatlelsmail08.elsys.gtri.orgforum_name=tortoisehg-develop Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python after a few years of Ruby

2009-04-14 Thread Alan G Isaac
On 4/14/2009 3:01 AM blahemailb...@gmail.com apparently wrote: 1) Rake - is there an equivalent of Rake? I've seen a bit about SCons, and it looks really nice, but it seems geared towards being a Make replacement for C/C++ rather than something that's used to work with Python itself. Is there

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

2009-04-14 Thread Dave Angel
eric.le.bi...@spectro.jussieu.fr wrote: It looks like what is needed here are a kind of mutable float. Is there a simple way of creating such a type? I don't mind changing the value through x.value =.23 instead of x = 1.23... :) On Apr 14, 3:03 pm, eric.le.bi...@spectro.jussieu.fr wrote:

Re: History of python syntax development?

2009-04-14 Thread Chris Rebert
On Tue, Apr 14, 2009 at 10:01 AM, Ritwik rana@gmail.com wrote: Hi all, I'm doing some work in programming languages and I'm looking for a short history of python development, from the point of view of the initial development of the syntax. I know I can go through the mailing lists and

Re: show PDF in wxPython?

2009-04-14 Thread Stef Mientki
alejandro wrote: I would like to import a pdf in a wxPython widget, but didn't find any solution. The imported PDF should work like if it were open in IE or Mozilla... Sugestions? Solutions? wxPython has several options, all shown in the wxPython demo !! ( IE activeX, pdf-activeX ) btw

Re: iPython help, Docstring [source file open failed]

2009-04-14 Thread Przemyslaw Kaminski
Kegan wrote: I use iPython installed from macport. When I am in the iPython shell, I do the following: In [8]: from datetime import timedelta In [9]: timedelta?? Type: type Base Class: type 'type' String Form:type 'datetime.timedelta' Namespace: Interactive

Re: Modifying the value of a float-like object

2009-04-14 Thread Eric . Le . Bigot
Thank you all for your input. It is not yet obvious how to achieve the goal/need that I had in mind in the original post. Basically, I would need to be able to calculate the derive() function of Peter, but without knowing what arguments are passed to the function f under study. Here is why:

Re: Using Python after a few years of Ruby

2009-04-14 Thread Martin v. Löwis
1) Rake - is there an equivalent of Rake? I've seen a bit about SCons, and it looks really nice, but it seems geared towards being a Make replacement for C/C++ rather than something that's used to work with Python itself. Is there anything like a Python build tool? Depends on what you want

Re: Modifying the value of a float-like object

2009-04-14 Thread Eric . Le . Bigot
Thanks Dave for your thoughtful remarks, which you sent right when I was writing a response to the previous posts. I was wondering about a kind mutable float; so you're right, it's not fully a float, because it's mutable. I'd like to have an object that behaves like a float in numerical

Re: GUI Programming

2009-04-14 Thread David Cook
On 2009-04-12, Gabriel dun...@dreams.sk wrote: I'm python newbie and i need to write gui for my school work in python. I need to write it really quick, because i haven't much time .) So question is, which of gui toolkits should i pick and learn? I heard PyGTK and Glade are best for quick gui

Re: any(), all() and empty iterable

2009-04-14 Thread Mark Dickinson
On Apr 14, 7:21 pm, Luis Alberto Zarrabeitia Gomez ky...@uh.cu wrote: It's more than that. Python's following the rules here. Maybe it could be documented better, for those without a background in logic/discrete mathematics, but not changed. Agreed. I'd like to guess that in 93.7% of cases,

Data Model - database load

2009-04-14 Thread Anthony
Hello, I'm making a statistics tracking application and was wondering how my chosen data model design would affect performance. I'm not sure if I'm breaking up my objects into too granular a level in the interests of flexibility. class ParentStats Summary level groups of stats class

Network game using mysql

2009-04-14 Thread João Abrantes
Good evening, I am making an online game that stores its data in a mysql database. The thing is that I can't allow the players to interact directly with the important tables of database (they could cheat if I give them access) so I only allow them to write on a table named commands and then a

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

2009-04-14 Thread M.-A. Lemburg
On 2009-04-14 18:27, P.J. Eby wrote: At 05:02 PM 4/14/2009 +0200, M.-A. Lemburg wrote: I don't see the emphasis in the PEP on Linux distribution support and the remote possibility of them wanting to combine separate packages back into one package as good argument for adding yet another

Re: Network game using mysql

2009-04-14 Thread Tino Wildenhain
Hi, João Abrantes wrote: Good evening, I am making an online game that stores its data in a mysql database. The thing is that I can't allow the players to interact directly with the important tables of database (they could cheat if I give them access) so I only allow them to write on a

Play sound at wanted frequency

2009-04-14 Thread Matteo
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 what the string should be like, and the

Re: Play sound at wanted frequency

2009-04-14 Thread Diez B. Roggisch
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 what the string should

Re: zProblem

2009-04-14 Thread norseman
Gabriel Genellina wrote: En Mon, 13 Apr 2009 15:13:53 -0300, norseman norse...@hughes.net escribió: Gabriel Genellina wrote: ...(snip) I can't visualize that working properly in my current need. The ...(snip) Below there is an attempt to reproduce the layout you describe in the PDF:

segmentation fault while using ctypes

2009-04-14 Thread sanket
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 suddenly it gives me seg fault. But I can call same function from a C code for any number of times. I cannot get

Re: segmentation fault while using ctypes

2009-04-14 Thread Diez B. Roggisch
sanket schrieb: 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 suddenly it gives me seg fault. But I can call same function from a C code for any number of times.

Re: segmentation fault while using ctypes

2009-04-14 Thread MRAB
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 suddenly it gives me seg fault. But I can call same function from a C code for any number of times. I

Re: segmentation fault while using ctypes

2009-04-14 Thread sanket
On Apr 14, 4:00 pm, MRAB goo...@mrabarnett.plus.com wrote: 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 suddenly it gives me seg fault.

Re: show PDF in wxPython?

2009-04-14 Thread norseman
alejandro wrote: I would like to import a pdf in a wxPython widget, but didn't find any solution. The imported PDF should work like if it were open in IE or Mozilla... Sugestions? Solutions? P.S. I would like to thank Dennis Lee Bieber for the help about parallel ports... I forgot to do it

Re: segmentation fault while using ctypes

2009-04-14 Thread sanket
On Apr 14, 3:56 pm, Diez B. Roggisch de...@nospam.web.de wrote: sanket schrieb: 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 suddenly it gives me seg

Re: segmentation fault while using ctypes

2009-04-14 Thread MRAB
sanket wrote: On Apr 14, 4:00 pm, MRAB goo...@mrabarnett.plus.com wrote: 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 suddenly it gives me seg

  1   2   >