Wingware Python IDE version 3.2.4 released

2010-02-01 Thread Stephan Deibel
Hi, Wingware has released version 3.2.4 of Wing IDE, our integrated development environment for the Python programming language. Wing IDE can be used on Windows, Linux, and OS X to develop Python code for web, GUI, and embedded scripting applications. Wing IDE provides auto-completion, call

[ANN]: circuits-1.2.1

2010-02-01 Thread James Mills
Hi, I'm pleased to announce the release of circuits-1.2.1 This is a minor bug fix release. == About == circuits is a Lightweight Event driven Framework for the Python Programming Language, with a strong Component Architecture. circuits also includes a lightweight, high performance and scalable

expy 0.5.1 released

2010-02-01 Thread Yingjie Lan
Hi there, EXPY 0.5.1 released, the exception raising feature is enhanced so that you can raise any builtin exceptions. Custom exceptions will be supported soon. For more information, see http://expy.sourceforge.net/ EXPY is an expressway to extend Python! Regards, Yingjie --

Why this error message

2010-02-01 Thread Ray Holt
Guys, I apologize for the last email asking for help I am going to have to remember to check my indentation. Ray -- http://mail.python.org/mailman/listinfo/python-list

Re: get error install MySQLdb on Mac OS X

2010-02-01 Thread PS.OHM
On Jan 29, 5:02 am, Sean DiZazzo half.ital...@gmail.com wrote: On Jan 28, 12:53 pm, PS.OHM ps.o...@gmail.com wrote: Hello Guys I havegetsomeerrorwhen i install MySQLdb on Mac OS X after i key command $python setup.py build rusult is : : error: command 'gcc-4.0' failed with exit

Re: whassup? builtins? python3000? Naah can't be right?

2010-02-01 Thread Andrej Mitrovic
Hey, it's really simple! Just like the excerpt from the Learning Python book says: Really, the built-in scope is just a built-in module called builtins, but you have to import builtins to query built-ins because the name builtins is not itself built-in :) --

Re: HTML Parser which allows low-keyed local changes?

2010-02-01 Thread Stefan Behnel
Robert, 31.01.2010 20:57: I tried lxml, but after walking and making changes in the element tree, I'm forced to do a full serialization of the whole document (etree.tostring(tree)) - which destroys the human edited format of the original HTML code. makes it rather unreadable. What do you

how long a Str can be used in this python code segment?

2010-02-01 Thread Stephen.Wu
tmp=file.read() (very huge file) if targetStr in tmp: print find it else: print not find file.close() I checked if file.read() is huge to some extend, it doesn't work, but could any give me some certain information on this prolbem? -- http://mail.python.org/mailman/listinfo/python-list

Re: gmtime

2010-02-01 Thread Gary Herron
gazza wrote: Hi, I am trying to discover how to obtain the correct time of say CST/ America and EST/America in python? Any help on this would be appreciated. Thanks, Garyc The datetime module should give you all you need. Gary Herron --

Re: how long a Str can be used in this python code segment?

2010-02-01 Thread Chris Rebert
On Mon, Feb 1, 2010 at 1:17 AM, Stephen.Wu 54wut...@gmail.com wrote: tmp=file.read() (very huge file) if targetStr in tmp:    print find it else:    print not find file.close() I checked if file.read() is huge to some extend, it doesn't work, but could any give me some certain information

Re: how long a Str can be used in this python code segment?

2010-02-01 Thread Gary Herron
Stephen.Wu wrote: tmp=file.read() (very huge file) if targetStr in tmp: print find it else: print not find file.close() I checked if file.read() is huge to some extend, it doesn't work, but could any give me some certain information on this prolbem? Python has no specific limit on

Re: how long a Str can be used in this python code segment?

2010-02-01 Thread Stephen.Wu
On Feb 1, 5:26 pm, Chris Rebert c...@rebertia.com wrote: On Mon, Feb 1, 2010 at 1:17 AM, Stephen.Wu 54wut...@gmail.com wrote: tmp=file.read() (very huge file) if targetStr in tmp:    print find it else:    print not find file.close() I checked if file.read() is huge to some extend,

Re: how long a Str can be used in this python code segment?

2010-02-01 Thread Stefan Behnel
Stephen.Wu, 01.02.2010 10:17: tmp=file.read() (very huge file) if targetStr in tmp: print find it else: print not find file.close() I checked if file.read() is huge to some extend, it doesn't work, but could any give me some certain information on this prolbem? Others have

