Elisa Media Center 0.5.37 Release

2009-04-28 Thread Olivier Tilloy
Dear Python users, The Elisa team is happy to announce the release of Elisa Media Center 0.5.37, code-named Doubledecker. Elisa is a cross-platform and open-source Media Center written in Python. It uses GStreamer [1] for media playback and pigment [2] to create an appealing and intuitive user

CodeInvestigator version 0.11.1

2009-04-28 Thread hans moleman
CodeInvestigator version 0.11.1 was released on April 28. Bug fix: - A windows installation issue was resolved. CodeInvestigator is a tracing tool for Python programs. Running a program through CodeInvestigator creates a recording. Program flow, function calls, variable values and

[ANN] pyOpenSSL 0.9

2009-04-28 Thread Jean-Paul Calderone
I'm happy to announce the release of pyOpenSSL 0.9. This release includes several new features and a very important bug fix: * APIs have been introduced to get and set the version of an X509 request * Contexts now support loading CA certificates for verification from a specified directory

Re: suggestion on a complicated inter-process communication

2009-04-28 Thread Jonathan Gardner
On Apr 27, 8:59 pm, Way csw...@gmail.com wrote: Hello friends, I have a little messy situation on IPC. Please if you can, give me some suggestion on how to implement. Thanks a lot! - denotes create MainProcess - Process1 - Process3 (from os.system)                    |                    

Re: mailbox.mbox.add() sets access time as well as modification time

2009-04-28 Thread Lawrence D'Oliveiro
In message pan.2009.04.28.04.29...@remove.this.cybersource.com.au, Steven D'Aprano wrote: On Tue, 28 Apr 2009 11:19:51 +1200, Lawrence D'Oliveiro wrote: Either there are enough people using it to care about it, in which case somebody in the community will fix it, it or there are not, in

Why bool( object )?

2009-04-28 Thread Aaron Brady
What is the rationale for considering all instances true of a user- defined type? Is it strictly a practical stipulation, or is there something conceptually true about objects? ''' object.__bool__(self) If a class defines neither __len__() nor __bool__(), all its instances are considered true.

Re: Thread-killing, round 666 (was Re: Lisp mentality vs. Python mentality)

2009-04-28 Thread Aahz
In article 9a827369-b36f-4a86-870a-e5a505e34...@q33g2000pra.googlegroups.com, Vsevolod vselo...@gmail.com wrote: On Apr 27, 8:18 pm, a...@pythoncraft.com (Aahz) wrote: If you want to talk about Python and problems you're running into, you should start a new thread. I'm not at that level of

Re: Why bool( object )?

2009-04-28 Thread Stephen Hansen
On Mon, Apr 27, 2009 at 11:11 PM, Aaron Brady castiro...@gmail.com wrote: What is the rationale for considering all instances true of a user- defined type? Is it strictly a practical stipulation, or is there something conceptually true about objects? ''' object.__bool__(self) If a class

Re: Why bool( object )?

2009-04-28 Thread Lie Ryan
Aaron Brady wrote: What is the rationale for considering all instances true of a user- defined type? User-defined objects (or type) can override .__len__() [usually container types] or .__nonzero__() to make bool() returns False. Is it strictly a practical stipulation, or is there

Re: Why bool( object )?