Re: PEP 3147 - new .pyc format

2010-02-01 Thread Daniel Fetchinson
PEP 3147 has just been posted, proposing that, beginning in release 3.2 (and possibly 2.7) compiled .pyc and .pyo files be placed in a directory with a .pyr extension. The reason is so that compiled versions of a program can coexist, which isn't possible now. Frankly, I think this is a

User-defined exceptions from 2.6

2010-02-01 Thread Joan Miller
Which is the best way to create user-defined exceptions since that *BaseException.message* is deprecated in Python 2.6 ? -- http://mail.python.org/mailman/listinfo/python-list

Re: SimpleXMLRPCServer daemon

2010-02-01 Thread Jean-Michel Pichavant
Gabriel Genellina wrote: En Fri, 29 Jan 2010 12:54:23 -0300, Thomas Allen thomasmal...@gmail.com escribió: I have a script that runs an instance of SimpleXMLRPCServer and in general it works as expected. In its __del__, it is supposed to clean up its PID file (written on boot). I have two

Re: Python-list Digest, Vol 77, Issue 7 *

2010-02-01 Thread Rohit Roger$
Hello Help for datetime module Source code is : *from *datetime *import *datetime d = datetime(datetime.now().year, datetime.now().month, datetime.now().day, 11, 59, 0 ) print d On Mon, Feb 1, 2010 at 3:44 PM, python-list-requ...@python.org wrote: Junk Score: 2 out of 10 (below your Auto

Any Python Module to send ring tones from PC to mobile via GSM modem

2010-02-01 Thread guptha
Hi group, Is there any python module available which sends ring tones from our PC to mobile phone using GSM Modem. I googled in vain to find a solution .I can find few modules like pygsm ,singshotsms by which only sms is send .I could appreciate if some one helps me to find a way to send ring

how to decode rtf characterset ?

2010-02-01 Thread Stef Mientki
hello, I want to translate rtf files to unicode strings. I succeeded in remove all the tags, but now I'm stucked to the special accent characters, like : Vóór the character ó is represented by the string r\'f3, or in bytes: 92, 39,102, 51 so I think I need a way to translate that into the

Re: [Edu-sig] odd drawing problem with turtle.py

2010-02-01 Thread Brian Blais
On Jan 31, 2010, at 23:05 , John Posner wrote: Try commenting out this statement: self.turtle.tracer(False) That helps on Python 2.6.4. interesting. It seems as if the tracer property is a global one: In [1]:t1=Turtle() In [2]:t1.tracer() Out[2]:1 In [3]:t1.tracer(False) In

Re: Any Python Module to send ring tones from PC to mobile via GSM modem

2010-02-01 Thread Tino Wildenhain
Hi Ganesh, Am 01.02.2010 11:35, schrieb guptha: Hi group, Is there any python module available which sends ring tones from our PC to mobile phone using GSM Modem. I googled in vain to find a solution .I can find few modules like pygsm ,singshotsms by which only sms is send .I could appreciate

Embedded python 2.6 in C++ problems

2010-02-01 Thread Paul Atkin
Hi, I'm extending some old Visual Studio 6 MFC code to add embedded python scripting. It works fine most of the time but some python function calls do not work as expected. The C++ code is a multithreaded MFC application. I was assuming that it was GIL issues but I have tried using the manual

Embedded python 2.6 in C++ problems

2010-02-01 Thread Paul Atkin
Hi, I'm extending some old Visual Studio 6 MFC code to add embedded python scripting. It works fine most of the time but some python function calls do not work as expected. The C++ code is a multithreaded MFC application. I was assuming that it was GIL issues but I have tried using the manual

Re: recv_into(bytearray) complains about a pinned buffer

2010-02-01 Thread Antoine Pitrou
Le Mon, 01 Feb 2010 03:30:56 +0100, Martin v. Loewis a écrit : Is this a bug in Python 2.6 or a deliberate choice regarding implementation concerns I don't know about? It's actually a bug also that you pass an array; doing so *should* give the very same error. Well, if you can give

Re: Any Python Module to send ring tones from PC to mobile via GSM modem

2010-02-01 Thread guptha
Hi,Tino Thanks for your reply, My PC is connected with cell phone (through data card) as a modem,and my OS is Ubuntu I have to send ring tones from my PC to any other cell phone by using connected cell phone as a modem (Your first case satisfy my need ) I think with pygsm, it is not possible to

libpcap and python

2010-02-01 Thread Mag Gam
Hello All, I used tcpdump to capture data on my network. I would like to analyze the data using python -- currently using ethereal and wireshark. I would like to get certain type of packets (I can get the hex code for them), what is the best way to do this? Lets say I want to capture all events

Re: User-defined exceptions from 2.6

2010-02-01 Thread Steven D'Aprano
On Mon, 01 Feb 2010 02:19:39 -0800, Joan Miller wrote: Which is the best way to create user-defined exceptions since that *BaseException.message* is deprecated in Python 2.6 ? Inherit from an existing exception. class MyValueException(ValueError): ... pass ... raise

Re: Python and Ruby

2010-02-01 Thread Steve Holden
Steven D'Aprano wrote: On Sun, 31 Jan 2010 22:43:56 -0800, alex23 wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: You're using that term wrong. It looks to me that you don't actually know what a straw man argument is. A straw man argument is when somebody responds to a

Re: User-defined exceptions from 2.6

2010-02-01 Thread Joan Miller
On 1 feb, 12:45, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Mon, 01 Feb 2010 02:19:39 -0800, Joan Miller wrote: Which is the best way to create user-defined exceptions since that *BaseException.message* is deprecated in Python 2.6 ? Inherit from an existing exception.

Re: Python and Ruby

2010-02-01 Thread Steve Holden
Terry Reedy wrote: On 1/31/2010 7:25 PM, Steven D'Aprano wrote: On Sun, 31 Jan 2010 15:40:36 -0800, Chris Rebert wrote: On Sun, Jan 31, 2010 at 2:36 PM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Sun, 31 Jan 2010 04:28:41 -0800, Ed Keith wrote: In most functional

Re: HTML Parser which allows low-keyed local changes (upon serialization)

2010-02-01 Thread Robert
Stefan Behnel wrote: Robert, 31.01.2010 20:57: I tried lxml, but after walking and making changes in the element tree, I'm forced to do a full serialization of the whole document (etree.tostring(tree)) - which destroys the human edited format of the original HTML code. makes it rather

Re: [Edu-sig] odd drawing problem with turtle.py

2010-02-01 Thread Vern Ceder
Brian Blais wrote: On Jan 31, 2010, at 23:05 , John Posner wrote: Try commenting out this statement: self.turtle.tracer(False) That helps on Python 2.6.4. interesting. It seems as if the tracer property is a global one: Actually, the tracer method that does the work is part of the

Re: HTML Parser which allows low-keyed local changes (upon serialization)

2010-02-01 Thread Robert
Robert wrote: Stefan Behnel wrote: Robert, 31.01.2010 20:57: I tried lxml, but after walking and making changes in the element tree, I'm forced to do a full serialization of the whole document (etree.tostring(tree)) - which destroys the human edited format of the original HTML code. makes it

Re: HTML Parser which allows low-keyed local changes (upon serialization)

2010-02-01 Thread Stefan Behnel
Robert, 01.02.2010 14:36: Stefan Behnel wrote: Robert, 31.01.2010 20:57: I tried lxml, but after walking and making changes in the element tree, I'm forced to do a full serialization of the whole document (etree.tostring(tree)) - which destroys the human edited format of the original HTML

Re: libpcap and python

2010-02-01 Thread Grant Edwards
On 2010-02-01, Mag Gam magaw...@gmail.com wrote: Hello All, I used tcpdump to capture data on my network. I would like to analyze the data using python -- currently using ethereal and wireshark. I would like to get certain type of packets (I can get the hex code for them), what is the best

Re: PEP 3147 - new .pyc format

2010-02-01 Thread Steven D'Aprano
On Mon, 01 Feb 2010 11:14:42 +0100, Daniel Fetchinson wrote: I also think the PEP is a great idea and proposes a solution to a real problem. But I also hear the 'directory clutter' argument and I'm really concerned too, having all these extra directories around (and quite a large number of

Re: Unable to install numpy

2010-02-01 Thread Robert Kern
On 2010-01-31 08:03 AM, vsoler wrote: On Jan 18, 9:08 pm, Robert Kernrobert.k...@gmail.com wrote: On 2010-01-18 14:02 PM, vsoler wrote: Hi all, I just download Numpy, and tried to install it using numpy-1.4.0- win32-superpack-python2.6.exe I get an error: Python version 2.6 required,

Re: how long a Str can be used in this python code segment?

2010-02-01 Thread MRAB
Chris Rebert wrote: On Mon, Feb 1, 2010 at 1:17 AM, Stephen.Wu 54wut...@gmail.com wrote: tmp=file.read() (very huge file) if targetStr in tmp: print find it else: print not find file.close() I checked if file.read() is huge to some extend, it doesn't work, but could any give me some

ANN: Wing IDE 3.2.4 released

2010-02-01 Thread Stephan Deibel
Hi, Wingware has released version 3.2.4 of Wing IDE, our integrated development environment for the Python programming language. Wing IDE can be used on Windows, Linux, and OS X to develop Python code for web, GUI, and embedded scripting applications. Wing IDE provides auto-completion, call

Re: Python distutils build problems with MinGW

2010-02-01 Thread Andrej Mitrovic
On Feb 1, 4:03 am, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On Feb 1, 2:59 am, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Hi, I've made a similar post on the Cython mailing list, however I think this is more python-specific. I'm having trouble setting up distutils to

Re: Python distutils build problems with MinGW

2010-02-01 Thread casevh
On Feb 1, 8:31 am, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On Feb 1, 4:03 am, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On Feb 1, 2:59 am, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Hi, I've made a similar post on the Cython mailing list, however I think

Iterating over a function call

2010-02-01 Thread Gerald Britton
Hi -- I have many sections of code like this: for value in value_iterator: value_function(value) I noticed that this does two things I don't like: 1. looks up value_function and value for each iteration, but value_function doesn't change. 2. side effect of (maybe) leaking the

Re: how long a Str can be used in this python code segment?

2010-02-01 Thread Antoine Pitrou
Le Mon, 01 Feb 2010 01:33:09 -0800, Stephen.Wu a écrit : actually, I just use file.read(length) way, i just want to know what exactly para of length I should set, I'm afraid length doesn't equal to the amount of physical memory after trials... There's no exact length you should set, just set

Re: Python distutils build problems with MinGW

2010-02-01 Thread Andrej Mitrovic
I've found the problem: For the windows Python 3.1.1 x86 installation, the file \Python31\Lib \Distutils\command\build_ext.py, has this: Line 313: self.compiler = new_compiler(compiler=None, But Python 2.6 has this line: Line 306: self.compiler =

Re: create a string of variable lenght

2010-02-01 Thread Tracubik
Il Sun, 31 Jan 2010 19:54:17 -0500, Benjamin Kaplan ha scritto: First of all, if you haven't read this before, please do. It will make this much clearer. http://www.joelonsoftware.com/articles/Unicode.html i'm reading it right now, thanks :-) [cut] Solution to your problem: in addition to