2009-04-28 Thread Chris Rebert
On Mon, Apr 27, 2009 at 11:11 PM, Aaron Brady castiro...@gmail.com wrote: What is the rationale for considering all instances true of a user- defined type?  Is it strictly a practical stipulation, or is there something conceptually true about objects? ''' object.__bool__(self) If a class

Re: Why bool( object )?

2009-04-28 Thread Aaron Brady
On Apr 28, 1:35 am, Lie Ryan lie.1...@gmail.com wrote: Aaron Brady wrote: What is the rationale for considering all instances true of a user- defined type?   User-defined objects (or type) can override .__len__() [usually container types] or .__nonzero__() to make bool() returns False.

Re: Web based application development using python

2009-04-28 Thread Tim Hoffman
Calling mod_python a web framework is a bit of a stretch. if you want to work at that level though mod_wsgi is worth a look, on top of that you can put a range of frameworks such as repose, django, turbo gears etc.. T On Apr 28, 12:55 pm, Rahul r.warhe...@gmail.com wrote: 2) I have my

Re: Web based application development using python

2009-04-28 Thread Rahul
1) Do you have any idea about web based support (like mod_python) provided by python.org (official web site) Details: - As we know mod_python is used for embeding python code into apache server. so, i want to know whether mod_python is officially supported by python.org or if there is other such

Re: python segfaulting, MemoryError (PyQt)

2009-04-28 Thread Diez B. Roggisch
Denis L schrieb: Hello, I'm experiencing odd errors on both windows and linux with the following code: import sys from PyQt4.QtCore import * from PyQt4.QtGui import * class Options(QDialog): def __init__(self, values): QDialog.__init__(self) self.values = values

Re: Why bool( object )?

2009-04-28 Thread Steven D'Aprano
On Mon, 27 Apr 2009 23:11:11 -0700, Aaron Brady wrote: What is the rationale for considering all instances true of a user- defined type? Is it strictly a practical stipulation, or is there something conceptually true about objects? Seven years ago, in an attempt to convince Guido *not* to

Web framework for embedded system

2009-04-28 Thread Thomas Heller
I'm looking for a lightweight web-framework for an embedded system. The system is running a realtime linux-variant on a 200 MHz ARM processor, Python reports a performance of around 500 pystones. The web application will not be too fancy, no databases involved for example, but it will need to

sorted() erraticly fails to sort string numbers

2009-04-28 Thread uuid
I would be very interested in a logical explanation why this happens on python 2.5.1: In order to sort an etree by the .text value of one child, I adapted this snippet from effbot.org: import xml.etree.ElementTree as ET tree = ET.parse(data.xml) def getkey(elem): return

Re: Presentation software for Python code

2009-04-28 Thread John Reid
Neal Becker wrote: IPython offers something similar for giving demos. I've found that very useful in the past. Really? Any pointers? http://ipython.scipy.org/doc/manual/html/api/generated/IPython.demo.html -- http://mail.python.org/mailman/listinfo/python-list

Re: sorted() erraticly fails to sort string numbers

2009-04-28 Thread Andre Engels
On Tue, Apr 28, 2009 at 9:47 AM, uuid m8r-r1c6...@mailinator.com wrote: I would be very interested in a logical explanation why this happens on python 2.5.1: In order to sort an etree by the .text value of one child, I adapted this snippet from effbot.org: import xml.etree.ElementTree as ET

Memory leak on python 2.5 if using str(dict(a='a'))

2009-04-28 Thread Benjamin Liu
Hi, all. I use guppy-pe to identify this issue in my program. The resources links are all embedded in source code already. I developed a test case for your convenience and attached the log. Any gurus help out here? It's really python internal stuff which I can't easily peek into. Thanks,

Re: Web based application development using python

2009-04-28 Thread Marco Mariani
Rahul wrote: 1) Do you have any idea about web based support (like mod_python) provided by python.org (official web site) Details: - As we know mod_python is used for embeding python code into apache server. so, i want to know whether mod_python is officially supported by python.org or if

Re: sorted() erraticly fails to sort string numbers

2009-04-28 Thread uuid
I am at the same time impressed with the concise answer and disheartened by my inability to see this myself. My heartfelt thanks! On 2009-04-28 10:06:24 +0200, Andre Engels andreeng...@gmail.com said: When sorting strings, including strings that represent numbers, sorting is done

Re: python segfaulting, MemoryError (PyQt)

2009-04-28 Thread Phil Thompson
On Tue, 28 Apr 2009 03:53:34 +0200, Denis L n...@spam.com wrote: Hello, I'm experiencing odd errors on both windows and linux with the following code: import sys from PyQt4.QtCore import * from PyQt4.QtGui import * class Options(QDialog): def __init__(self, values):

Re: python segfaulting, MemoryError (PyQt)

2009-04-28 Thread Phil Thompson
On Tue, 28 Apr 2009 09:35:31 +0200, Diez B. Roggisch de...@nospam.web.de wrote: Denis L schrieb: Hello, I'm experiencing odd errors on both windows and linux with the following code: import sys from PyQt4.QtCore import * from PyQt4.QtGui import * class Options(QDialog): def

Re: python setup ?

2009-04-28 Thread Andreas Röhler
Xavier Maillard wrote: Hi Xavier Maillard x...@gnu.org writes: I am starting to do some work with python. I am looking for options/setups to introduce into my .emacs file to have the best experience possible with this scripting language. Where should I start ?

Re: Web framework for embedded system

2009-04-28 Thread Gerhard Häring
Thomas Heller wrote: I'm looking for a lightweight web-framework for an embedded system. The system is running a realtime linux-variant on a 200 MHz ARM processor, Python reports a performance of around 500 pystones. The web application will not be too fancy, no databases involved for

Re: Lisp mentality vs. Python mentality

2009-04-28 Thread Dan Sommers
On Tue, 28 Apr 2009 02:00:22 -0300, namekuseijin wrote: Dan Sommers wrote: On Mon, 27 Apr 2009 07:57:00 +0300, Ciprian Dorin, Craciun wrote: I agree with your opinion about keeping the abstraction layers shallow, but in my view high-order and helper functions do not comprise a new

Re: Restart generator when it is exhausted.

2009-04-28 Thread Chris Rebert
On Tue, Apr 28, 2009 at 2:54 AM, Lacrima lacrima.ma...@gmail.com wrote: Hello! I am quite new to Python and I have maybe simple (or maybe not) question. Is it possible to restart generator when it is exhausted? No. You have to make a new instance of the generator. What should I do to get

Re: mailbox.mbox.add() sets access time as well as modification time

2009-04-28 Thread tinnews
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message jo2dnwpluopxvwjunz2dnuvz_qudn...@posted.usinternet, Grant Edwards wrote: On 2009-04-26, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message _vqdnf6pny1gymzunz2dnuvz_qcdn...@posted.visi, Grant

Using ascii numbers in regular expression

2009-04-28 Thread jorma kala
Hi, How can I use the ascii number of a character in a regular expression (module re) instead of the character itself? Thanks very much -- http://mail.python.org/mailman/listinfo/python-list

screen scraping with Python?

2009-04-28 Thread Meenakshi, Arun Kumar
Hi Friends, Please let me know whether VT100 (Screen scrapping) emulation is possible or not. If screen scrapping / VT100 emulation is possible, please let me know how to do it. I will be happier, if you can provide me steps and sample codes. I am a beginner in python. So kindly help

suggestion on a complicated inter-process communication

2009-04-28 Thread Way
Hello friends, I have a little messy situation on IPC. Please if you can, give me some suggestion on how to implement. Thanks a lot! - denotes create MainProcess - Process1 - Process3 (from os.system) | - Process2 (from os.system) - Process4 (from

Re: python segfaulting, MemoryError (PyQt)

2009-04-28 Thread Phil Thompson
On Tue, 28 Apr 2009 11:18:31 +0200, Diez B. Roggisch de...@nospam.web.de wrote: As the documentation of pyqt clearly states, connecting signals doesn't increment the refcount on a passed slot, thus you need to keep a reference to your slots around. But it does increase the refcount for

desperately looking for a howto on running my wxPython app on Vista

2009-04-28 Thread Paul Sijben
python 2.6, py2exe and Vista do not make a happy set. Unfortunately I am in dire need to launch my app not only on WinXP but also on Vista. I need 2.6 because of a number of support packages I am using and some of which I am compiling myself (and python 2.5 needs a version of visual studio that

Python 2.6 ImportError: cannot import name SSLType

2009-04-28 Thread zerosumgame
I have built python 2.6.1 and 2.6.2 with ssl support (Redhat 3.4.6-9 / Openssl 0.9.8j). I am trying to use this with the Apache Qpid project but cannot bring up an ssl connection because the code relies on socket.SSLType which is missing from my build. The only references to SSLType I can find

Re: screen scraping with Python?

2009-04-28 Thread David Lyon
On Mon, 27 Apr 2009 12:28:31 +0530, Meenakshi, Arun Kumar arunkumar.meenak...@sc.com wrote: Hi Friends, Please let me know whether VT100 (Screen scrapping) emulation is possible or not. If screen scrapping / VT100 emulation is possible, please let me know how to do it. I will

Restart generator when it is exhausted.

2009-04-28 Thread Lacrima
Hello! I am quite new to Python and I have maybe simple (or maybe not) question. Is it possible to restart generator when it is exhausted? For example: a = ['a', 'b', 'c'] g = (i for i in a) g.next() 'a' g.next() 'b' g.next() 'c' g.next() Traceback (most recent call last): File

Re: Restart generator when it is exhausted.

2009-04-28 Thread Lacrima
On Apr 28, 1:04 pm, Chris Rebert c...@rebertia.com wrote: On Tue, Apr 28, 2009 at 2:54 AM, Lacrima lacrima.ma...@gmail.com wrote: Hello! I am quite new to Python and I have maybe simple (or maybe not) question. Is it possible to restart generator when it is exhausted? No. You have to

Efficient bits manipulation in Python

2009-04-28 Thread Li Wang
Hi: I have a bit-code :'1011011', how can I reverse it to '1101101'? Another question is I know how to transform the string '110' into integer 6, does anyone know how to transform integer 6 to a string '110'? Thank you very much:) -- Li -- Time is all we have and you may find one day you

RE: screen scraping with Python?

2009-04-28 Thread Meenakshi, Arun Kumar
David, Thanks a ton for your swift reply. I will be more happy, if you could direct me with right API with which I can walk further. Regards, Arun FoneNet : 390-13359 Mobile: 9884471702 -Original Message- From: David Lyon [mailto:david.l...@preisshare.net] Sent:

RE: screen scraping with Python?

2009-04-28 Thread Jean-Paul Calderone
On Tue, 28 Apr 2009 16:57:18 +0530, Meenakshi, Arun Kumar arunkumar.meenak...@sc.com wrote: David, Thanks a ton for your swift reply. I will be more happy, if you could direct me with right API with which I can walk further. Twisted includes a vt102 API along with an in-memory

Re: Efficient bits manipulation in Python

2009-04-28 Thread Maxim Khitrov
On Tue, Apr 28, 2009 at 7:26 AM, Li Wang li.wan...@gmail.com wrote: Hi: I have a bit-code :'1011011', how can I reverse it to '1101101'? Another question is I know how to transform the string '110' into integer 6, does anyone know how to transform integer 6 to a string '110'? Thank you

Re: Web based application development using python

2009-04-28 Thread Rahul
On Apr 28, 1:02 pm, Marco Mariani ma...@sferacarta.com wrote: Rahul wrote: 1) Do you have any idea about web based support (like mod_python) provided by python.org (official web site) Details: - As we know mod_python is used for embeding python code into apache server. so, i want to

Unknown Visual C++ error

2009-04-28 Thread Stef Mientki
hello, Anyone knows what this error message means ? Python 2.5.2 thanks, Stef -- http://mail.python.org/mailman/listinfo/python-list

Re: Using ascii numbers in regular expression

2009-04-28 Thread jorma kala
Thanks very much for your reply. What I mean is that I would like to use the ascii number in a regular expression pattern. For instance, if I want to substitute the occurrences of character 'a' for the character 'b' in a string, instead of doing this: re.subn('a','b','') I'd like to specify

Re: Efficient bits manipulation in Python

2009-04-28 Thread Li Wang
I have a bit-code :'1011011', how can I reverse it to '1101101'? Another question is I know how to transform the string '110' into integer 6, does anyone know how to transform integer 6 to a string '110'? Thank you very much:) Assuming that you are using 2.6: a = 0b1011011 print

Re: Web based application development using python

2009-04-28 Thread Tim Hoffman
On Apr 28, 7:50 pm, Rahul r.warhe...@gmail.com wrote: On Apr 28, 1:02 pm, Marco Mariani ma...@sferacarta.com wrote: Rahul wrote: 1) Do you have any idea about web based support (like mod_python) provided by python.org (official web site) Details: - As we know mod_python is used for

Re: python segfaulting, MemoryError (PyQt)

2009-04-28 Thread Diez B. Roggisch
As the documentation of pyqt clearly states, connecting signals doesn't increment the refcount on a passed slot, thus you need to keep a reference to your slots around. But it does increase the refcount for lambda slots. Has that changed? It has been a while, but I've been bitten by this

Re: Why bool( object )?

2009-04-28 Thread Colin J. Williams
Lie Ryan wrote: Aaron Brady wrote: What is the rationale for considering all instances true of a user- defined type? User-defined objects (or type) can override .__len__() [usually container types] or .__nonzero__() to make bool() returns False. Is it strictly a practical stipulation,

Connecting/talking to OpenOffice Base files

2009-04-28 Thread deostroll
Hi, I was wondering if the python interpretor can talk to files with extension *.odb (OpenOffice Base files). They are like flat database files, similar to Microsoft Access files. I want to store data into them as well as extract data out of them. --deostroll --

Re: Using ascii numbers in regular expression

2009-04-28 Thread Chris Rebert
On Tue, Apr 28, 2009 at 4:58 AM, jorma kala jjk...@gmail.com wrote: Thanks very much for your reply. What I mean is that I would like to use the ascii number in a regular expression pattern. For instance, if I want to substitute the occurrences of character 'a' for the character 'b' in a

Re: Using ascii numbers in regular expression

2009-04-28 Thread Chris Rebert
On Tue, Apr 28, 2009 at 4:05 AM, jorma kala jjk...@gmail.com wrote: Hi, How can I use the ascii number of a character in a regular expression (module re) instead of the character itself? Thanks very much I refer you to the chr() and ord() built-in functions, which can certainly be used to

Re: Why bool( object )?

2009-04-28 Thread Lawrence D'Oliveiro
In message 54cb7f8a- fef4-4bf8-8054-16dc9b5c8...@d2g2000pra.googlegroups.com, Aaron Brady wrote: What is the rationale for considering all instances true of a user- defined type? It's a stupid idea, and there seem to be instances of users tripping over it here in comp.lang.python every week.

Re: The whole story

2009-04-28 Thread andrew cooke
Paul Hemans wrote: Hi Andrew, The reason I am using mapped objects is that I need to abstract from the database implementation allowing the replication to target a number of different platforms. This will definitely slow things down. have you looked at sqlalchemy's generic sql support? you

Re: Restart generator when it is exhausted.

2009-04-28 Thread Duncan Booth
Lacrima lacrima.ma...@gmail.com wrote: If it is not possible what are common techniques to use iterator or generator objects that allow restarting when it is needed? The usual thing if you want to use the generator's output more than once would be to convert the generator to a list, then you

Re: Why bool( object )?

2009-04-28 Thread Andre Engels
On Tue, Apr 28, 2009 at 2:22 PM, Colin J. Williams c...@ncf.ca wrote: Lie Ryan wrote: Aaron Brady wrote: What is the rationale for considering all instances true of a user- defined type? User-defined objects (or type) can override .__len__() [usually container types] or .__nonzero__() to

Re: Connecting/talking to OpenOffice Base files

2009-04-28 Thread Krishnakant
hi, On Tue, 2009-04-28 at 05:24 -0700, deostroll wrote: Hi, I was wondering if the python interpretor can talk to files with extension *.odb (OpenOffice Base files). They are like flat database files, similar to Microsoft Access files. I want to store data into them as well as extract data

[ANN] pyOpenSSL 0.9

2009-04-28 Thread Jean-Paul Calderone
I'm happy to announce the release of pyOpenSSL 0.9. This release includes several new features and a very important bug fix: * APIs have been introduced to get and set the version of an X509 request * Contexts now support loading CA certificates for verification from a specified directory

Re: Is there a maximum size to a Python program?

2009-04-28 Thread Paul Boddie
On 27 Apr, 05:01, Carbon Man dar...@nowhere.com wrote: I have a program that is generated from a generic process. It's job is to check to see whether records (replicated from another system) exist in a local table, and if it doesn't, to add them. I have 1 of these programs for every table in

Re: Web framework for embedded system

2009-04-28 Thread bobicanprogram
On Apr 28, 3:43 am, Thomas Heller thel...@python.net wrote: I'm looking for a lightweight web-framework for an embedded system. The system is running a realtime linux-variant on a 200 MHz ARM processor, Python reports a performance of around 500 pystones. The web application will not be too

Re: python segfaulting, MemoryError (PyQt)

2009-04-28 Thread Denis L
Phil Thompson p...@riverbankcomputing.com wrote in message news:mailman.4664.1240907352.11746.python-l...@python.org... On Tue, 28 Apr 2009 03:53:34 +0200, Denis L n...@spam.com wrote: Hello, I'm experiencing odd errors on both windows and linux with the following code: import sys from

Getting the dir from the other ancestor ?

2009-04-28 Thread Stef Mientki
hello, I have a class, derived from some user defined class (User_Defined_Ancestor) and some basic class (Basic_Ancestor). One of the major tasks of the Basic_Ancestor, is to hide all kinds of implementation details for the user, so the user can concentrate on the functional design. One of

Re: Getting the dir from the other ancestor ?

2009-04-28 Thread tuxagb
On 28 Apr, 15:01, Stef Mientki stef.mien...@gmail.com wrote: hello, I have a class, derived from some user defined class (User_Defined_Ancestor) and some basic class (Basic_Ancestor). One of the major tasks of the Basic_Ancestor, is to hide all kinds of implementation details for the user,

Re: mailbox.mbox.add() sets access time as well as modification time

2009-04-28 Thread Grant Edwards
On 2009-04-27, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message gt3a7k$8d...@panix3.panix.com, Aahz wrote: In article gt0f2d$t5...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: It's only in the proprietary-software world that we need to

Re: mailbox.mbox.add() sets access time as well as modification time

2009-04-28 Thread Grant Edwards
On 2009-04-27, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: Who's we? Are you volunteering to fix all of the MUAs and MTAs out there that have mbox code in them that do follow the rules to make them compatible with _one_ broken library module? All the MUAs and MTAs I'm

Re: python segfaulting, MemoryError (PyQt)

2009-04-28 Thread Phil Thompson
On Tue, 28 Apr 2009 14:54:41 +0200, Denis L n...@spam.com wrote: Phil Thompson p...@riverbankcomputing.com wrote in message news:mailman.4664.1240907352.11746.python-l...@python.org... On Tue, 28 Apr 2009 03:53:34 +0200, Denis L n...@spam.com wrote: Hello, I'm experiencing odd errors on

Re: Using ascii numbers in regular expression

2009-04-28 Thread MRAB
jorma kala wrote: Thanks very much for your reply. What I mean is that I would like to use the ascii number in a regular expression pattern. For instance, if I want to substitute the occurrences of character 'a' for the character 'b' in a string, instead of doing this:

Re: python segfaulting, MemoryError (PyQt)

2009-04-28 Thread Diez B. Roggisch
Phil Thompson wrote: On Tue, 28 Apr 2009 11:18:31 +0200, Diez B. Roggisch de...@nospam.web.de wrote: As the documentation of pyqt clearly states, connecting signals doesn't increment the refcount on a passed slot, thus you need to keep a reference to your slots around. But it does

Query related to matplotlib

2009-04-28 Thread srinivasan srinivas
I would like to draw a chart which takes 'dates' in x axes and some values in y axes.   I would like to draw a simple chart using matplotlib. Can someone tell me which submodule i could use for this purpose? The module has to support in the way that i can draw more than one set can be passed

Re: Help AIX 5.3 build on Python-3.1a2

2009-04-28 Thread Jeroen Ruigrok van der Werven
-On [20090427 20:31], prueba...@latinmail.com (prueba...@latinmail.com) wrote: ./Modules/ld_so_aix xlc_r -q64 -bI:Modules/python.exp build/ temp.aix-5.3-3.1//ptst/Python-3.1a2/Modules/_tkinter.o build/ temp.aix-5.3-3.1//ptst/Python-3.1a2/Modules/tkappinit.o -L/usr/X11R6/ lib64 -L/usr/X11R6/lib

Re: Web based application development using python

2009-04-28 Thread Rahul
On Apr 28, 5:07 pm, Tim Hoffman zutes...@gmail.com wrote: On Apr 28, 7:50 pm, Rahul r.warhe...@gmail.com wrote: On Apr 28, 1:02 pm, Marco Mariani ma...@sferacarta.com wrote: Rahul wrote: 1) Do you have any idea about web based support (like mod_python) provided by python.org

Re: Web framework for embedded system

2009-04-28 Thread Suraj Barkale
Thomas Heller theller at python.net writes: I'm looking for a lightweight web-framework for an embedded system. The system is running a realtime linux-variant on a 200 MHz ARM processor, Python reports a performance of around 500 pystones. You can start with webpy (http://webpy.org/) and

Re: Re: sorted() erraticly fails to sort string numbers

2009-04-28 Thread John Posner
uuid wrote: I am at the same time impressed with the concise answer and disheartened by my inability to see this myself. My heartfelt thanks! Don't be disheartened! Many people -- myself included, absolutely! -- occasionally let a blind spot show in their messages to this list. BTW:

How to locate the bit in bits string?

2009-04-28 Thread Li Wang
Hi: If I use an integer to represent bits: e.g. 99 represents '1100011' How can I locate, say the second bit of 99(i.e. '1')? Although bin(99)[4] could be used to locate it, this transform cost too much memory (99 only needs 2Bytes, while string '1100011' needs 7Bytes). Anyone knows how to

Re: sorted() erraticly fails to sort string numbers

2009-04-28 Thread uuid
On 2009-04-28 16:18:43 +0200, John Posner jjpos...@snet.net said: Don't be disheartened! Many people -- myself included, absolutely! -- occasionally let a blind spot show in their messages to this list. Thanks for the encouragement :) BTW: container[:] = sorted(container, key=getkey)

Re: Best way to evaluate boolean expressions from strings?

2009-04-28 Thread Gustavo Narea
Thank you very much, Gabriela and Peter! I'm going for Pyparsing. :) -- Gustavo. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to locate the bit in bits string?

2009-04-28 Thread Tim Chase
Li Wang wrote: Hi: If I use an integer to represent bits: e.g. 99 represents '1100011' How can I locate, say the second bit of 99(i.e. '1')? Although bin(99)[4] could be used to locate it, this transform cost too much memory (99 only needs 2Bytes, while string '1100011' needs 7Bytes). Anyone

Third Party Modules

2009-04-28 Thread Brock
Hi Everyone, I know this is most likely a basic question and you will roll your eyes, but I am just starting out with Python (hobbyist) and I see many tutorials on the web referring to the use of external modules. However, when I locate them, they often come as a zipped folder with a number of

What do you think of ShowMeDo

2009-04-28 Thread Astley Le Jasper
Hi, I've just stumbled over this (http://showmedo.com/) and being the very visual person I am, it seems like it could be a good way to learn about python. However, before I smack down $60, I wondered if anyone had any opinions on it. My gut feel is that it could be pretty good. ALJ --

Re: python segfaulting, MemoryError (PyQt)

2009-04-28 Thread Denis L
Phil Thompson p...@riverbankcomputing.com wrote in message news:mailman.4690.1240925876.11746.python-l...@python.org... On Tue, 28 Apr 2009 14:54:41 +0200, Denis L n...@spam.com wrote: Phil Thompson p...@riverbankcomputing.com wrote in message

Re: How to locate the bit in bits string?

2009-04-28 Thread tuxagb
On 28 Apr, 16:36, Li Wang li.wan...@gmail.com wrote: Hi: If I use an integer to represent bits: e.g. 99 represents '1100011' How can I locate, say the second bit of 99(i.e. '1')? Although bin(99)[4] could be used to locate it, this transform cost too much memory (99 only needs 2Bytes,

Re: How to locate the bit in bits string?

2009-04-28 Thread Li Wang
2009/4/29 Tim Chase python.l...@tim.thechases.com: Li Wang wrote: Hi: If I use an integer to represent bits: e.g. 99 represents '1100011' How can I locate, say the second bit of 99(i.e. '1')? Although bin(99)[4] could be used to locate it, this transform cost too much memory (99 only

Re: Third Party Modules

2009-04-28 Thread tuxagb
On 28 Apr, 17:02, Brock btibe...@gmail.com wrote: Hi Everyone, I know this is most likely a basic question and you will roll your eyes, but I am just starting out with Python (hobbyist) and I see many tutorials on the web referring to the use of external modules. However, when I locate

Re: python segfaulting, MemoryError (PyQt)

2009-04-28 Thread Phil Thompson
On Tue, 28 Apr 2009 17:10:51 +0200, Denis L n...@spam.com wrote: Phil Thompson p...@riverbankcomputing.com wrote in message news:mailman.4690.1240925876.11746.python-l...@python.org... On Tue, 28 Apr 2009 14:54:41 +0200, Denis L n...@spam.com wrote: Phil Thompson p...@riverbankcomputing.com

Re: How can I get Tkinter to work in Python? (I tried many things)

2009-04-28 Thread Peter Pearson
On Mon, 27 Apr 2009 17:49:26 -0700 (PDT), tom...@gmail.com wrote: [snip] There are errors, but since there is many of them: here is a cut out of the _tkinter errors: libpython2.6.a(_tkinter.o): In function `Tkapp_CallProc': /home/tomzam/mylib6/Python-2.6.2/./Modules/_tkinter.c:1263: undefined

Re: Restart generator when it is exhausted.

2009-04-28 Thread J. Cliff Dyer
On Tue, 2009-04-28 at 10:41 +, Duncan Booth wrote: Lacrima lacrima.ma...@gmail.com wrote: If it is not possible what are common techniques to use iterator or generator objects that allow restarting when it is needed? The usual thing if you want to use the generator's output more

Re: suggestion on a complicated inter-process communication

2009-04-28 Thread Way
Thanks a lot for reply. I understand it is abnormal to implement such IPC, while it is worthy for my application. Well, my process3 and 4 are from an outside application, which both need License Check and os.system to involk. From my experience, if Process5 involks Process3, such License Check

Re: What do you think of ShowMeDo

2009-04-28 Thread tuxagb
On 28 Apr, 17:09, Astley Le Jasper astley.lejas...@gmail.com wrote: Hi, I've just stumbled over this (http://showmedo.com/) and being the very visual person I am, it seems like it could be a good way to learn about python. However, before I smack down $60, I wondered if anyone had any

Re: suggestion on a complicated inter-process communication

2009-04-28 Thread Way
Thanks a lot for the reply. I am not familiar with multi-process in Python. I am now using something like: A_prog is an os.system to involk Process3 B_prog is an os.system to involk Process4 --- In Main Process: Process1 = Popen([A_prog],

Re: How to locate the bit in bits string?

2009-04-28 Thread tuxagb
On 28 Apr, 17:24, Li Wang li.wan...@gmail.com wrote: 2009/4/29 Tim Chase python.l...@tim.thechases.com: Li Wang wrote: Hi: If I use an integer to represent bits: e.g. 99 represents '1100011' How can I locate, say the second bit of 99(i.e. '1')? Although bin(99)[4] could be used

Re: suggestion on a complicated inter-process communication

2009-04-28 Thread norseman
Way wrote: Hello friends, I have a little messy situation on IPC. Please if you can, give me some suggestion on how to implement. Thanks a lot! - denotes create MainProcess - Process1 - Process3 (from os.system) | - Process2 (from os.system) - Process4

Re: Getting the dir from the other ancestor ?

2009-04-28 Thread Stef Mientki
tuxagb wrote: On 28 Apr, 15:01, Stef Mientki stef.mien...@gmail.com wrote: hello, I have a class, derived from some user defined class (User_Defined_Ancestor) and some basic class (Basic_Ancestor). One of the major tasks of the Basic_Ancestor, is to hide all kinds of implementation details

Re: suggestion on a complicated inter-process communication

2009-04-28 Thread Paul Boddie
On 28 Apr, 17:40, Way csw...@gmail.com wrote: Thanks a lot for reply. I understand it is abnormal to implement such IPC, while it is worthy for my application. Well, my process3 and 4 are from an outside application, which both need License Check and os.system to involk. Sounds delightful!

stuck with PyOBEX

2009-04-28 Thread alejandro
So I installed the module and tryed to make it work but... It gave me: Traceback (most recent call last): File first.py, line 24, in module client2.connect() File C:\Python25\lib\PyOBEX\client.py, line 359, in connect return Client.connect(self, header_list = [headers.Target(uuid)])

Re: Light (general) Inter-Process Mutex/Wait/Notify Synchronization?

2009-04-28 Thread John Nagle
Gunter Henriksen wrote: If you don't want to use a 3rd party module you could use the multiprocessing module That is definitely good for when I have a tree of processes which are all Python applications. I use it for that. But I am looking for something where the Python application can

Re: How to locate the bit in bits string?

2009-04-28 Thread Tim Chase
Li Wang wrote: 2009/4/29 Tim Chase python.l...@tim.thechases.com: Li Wang wrote: If I use an integer to represent bits: [snip] Hummm, I have tried this method too, the problem is its time complexity. If the length of my bits is n, then the time complexity is O(n). When I tried to implement

Re: Why bool( object )?

2009-04-28 Thread Gabriel Genellina
En Tue, 28 Apr 2009 09:22:01 -0300, Colin J. Williams c...@ncf.ca escribió: Lie Ryan wrote: Aaron Brady wrote: This makes it so all objects except False, None, 0, and empty containers are true by default. I am not convinced that 'if a generic object' should have any meaning; it should

Re: inside-out range function

2009-04-28 Thread Scott David Daniels
Steven D'Aprano wrote: ... I wrote a similar function to do this: def monge_shuffle(deck): if len(deck) % 2: # Odd number of items. deck[:] = deck[0::2] + deck[1::2][::-1] else: # Even number of items. deck[:] = deck[1::2] + deck[0::2][::-1] return deck Oooh, shiny

Re: suggestion on a complicated inter-process communication

2009-04-28 Thread Paul Boddie
On 28 Apr, 17:44, Way csw...@gmail.com wrote: Thanks a lot for the reply. I am not familiar with multi-process in Python. I am now using something like: A_prog is an os.system to involk Process3 B_prog is an os.system to involk Process4 ---

Re: stuck with PyOBEX

2009-04-28 Thread Diez B. Roggisch
alejandro wrote: So I installed the module and tryed to make it work but... It gave me: Traceback (most recent call last): File first.py, line 24, in module client2.connect() File C:\Python25\lib\PyOBEX\client.py, line 359, in connect return Client.connect(self, header_list =

  1   2   3   >