Re: Python distutils build problems with MinGW

2010-02-01 Thread Andrej Mitrovic
On Feb 1, 5:44 pm, casevh cas...@gmail.com wrote: On Feb 1, 8:31 am, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On Feb 1, 4:03 am, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On Feb 1, 2:59 am, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Hi, I've made a

Re: Python distutils build problems with MinGW

2010-02-01 Thread Andrej Mitrovic
Well, in any case this seems to be working ok for me now. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to decode rtf characterset ?

2010-02-01 Thread MRAB
Stef Mientki wrote: hello, I want to translate rtf files to unicode strings. I succeeded in remove all the tags, but now I'm stucked to the special accent characters, like : Vóór the character ó is represented by the string r\'f3, or in bytes: 92, 39,102, 51 so I think I need a way to

Re: HTML Parser which allows low-keyed local changes (upon serialization)

2010-02-01 Thread Robert
Stefan Behnel wrote: Robert, 01.02.2010 14:36: Stefan Behnel wrote: Robert, 31.01.2010 20:57: I tried lxml, but after walking and making changes in the element tree, I'm forced to do a full serialization of the whole document (etree.tostring(tree)) - which destroys the human edited format of

Re: [Edu-sig] odd drawing problem with turtle.py

2010-02-01 Thread kirby urner
On Mon, Feb 1, 2010 at 3:27 AM, Brian Blais bbl...@bryant.edu wro I don't see where you've defined a Turtle class to instantiate sir. Turtle is given in turtle.py. I should have subclassed it, but I was being lazy. :) thanks for the fast replies! bb No obvious need to

Re: HTML Parser which allows low-keyed local changes (upon serialization)

2010-02-01 Thread M.-A. Lemburg
Robert wrote: I think you confused the logical level of what I meant with file position: Of course its not about (necessarily) writing back to the same open file (OS-level), but regarding the whole serializiation string (wherever it is finally written to - I typically write the auto-converted

Re: how to decode rtf characterset ?

2010-02-01 Thread M.-A. Lemburg
Stef Mientki wrote: hello, I want to translate rtf files to unicode strings. I succeeded in remove all the tags, but now I'm stucked to the special accent characters, like : Vóór the character ó is represented by the string r\'f3, or in bytes: 92, 39,102, 51 so I think I need a way

Re: create a string of variable lenght

2010-02-01 Thread Benjamin Kaplan
On Mon, Feb 1, 2010 at 12:00 PM, Tracubik affdfsdfds...@b.com wrote: Il Sun, 31 Jan 2010 19:54:17 -0500, Benjamin Kaplan ha scritto: First of all, if you haven't read this before, please do. It will make this much clearer. http://www.joelonsoftware.com/articles/Unicode.html i'm reading it

Re: Python-list Digest, Vol 77, Issue 7 *

2010-02-01 Thread Gabriel Genellina
En Mon, 01 Feb 2010 07:26:13 -0300, Rohit Roger$ rohitraj...@gmail.com escribió: Help for datetime module Source code is : from datetime import datetime d = datetime(datetime.now().year, datetime.now().month, datetime.now().day, 11, 59, 0 ) print d And your problem is...? This is what I

Re: Iterating over a function call

2010-02-01 Thread Diez B. Roggisch
So.I'm wondering if there is any interest in an apply() built-in function that would work like map() does in 2.x (calls the function with each value returned by the iterator) but return nothing. Maybe apply isn't the best name; it's just the first one that occurred to me. Or is this just

Re: Iterating over a function call

2010-02-01 Thread Arnaud Delobelle
Gerald Britton gerald.brit...@gmail.com writes: Hi -- I have many sections of code like this: for value in value_iterator: value_function(value) I noticed that this does two things I don't like: 1. looks up value_function and value for each iteration, but value_function

Adding methods from one class to another, dynamically

2010-02-01 Thread Oltmans
Hello Python gurus, I'm quite new when it comes to Python so I will appreciate any help. Here is what I'm trying to do. I've two classes like below import new import unittest class test(unittest.TestCase): def test_first(self): print 'first test' def test_second(self):

Re: PEP 3147 - new .pyc format

2010-02-01 Thread Daniel Fetchinson
I also think the PEP is a great idea and proposes a solution to a real problem. But I also hear the 'directory clutter' argument and I'm really concerned too, having all these extra directories around (and quite a large number of them indeed!). Keep in mind that if you don't explicitly ask

Re: Adding methods from one class to another, dynamically

2010-02-01 Thread Chris Rebert
On Mon, Feb 1, 2010 at 12:06 PM, Oltmans rolf.oltm...@gmail.com wrote: Hello Python gurus, I'm quite new when it comes to Python so I will appreciate any help. Here is what I'm trying to do. I've two classes like below import new import unittest class test(unittest.TestCase):    def

Re: Iterating over a function call

2010-02-01 Thread Gerald Britton
[snip[ You have itertools.consume which is close to what you want:    consume(imap(func, iterable)) # 2.x    consume(map(func, iterable)) # 3.x HTH It does! Though in my case this is simpler: deque(imap(func, iterable), 0) since the recipe for consume just calls deque anyway when

Re: Adding methods from one class to another, dynamically

2010-02-01 Thread Carl Banks
On Feb 1, 12:06 pm, Oltmans rolf.oltm...@gmail.com wrote: Hello Python gurus, I'm quite new when it comes to Python so I will appreciate any help. Here is what I'm trying to do. I've two classes like below import new import unittest class test(unittest.TestCase):     def

Re: Adding methods from one class to another, dynamically

2010-02-01 Thread Gerald Britton
Or you could just do a mixin: tee.__class__.__bases__ = (test,) + tee.__class__.__bases__ On Mon, Feb 1, 2010 at 3:25 PM, Chris Rebert c...@rebertia.com wrote: On Mon, Feb 1, 2010 at 12:06 PM, Oltmans rolf.oltm...@gmail.com wrote: Hello Python gurus, I'm quite new when it comes to Python

Re: get error install MySQLdb on Mac OS X

2010-02-01 Thread Ned Deily
In article 2be17362-8a54-4a04-9671-0a0ff7266...@k2g2000pro.googlegroups.com, PS.OHM ps.o...@gmail.com wrote: On Jan 29, 5:02 am, Sean DiZazzo half.ital...@gmail.com wrote: On Jan 28, 12:53 pm, PS.OHM ps.o...@gmail.com wrote: I havegetsomeerrorwhen i install MySQLdb on Mac OS X after i

Re: libpcap and python

2010-02-01 Thread Terry Reedy
On 2/1/2010 7:47 AM, Mag Gam wrote: Hello All, I used tcpdump to capture data on my network. I would like to analyze the data using python -- currently using ethereal and wireshark. I would like to get certain type of packets (I can get the hex code for them), what is the best way to do this?

Re: Adding methods from one class to another, dynamically

2010-02-01 Thread Oltmans
Thank you for your help, Chris. Looks like I can now attach methods to class 'tee'. However, after attaching methods to 'tee' when I try to run them using suite.run() I don't see any of the methods running, I'm sorry but I've no clue what's failing this. Any insights will be highly appreciated.

Re: Adding methods from one class to another, dynamically

2010-02-01 Thread Steve Holden
Oltmans wrote: Thank you for your help, Chris. Looks like I can now attach methods to class 'tee'. However, after attaching methods to 'tee' when I try to run them using suite.run() I don't see any of the methods running, I'm sorry but I've no clue what's failing this. Any insights will be

CheddarGetter module for Python - easy recurring billing

2010-02-01 Thread Jason
We just released pychedder, an open source module for integrating CheddarGetter with Python (and Django): http://www.feedmagnet.com/blog/cheddargetter-for-python-and-django/ Anyone who's built commercial web app knows that payment processing can be one of the toughest pieces to put in place -

Re: starting a thread in a nother thread

2010-02-01 Thread Aahz
In article 4b60a661$0$1598$742ec...@news.sonic.net, John Nagle na...@animats.com wrote: If a C package called from Python crashes, the package is defective. Nothing you can do from Python should be able to cause a segmentation fault. ...unless you use ctypes. -- Aahz (a...@pythoncraft.com)

Problems embedding python 2.6 in C++

2010-02-01 Thread Paul
Hi, I'm extending some old Visual Studio 6 code to add embedded python scripting. It works fine most of the time but some python function calls do not work as expected. The C++ code is a multithreaded MFC application. I was assuming that it was GIL issues but I have tried using the manual

Re: Function name unchanged in error message

2010-02-01 Thread Gabriel Genellina
En Sat, 30 Jan 2010 06:28:19 -0300, Peter Otten __pete...@web.de escribió: Gabriel Genellina wrote: En Fri, 29 Jan 2010 13:09:40 -0300, Michele Simionato michele.simion...@gmail.com escribió: On Jan 29, 2:30 pm, andrew cooke and...@acooke.org wrote: Is there any way to change the name of

Re: Processing XML File

2010-02-01 Thread jakecjacobson
On Jan 29, 2:41 pm, Stefan Behnel stefan...@behnel.de wrote: Sells, Fred, 29.01.2010 20:31: Google is your friend.  Elementtree is one of the better documented IMHO, but there are many modules to do this. Unless the OP provides some more information, do this is rather underdefined. And

Re: OT: Instant Messenger Clients

2010-02-01 Thread Gabriel Genellina
En Sun, 31 Jan 2010 18:15:34 -0300, Victor Subervi victorsube...@gmail.com escribió: I need to record my IM conversations. I'm using Gmal's IM client and I can't figure out how to do it, nor do I find any help googling it. Hard to believe... http://www.google.com/talk/chathistory.html --

Re: Python and Ruby

2010-02-01 Thread Jonathan Gardner
On Jan 30, 8:43 am, Nobody nob...@nowhere.com wrote: On Wed, 27 Jan 2010 15:29:05 -0800, Jonathan Gardner wrote: Python is much, much cleaner. I don't know how anyone can honestly say Ruby is cleaner than Python. I'm not familiar with Ruby, but most languages are cleaner than Python once

Re: whassup? builtins? python3000? Naah can't be right?

2010-02-01 Thread Gabriel Genellina
En Sun, 31 Jan 2010 18:17:04 -0300, _wolf wolfgang.l...@gmail.com escribió: dear pythoneers, i would be very gladly accept any commentaries about what this sentence, gleaned from http://celabs.com/python-3.1/reference/executionmodel.html, is meant to mean, or why gods have decided this is

Re: Python and Ruby

2010-02-01 Thread Jonathan Gardner
On Jan 31, 3:01 am, rantingrick rantingr...@gmail.com wrote: On Jan 30, 10:43 am, Nobody nob...@nowhere.com wrote: That's also true for most functional languages, e.g. Haskell and ML, as well as e.g. Tcl and most shells. Why require f(x) or (f x) if f x will suffice? yuck! wrapping the

Re: ftp.storlines error

2010-02-01 Thread Gabriel Genellina
En Sun, 31 Jan 2010 19:07:44 -0300, Mik0b0 new...@gmail.com escribió: Good day/night/etc. I am rather a newb in Python (learning Python 3). I am trying to create a small script for FTP file uploads on my home network. The script looks like this: from ftplib import FTP ftp=FTP('10.0.0.1')

Re: Iterating over a function call

2010-02-01 Thread Vlastimil Brom
2010/2/1 Gerald Britton gerald.brit...@gmail.com: Hi -- I have many sections of code like this:    for value in value_iterator:         value_function(value) I noticed that this does two things I don't like: ... -- Gerald Britton -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Ruby

2010-02-01 Thread Jonathan Gardner
On Jan 31, 12:43 pm, Nobody nob...@nowhere.com wrote: If it was common-place to use Curried functions and partial application in Python, you'd probably prefer f a b c to f(a)(b)(c) as well. That's just the point. It isn't common to play with curried functions or monads or anything like that

converting XML to hash/dict/CustomTreeCtrl

2010-02-01 Thread Astan Chee
Hi, I have xml files that I want to convert to a hash/dict and then further placed in a wx CustomTreeCtrl based on the structure. The problem I am having now is that the XML file is very unusual and there aren't any unique identifiers to be put in a dict and because there are no unique

Modules failing to add runtime library path info at link time

2010-02-01 Thread cjblaine
Hey everyone, this has been driving me crazy for long enough now that I'm motivated to post and find an answer. Before I pose my question, let me state that using LD_LIBRARY_PATH is not the answer :) We have things installed in odd places, such as very specific versions of libraries to link

Re: Iterating over a function call

2010-02-01 Thread Terry Reedy
On 2/1/2010 11:50 AM, Gerald Britton wrote: Hi -- I have many sections of code like this: for value in value_iterator: value_function(value) I noticed that this does two things I don't like: 1. looks up value_function and value for each iteration, but value_function doesn't

Re: Problems embedding python 2.6 in C++

2010-02-01 Thread Gabriel Genellina
En Mon, 01 Feb 2010 18:21:56 -0300, Paul goblado...@gmail.com escribió: I'm extending some old Visual Studio 6 code to add embedded python scripting. It works fine most of the time but some python function calls do not work as expected. The C++ code is a multithreaded MFC application. I was

Re: Iterating over a function call

2010-02-01 Thread Terry Reedy
On 2/1/2010 3:05 PM, Arnaud Delobelle wrote: You have itertools.consume which is close to what you want: consume(imap(func, iterable)) # 2.x consume(map(func, iterable)) # 3.x Consume is not in itertools. It is one of many recipes in the doc (9.7.2). For exhausting an iterator,

Re: Python and Ruby

2010-02-01 Thread Chris Rebert
On Mon, Feb 1, 2010 at 2:28 PM, Jonathan Gardner jgard...@jonathangardner.net wrote: On Jan 31, 3:01 am, rantingrick rantingr...@gmail.com wrote: On Jan 30, 10:43 am, Nobody nob...@nowhere.com wrote: That's also true for most functional languages, e.g. Haskell and ML, as well as e.g. Tcl and

Re: myths about python 3

2010-02-01 Thread Anssi Saari
Blog blogtes...@gmail.com writes: Where did you come up with that information? Almost all of the major distros ship with 2.6.x - CentOS, OpenSuSe, Ubuntu, Fedora. (Debian does ship with 2.5, but the next major release sid' is due out in Q2) I don't see Python 2.6 in my CentOS 5.4

Re: recv_into(bytearray) complains about a pinned buffer

2010-02-01 Thread Martin v. Loewis
Antoine Pitrou wrote: Le Mon, 01 Feb 2010 03:30:56 +0100, Martin v. Loewis a écrit : Is this a bug in Python 2.6 or a deliberate choice regarding implementation concerns I don't know about? It's actually a bug also that you pass an array; doing so *should* give the very same error. Well,

Re: Python and Ruby

2010-02-01 Thread Paul Rubin
Jonathan Gardner jgard...@jonathangardner.net writes: I judge a language's simplicity by how long it takes to explain the complete language. That is, what minimal set of documentation do you need to describe all of the language? With a handful of statements, and a very short list of operators,

Re: interaction of mode 'r+', file.write(), and file.tell(): a bug or undefined behavior?

2010-02-01 Thread Aahz
In article 4b617f4...@dnews.tpgi.com.au, Lie Ryan lie.1...@gmail.com wrote: f = open('input.txt', 'r+') for line in f: s = line.replace('python', 'PYTHON') # f.tell() f.write(s) When f.tell() is commented, 'input.txt' does not change; but when uncommented, the f.write() succeeded

Optimized bytecode in exec statement

2010-02-01 Thread Hermann Lauer
Dear All, while trying to optimize some unpack operations with self compiling code I wondered howto invoke the optimization in the exec statement. Even starting with -O or -OO yields in Python 2.5.2 the same dis.dis code, which is appended below. My interest would be to reduce the LOAD_FAST ops

Re: recv_into(bytearray) complains about a pinned buffer

2010-02-01 Thread Andrew Dalke
On Feb 2, 12:12 am, Martin v. Loewis wrote: My recommendation would be to not use recv_into in 2.x, but only in 3.x. I don't think that's the full solution. The array module should also implement the new buffer API, so that it would also fail with the old recv_into. Okay. But recv_into was

Re: PEP 3147 - new .pyc format

2010-02-01 Thread Steven D'Aprano
On Mon, 01 Feb 2010 21:19:52 +0100, Daniel Fetchinson wrote: Personally, I think it is a terribly idea to keep the source file and byte code file in such radically different places. They should be kept together. What you call clutter I call having the files that belong together kept together.

Re: Modules failing to add runtime library path info at link time

2010-02-01 Thread Christian Heimes
cjblaine wrote: Where/how can I configure the appropriate portion of our Python install to do 100% the right thing instead of just 50% (-L)? Python's distutils doesn't alter the library search path unless you tell it explicitly. A specific example -- note the -L and lack of -R (Solaris

Re: Optimized bytecode in exec statement

2010-02-01 Thread Terry Reedy
On 2/1/2010 6:05 PM, Hermann Lauer wrote: Dear All, while trying to optimize some unpack operations with self compiling code I wondered howto invoke the optimization in the exec statement. Even starting with -O or -OO yields in Python 2.5.2 the same dis.dis code, which is appended below.

Re: For loop searching takes too long!

2010-02-01 Thread Steven D'Aprano
On Mon, 01 Feb 2010 14:04:01 -0800, Jonathan Gardner wrote: Having worked with datasets that are truly enormous, whenever I see a list that is unbounded (as this appears to be), I freak out because unbounded can be a really, really big number. Might as well write software that works for the

Re: Optimized bytecode in exec statement

2010-02-01 Thread Christian Heimes
Terry Reedy wrote: Currently, as far as I know, -0 just removes asserts. -O (not -0) also sets __debug__ to False. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Optimized bytecode in exec statement

2010-02-01 Thread Gabriel Genellina
En Mon, 01 Feb 2010 20:05:16 -0300, Hermann Lauer hermann.la...@iwr.uni-heidelberg.de escribió: while trying to optimize some unpack operations with self compiling code I wondered howto invoke the optimization in the exec statement. Even starting with -O or -OO yields in Python 2.5.2 the same

Re: Python and Ruby

2010-02-01 Thread Nobody
On Sun, 31 Jan 2010 22:36:32 +, Steven D'Aprano wrote: for example, in if you have a function 'f' which takes two parameters to call the function and get the result you use: f 2 3 If you want the function itself you use: f How do you call a function of no arguments? There's

Re: Python and Ruby

2010-02-01 Thread MRAB
Nobody wrote: On Sun, 31 Jan 2010 22:36:32 +, Steven D'Aprano wrote: for example, in if you have a function 'f' which takes two parameters to call the function and get the result you use: f 2 3 If you want the function itself you use: f How do you call a function of no arguments?

Re: Python and Ruby

2010-02-01 Thread Chris Rebert
On Mon, Feb 1, 2010 at 6:14 PM, MRAB pyt...@mrabarnett.plus.com wrote: Nobody wrote: On Sun, 31 Jan 2010 22:36:32 +, Steven D'Aprano wrote: for example, in if you have a function 'f' which takes two parameters to call the function and get the result you use:  f 2 3 If you want the

Re: Python and Ruby

2010-02-01 Thread Nobody
On Mon, 01 Feb 2010 14:35:57 -0800, Jonathan Gardner wrote: If it was common-place to use Curried functions and partial application in Python, you'd probably prefer f a b c to f(a)(b)(c) as well. That's just the point. It isn't common to play with curried functions or monads or anything

  1   2   3   >