ANN: Celery 1.0 released

2010-02-11 Thread Ask Solem
=== Celery 1.0 has been released! === We're happy to announce the release of Celery 1.0. What is it? === Celery is a task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports

[ANN] pyxser-1.4.2r --- Python Object to XML serializer/deserializer

2010-02-11 Thread Daniel Molina Wegener
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hello Python Community. I'm pleased to announce pyxser-1.4.2r, a python extension which contains functions to serialize and deserialize Python Objects into XML. It is a model based serializer. Here is the ChangeLog entry for this release: -

Announcing IronPython 2.6.1 RC1

2010-02-11 Thread David DiCato
Hello Python Community, We're pleased to announce the release of IronPython 2.6.1 RC1. This version of IronPython makes great strides in stability and compatibility, including a considerable number of targeted bugfixes. Because this is our largest servicing release to date, and due to our

Announce: Linux Desktop Testing Project (LDTP) 2.0.3 released

2010-02-11 Thread Nagappan Alagappan
Hello, About LDTP: Linux Desktop Testing Project is aimed at producing high quality test automation framework (using GNOME / Python) and cutting-edge tools that can be used to test Linux Desktop and improve it. It uses the Accessibility libraries to poke through the application's user interface.

Re: Modifying Class Object

2010-02-11 Thread Alf P. Steinbach
* I V: On Thu, 11 Feb 2010 07:37:35 +0100, Alf P. Steinbach wrote: * Steven D'Aprano: s = [1] t = s # Binds the name t to the object bound to the name s. t[0] = 2 # Changes the object bound to the name t print(s) # Checks the object via the original name. Notice that your

Re: I've built Python, but can't figure out how to package it for windows

2010-02-11 Thread Tim Golden
On 11/02/2010 05:24, Mark Jones wrote: [... problems building from tools/msi ...] I sympathise. I went through similar hoops last year, merely to be able to do it. I think I'm right in saying that very few people are bothered enough to package their own MSI on windows because the (probably very

Re: Executing Commands From Windows Service

2010-02-11 Thread Tim Golden
On 10/02/2010 22:55, T wrote: Great suggestions once again - I did verify that it was at least running the plink.exe binary when under LocalSystem by having the service run plink.exe C:\plinkoutput.txt - this worked fine. And, as I mentioned, it's now working just fine when running under a

Re: ANN: obfuscate

2010-02-11 Thread Christian Heimes
Gregory Ewing wrote: Actually I gather it had a lot to do with the fact that the Germans made some blunders in the way they used the Enigma that seriously compromised its security. There was reportedly a branch of the German forces that used their Enigmas differently, avoiding those mistakes,

how to improve this cycle (extracting data from structured array)?

2010-02-11 Thread Alexzive
Hello guys, I am just wondering if there is a quick way to improve this algorithm [N is a structured array which hold info about the nodes n of a finite element mesh, and n is about 300.000). I need to extract info from N and put it in to a 3*n matrix NN which I reshape then with numpy. I think

Re: how to improve this cycle (extracting data from structured array)?

2010-02-11 Thread Tim Chase
Alexzive wrote: I am just wondering if there is a quick way to improve this algorithm [N is a structured array which hold info about the nodes n of a finite element mesh, and n is about 300.000). I need to extract info from N and put it in to a 3*n matrix NN which I reshape then with numpy. I

Bizarre arithmetic results

2010-02-11 Thread Terrence Cole
Can someone explain to me what python is doing here? Python 3.1.1 (r311:74480, Feb 3 2010, 13:36:47) [GCC 4.3.4] on linux2 Type help, copyright, credits or license for more information. -0.1 ** 0.1 -0.7943282347242815 a = -0.1; b = 0.1 a ** b (0.7554510437117542+0.2454609236416552j) -abs(a

Re: Re: sqlite3 bug?

2010-02-11 Thread wayne . dads . bell
Thank you It just highlights that when your tired things can easily be missed and maybe you should leave things until the morning to view things with fresh eyes =) -- http://mail.python.org/mailman/listinfo/python-list

Re: Modifying Class Object

2010-02-11 Thread Arnaud Delobelle
Alf P. Steinbach al...@start.no writes: [...] That's bullshit. [...] not any that you know about. [...] yet another ad hominem attack [...] It also reflects rather badly on you. [...] - Alf Alf, The above was extracted from the last post from you but I could have picked almost any of your

Re: ANN: obfuscate

2010-02-11 Thread Gregory Ewing
Daniel Fetchinson wrote: It also turned out that everybody mostly writes his/her own obfuscation routine. Hey, it gives you the additional advantage of obfuscation by obscurity! -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: obfuscate

2010-02-11 Thread Paul Rubin
Gregory Ewing greg.ew...@canterbury.ac.nz writes: Actually I gather it had a lot to do with the fact that the Germans made some blunders in the way they used the Enigma that seriously compromised its security. There was reportedly a branch of the German forces that used their Enigmas

Unicode strings

2010-02-11 Thread aabelyakov
Excellent! But what about the unicode -- http://mail.python.org/mailman/listinfo/python-list

Re: Bizarre arithmetic results

2010-02-11 Thread Andre Engels
On Thu, Feb 11, 2010 at 1:44 AM, Terrence Cole list-s...@trainedmonkeystudios.org wrote: Can someone explain to me what python is doing here? Python 3.1.1 (r311:74480, Feb  3 2010, 13:36:47) [GCC 4.3.4] on linux2 Type help, copyright, credits or license for more information. -0.1 ** 0.1

Re: Bizarre arithmetic results

2010-02-11 Thread Mark Dickinson
On Feb 11, 12:44 am, Terrence Cole list- s...@trainedmonkeystudios.org wrote: Can someone explain to me what python is doing here? -0.1 ** 0.1 -0.7943282347242815 Here you're computing -(0.1 ** 0.1). The exponentiation operator binds more strongly than the negation operator. a = -0.1; b

Re: Bizarre arithmetic results

2010-02-11 Thread Peter Otten
Terrence Cole wrote: Can someone explain to me what python is doing here? Python 3.1.1 (r311:74480, Feb 3 2010, 13:36:47) [GCC 4.3.4] on linux2 Type help, copyright, credits or license for more information. -0.1 ** 0.1 -0.7943282347242815 a = -0.1; b = 0.1 a ** b

Re: Bizarre arithmetic results

2010-02-11 Thread Shashwat Anand
Do you really believe that -0.1 ** 0.1 is a valid computational problem ? Can you raise a negative number to a fractional power ? Output on my console (python 2.6) -.1 ** .1 -0.79432823472428149 a,b = -.1,.1 a**b Traceback (most recent call last): File stdin, line 1, in module ValueError:

Re: Bizarre arithmetic results

2010-02-11 Thread Christian Heimes
Terrence Cole wrote: -0.1 ** 0.1 -0.7943282347242815 a = -0.1; b = 0.1 a ** b (0.7554510437117542+0.2454609236416552j) -abs(a ** b) -0.7943282347242815 Why does the literal version return the signed magnitude and the variable version return a complex? The binary power operator has a

Re: Bizarre arithmetic results

2010-02-11 Thread Shashwat Anand
Just realized my flaw .1**.1 0.79432823472428149 (-.1)**(.1) Traceback (most recent call last): File stdin, line 1, in module ValueError: negative number cannot be raised to a fractional power - a ** b = - (a ** b) and not (-a) ** b, Thats why -.1**.1 giving you -0.79432823472428149 since .1

Re: Bizarre arithmetic results

2010-02-11 Thread Jussi Piitulainen
Terrence Cole writes: Can someone explain to me what python is doing here? Python 3.1.1 (r311:74480, Feb 3 2010, 13:36:47) [GCC 4.3.4] on linux2 Type help, copyright, credits or license for more information. -0.1 ** 0.1 -0.7943282347242815 a = -0.1; b = 0.1 a ** b

Re: Bizarre arithmetic results

2010-02-11 Thread Tim Chase
Terrence Cole wrote: Can someone explain to me what python is doing here? Python 3.1.1 (r311:74480, Feb 3 2010, 13:36:47) [GCC 4.3.4] on linux2 Type help, copyright, credits or license for more information. -0.1 ** 0.1 -0.7943282347242815 a = -0.1; b = 0.1 a ** b

Re: Bizarre arithmetic results

2010-02-11 Thread Daniel Fetchinson
On 2/11/10, Terrence Cole list-s...@trainedmonkeystudios.org wrote: Can someone explain to me what python is doing here? Python 3.1.1 (r311:74480, Feb 3 2010, 13:36:47) [GCC 4.3.4] on linux2 Type help, copyright, credits or license for more information. -0.1 ** 0.1 -0.7943282347242815 a =

Re: Executing Commands From Windows Service

2010-02-11 Thread Martin P. Hellwig
On 02/07/10 19:02, T wrote: I have a script, which runs as a Windows service under the LocalSystem account, that I wish to have execute some commands. Specifically, the program will call plink.exe to create a reverse SSH tunnel. Right now I'm using subprocess.Popen to do so. When I run it

Re: SimpleXMLRPCServer and client address

2010-02-11 Thread Jean-Michel Pichavant
Stephen Hansen wrote: On Wed, Feb 10, 2010 at 5:36 PM, Jean-Michel Pichavant jeanmic...@sequans.com mailto:jeanmic...@sequans.com wrote: I don't know exactly what you are trying to do, but if your server requires informations from the client, it would be better to ask explicitly

exception in Tkinter on Ubtunu...

2010-02-11 Thread Lumbee
...hey guys, I posted this over on the Ubuntu forums with no luck. I'm running Ubuntu 9.10 and python 2.5. In Idle when I type in a function I get this error... Exception in Tkinter callback Traceback (most recent call last): File /usr/lib/python2.5/lib-tk/Tkinter.py, line 1417, in __call__

Re: Your beloved python features

2010-02-11 Thread jhermann
$ python -c import this -- http://mail.python.org/mailman/listinfo/python-list

Re: Bizarre arithmetic results

2010-02-11 Thread Duncan Booth
Tim Chase python.l...@tim.thechases.com wrote: But perhaps Py3 changes evaluation, returning an complex number. Yes, the change is documented at http://docs.python.org/3.1/reference/expressions.html#the-power-operator If it is in any of the What's new in Python x.xx documents or in a PEP

base32hex support in python?

2010-02-11 Thread Vishal Shetye
Hi, One of the modules that I am currently working on requires base32hex encoding as defined by RFC 4648, section 7. I checked base64 module which has base32encode/decode functionality but not with extended hex alphabet. Is there a module, currently available, that provides this? As far as I

Re: how to improve this cycle (extracting data from structured array)?

2010-02-11 Thread Alexzive
On Feb 11, 1:08 pm, Tim Chase python.l...@tim.thechases.com wrote: Alexzive wrote: I am just wondering if there is a quick way to improve this algorithm [N is a structured array which hold info about the nodes n of a finite element mesh, and n is about 300.000). I need to extract info from

Re: Bizarre arithmetic results

2010-02-11 Thread Mark Dickinson
On Feb 11, 1:38 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: Tim Chase python.l...@tim.thechases.com wrote: But perhaps Py3 changes evaluation, returning an complex number. Yes, the change is documented athttp://docs.python.org/3.1/reference/expressions.html#the-power-operator If

python crash on windows but not on linux

2010-02-11 Thread hjebbers
To all, I am running an EDI translator, and doing stress tests. When processing a test with a (relatively) big EDI file(s) on windowsXP I get a crash: 'sorry for the inconvenience' etc (so no clues about what is causing the problem) This happens with python 2.4, 2.5, 2.6 It does not happen

Re: method names nounVerb or verbNoun

2010-02-11 Thread cjw
On 05-Feb-10 14:53 PM, Wanderer wrote: Which is the more accepted way to compose method names nounVerb or verbNoun? For example voltageGet or getVoltage? getVoltage sounds more normal, but voltageGet is more like voltage.Get. I seem to mix them and I should probably pick one way and stick with

Re: Bizarre arithmetic results

2010-02-11 Thread Robert Kern
On 2010-02-11 06:31 AM, Shashwat Anand wrote: Do you really believe that -0.1 ** 0.1 is a valid computational problem ? Can you raise a negative number to a fractional power ? Output on my console (python 2.6) -.1 ** .1 -0.79432823472428149 a,b = -.1,.1 a**b Traceback (most recent call

Re: Modifying Class Object

2010-02-11 Thread Steve Holden
Alf P. Steinbach wrote: * Steve Holden: [...] In this particular part of the thread I am attempting, unsuccessfully, to convince you that a change in *your* behavior would lead to less hostility directed towards the way you present your ideas. You apparently feel it is quite acceptable to

Re: Modifying Class Object

2010-02-11 Thread Steve Holden
Alf P. Steinbach wrote: * Steven D'Aprano: [...] accusing them of lying for having an opinion that differs from yours, That is untrue. Well, that says it all really. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010

Any way to turn off exception handling? (debugging)

2010-02-11 Thread mk
Hello everyone, I'm getting an exception (on socket) handled in a program I'm trying to debug. I have trouble locating where exactly that happens. In such situation turning exception handling off could be useful, bc unhandled exception stack trace is precisely what I'm trying to obtain.

Re: method names nounVerb or verbNoun

2010-02-11 Thread Martin P. Hellwig
On 02/05/10 19:53, Wanderer wrote: Which is the more accepted way to compose method names nounVerb or verbNoun? For example voltageGet or getVoltage? getVoltage sounds more normal, but voltageGet is more like voltage.Get. I seem to mix them and I should probably pick one way and stick with it.

Re: Bizarre arithmetic results

2010-02-11 Thread Jussi Piitulainen
Robert Kern writes: On 2010-02-11 06:31 AM, Shashwat Anand wrote: There is a little issue here that ' -.1 ** .1' should give you error message. That is it. No, fractional powers of negative numbers are perfectly valid mathematically. The result is a complex number. In Python 3 (what the

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread Steve Holden
mk wrote: Hello everyone, I'm getting an exception (on socket) handled in a program I'm trying to debug. I have trouble locating where exactly that happens. In such situation turning exception handling off could be useful, bc unhandled exception stack trace is precisely what I'm trying to

Re: Need debugging knowhow for my creeping Unicodephobia

2010-02-11 Thread mk
kj wrote: I have read a *ton* of stuff on Unicode. It doesn't even seem all that hard. Or so I think. Then I start writing code, and WHAM: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128) (There, see? My Unicodephobia just went up a notch.)

Re: Dreaming of new generation IDE

2010-02-11 Thread Bruno Desthuilliers
catonano a écrit : (snip) Today, I tried to understand the twisted.web.client code and I found 3 methods I couldn't find by who were called. I asked on the mailing list and they suggested me where they were called and that the tool for such thing is grep. So, you grep, you get a list of files,

Re: Terminating threaded programs

2010-02-11 Thread Aahz
In article mailman.1961.1265383809.28905.python-l...@python.org, mk mrk...@gmail.com wrote: I have a problem with a threaded program: it frequently hangs on sys.exit. The problem is that my program uses threads which in turn use paramiko library, which itself is threaded. I try to gracefully

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread mk
Steve Holden wrote: I'm getting an exception (on socket) handled in a program I'm trying to debug. I have trouble locating where exactly that happens. If the exception is currently being trapped by a handler in your code It's not my code. you could just insert a raise statement at the

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread Simon Brunning
On 11 February 2010 16:17, mk mrk...@gmail.com wrote: I'm getting an exception (on socket) handled in a program I'm trying to debug. I have trouble locating where exactly that happens. In such situation turning exception handling off could be useful, bc unhandled exception stack trace is

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread mk
Simon Brunning wrote: Not as far as I know. Besides, the chances are that if you were to be able to turn off exception handling altogether your code wouldn't make it as far as the code you are interested in anyway. Sure, but I could deal with that, jerry-rigging the code as exceptions go by,

Re: Dreaming of new generation IDE

2010-02-11 Thread Francis Carr
I can't believe the code editing situation today is in a such sorry state. I can't believe an old coder is feeling so sorry for himself. Today, I tried to understand the twisted.web.client code and I found 3 methods I couldn't find by who were called. I asked on the mailing list and they

Re: Need debugging knowhow for my creeping Unicodephobia

2010-02-11 Thread kj
In mailman.2379.1265906673.28905.python-l...@python.org mk mrk...@gmail.com writes: To make matters more complicated, str.encode() internally DECODES from string into unicode: nu '\xc4\x84' type(nu) type 'str' nu.encode() Traceback (most recent call last): File stdin, line 1, in

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread Stephen Hansen
On Thu, Feb 11, 2010 at 9:32 AM, mk mrk...@gmail.com wrote: Simon Brunning wrote: Not as far as I know. Besides, the chances are that if you were to be able to turn off exception handling altogether your code wouldn't make it as far as the code you are interested in anyway. Sure, but I

Re: Need debugging knowhow for my creeping Unicodephobia

2010-02-11 Thread MRAB
mk wrote: kj wrote: I have read a *ton* of stuff on Unicode. It doesn't even seem all that hard. Or so I think. Then I start writing code, and WHAM: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128) (There, see? My Unicodephobia just went

Re: ANN: obfuscate

2010-02-11 Thread MRAB
Christian Heimes wrote: Gregory Ewing wrote: Actually I gather it had a lot to do with the fact that the Germans made some blunders in the way they used the Enigma that seriously compromised its security. There was reportedly a branch of the German forces that used their Enigmas differently,

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread mk
the uncommon, the exceptional, case. If one could somehow turn off exceptions, you can't even do a for loop: every for loop would become infinite-- exceptions are how Python signals the end of an iterator. Think about that, *every* for loop in Python suddenly breaks. Ouch. Sure I

Re: ANN: obfuscate

2010-02-11 Thread Matthew Barnett
Paul Rubin wrote: Gregory Ewing greg.ew...@canterbury.ac.nz writes: Actually I gather it had a lot to do with the fact that the Germans made some blunders in the way they used the Enigma that seriously compromised its security. There was reportedly a branch of the German forces that used their

Re: ANN: obfuscate

2010-02-11 Thread MRAB
Paul Rubin wrote: Gregory Ewing greg.ew...@canterbury.ac.nz writes: Actually I gather it had a lot to do with the fact that the Germans made some blunders in the way they used the Enigma that seriously compromised its security. There was reportedly a branch of the German forces that used their

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread Paul Rubin
mk mrk...@gmail.com writes: Um... run your code in a debugger. ..except the code in question is multithreaded and pdb is no good for that, and last time I checked, yappi was broken. Try winpdb.org. -- http://mail.python.org/mailman/listinfo/python-list

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread mk
Stephen Hansen wrote: the uncommon, the exceptional, case. If one could somehow turn off exceptions, you can't even do a for loop: every for loop would become infinite-- exceptions are how Python signals the end of an iterator. Think about that, *every* for loop in Python suddenly breaks.

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread Peter Otten
mk wrote: the uncommon, the exceptional, case. If one could somehow turn off exceptions, you can't even do a for loop: every for loop would become infinite-- exceptions are how Python signals the end of an iterator. Think about that, *every* for loop in Python suddenly breaks. Ouch.

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread Steve Holden
mk wrote: Stephen Hansen wrote: the uncommon, the exceptional, case. If one could somehow turn off exceptions, you can't even do a for loop: every for loop would become infinite-- exceptions are how Python signals the end of an iterator. Think about that, *every* for loop in Python suddenly

Re: ANN: obfuscate

2010-02-11 Thread Mark Lawrence
Christian Heimes wrote: Gregory Ewing wrote: Actually I gather it had a lot to do with the fact that the Germans made some blunders in the way they used the Enigma that seriously compromised its security. There was reportedly a branch of the German forces that used their Enigmas differently,

Re: Terminating threaded programs

2010-02-11 Thread sstein...@gmail.com
On Feb 11, 2010, at 11:43 AM, Aahz wrote: In article mailman.1961.1265383809.28905.python-l...@python.org, mk mrk...@gmail.com wrote: I have a problem with a threaded program: it frequently hangs on sys.exit. The problem is that my program uses threads which in turn use paramiko

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread mk
Paul Rubin wrote: mk mrk...@gmail.com writes: Um... run your code in a debugger. ..except the code in question is multithreaded and pdb is no good for that, and last time I checked, yappi was broken. Try winpdb.org. This is a treasure! In minutes I've had this attached to remote process

python and http POST

2010-02-11 Thread galileo228
Hey All, Been teaching myself Python for a few weeks, and am trying to write a program that will go to a url, enter a string in one of the search fields, submit the search, and return the contents of the search result. I'm using httplib2. My two particular questions: 1) When I set my 'body'

Re: Any way to turn off exception handling? (debugging)

2010-02-11 Thread mk
Peter Otten wrote: try: ... except socket.error: ... #untested import socket class SocketWrapper: def __getattr__(self, name): return getattr(socket, name) error = None import module_using_socket module_using_socket.socket = SocketWrapper() Very interesting

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 11, 7:01 pm, Peter Otten __pete...@web.de wrote: hjebbers wrote: On Feb 11, 5:45 pm, M3RT mgul...@gmail.com wrote: The problem may be related to how you treat the EDI file or lets say DATA. Also your coding style is important. Can you provide more info? Yes, a whole lot more; but

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 11, 7:01 pm, Peter Otten __pete...@web.de wrote: hjebbers wrote: On Feb 11, 5:45 pm, M3RT mgul...@gmail.com wrote: The problem may be related to how you treat the EDI file or lets say DATA. Also your coding style is important. Can you provide more info? Yes, a whole lot more; but

MODULE FOR I, P FRAME

2010-02-11 Thread DANNY
Hello! I am currently developing a simple video player in python, and my problem is that i can't find a module which has a function that can determine if frame(image) is I or P coded (MPEG coding). I have been using PIL but I couldnt find anything that could help me with that problem. Thanks for

Re: python crash on windows but not on linux

2010-02-11 Thread Jerry Hill
On Thu, Feb 11, 2010 at 9:32 AM, hjebbers hjebb...@gmail.com wrote: To all, I am running an EDI translator, and doing stress tests. When processing a test with a (relatively) big EDI file(s) on windowsXP  I get a crash:    'sorry for the inconvenience' etc  (so no clues about what is causing

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 11, 7:01 pm, Peter Otten __pete...@web.de wrote: hjebbers wrote: On Feb 11, 5:45 pm, M3RT mgul...@gmail.com wrote: The problem may be related to how you treat the EDI file or lets say DATA. Also your coding style is important. Can you provide more info? Yes, a whole lot more; but

PExpect Cross-Platform Alternative

2010-02-11 Thread Nathan Farrar
Hello Community, Recently I've been automating lots of network operations tasks via simple python scripts. Originally, I utilized paramiko but found that the module had issues working with cisco equipment. I switched to pexpect and things have worked wonderfully since (I've been running this

Re: Modifying Class Object

2010-02-11 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steven D'Aprano: [...] accusing them of lying for having an opinion that differs from yours, That is untrue. Well, that says it all really. You seem to insinuate that I'm saying that Steven is lying, and/or that Steven is lying. From context

Re: python and http POST

2010-02-11 Thread Ken Seehart
Use tamperdata to view and modify HTTP/HTTPS headers and post parameters... https://addons.mozilla.org/en-US/firefox/addon/966 Enjoy, Ken galileo228 wrote: Hey All, Been teaching myself Python for a few weeks, and am trying to write a program that will go to a url, enter a string in one of

Re: PExpect Cross-Platform Alternative

2010-02-11 Thread Steve Holden
Nathan Farrar wrote: Hello Community, Recently I've been automating lots of network operations tasks via simple python scripts. Originally, I utilized paramiko but found that the module had issues working with cisco equipment. I switched to pexpect and things have worked wonderfully since

Re: Modifying Class Object

2010-02-11 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steve Holden: [...] In this particular part of the thread I am attempting, unsuccessfully, to convince you that a change in *your* behavior would lead to less hostility directed towards the way you present your ideas. You apparently feel it is quite

Re: Terminating threaded programs

2010-02-11 Thread mk
Stephen Hansen wrote: I use threads all the time (well, for certain types of workloads) and have never seen this. Are your threads daemon threads? The only time I've seen sys.exit() not close out my program is when I'm launching non-daemon threads on accident. The snag is that my program is

Re: Terminating threaded programs

2010-02-11 Thread mk
Aahz wrote: You can also use os._exit(). Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Terminating threaded programs

2010-02-11 Thread mk
Aahz wrote: You can also use os._exit(). Yes! It works cleanly! Thanks a million! OTOH, if I use sys.exit(), it's just hanging there. Regards, mk -- http://mail.python.org/mailman/listinfo/python-list

Re: Is a merge interval function available?

2010-02-11 Thread Jonathan Gardner
On Feb 10, 3:23 pm, Peng Yu pengyu...@gmail.com wrote: I'm wondering there is already a function in python library that can merge intervals. For example, if I have the following intervals ('[' and ']' means closed interval as

Re: Is a merge interval function available?

2010-02-11 Thread Alf P. Steinbach
* Jonathan Gardner: On Feb 10, 3:23 pm, Peng Yu pengyu...@gmail.com wrote: I'm wondering there is already a function in python library that can merge intervals. For example, if I have the following intervals ('[' and ']' means closed interval as

Re: Need debugging knowhow for my creeping Unicodephobia

2010-02-11 Thread mk
MRAB wrote: When working with Unicode in Python 2, you should use the 'unicode' type for text (Unicode strings) and limit the 'str' type to binary data (bytestrings, ie bytes) only. Well OK, always use u'something', that's simple -- but isn't str what I get from files and sockets and the

calculating a string equation

2010-02-11 Thread Astan Chee
Hi, I have some variables in my script that looks like this: vars = {'var_a':'10','var_b':'4'} eqat = (var_a/2.0) = var_b result = (var_a+var_b)/7 What I'm trying to do is to plug in var_a and var_b's values from vars into eqat and see if eqat returns true or false as well as getting the value

Re: Need debugging knowhow for my creeping Unicodephobia

2010-02-11 Thread Robert Kern
On 2010-02-11 15:43 PM, mk wrote: MRAB wrote: Strictly speaking, only Unicode can be encoded. How so? Can't bytestrings containing characters of, say, koi8r encoding be encoded? I think he means that only unicode objects can be encoded using the .encode() method, as clarified by his next

Re: calculating a string equation

2010-02-11 Thread Arnaud Delobelle
Astan Chee astan.c...@al.com.au writes: Hi, I have some variables in my script that looks like this: vars = {'var_a':'10','var_b':'4'} eqat = (var_a/2.0) = var_b result = (var_a+var_b)/7 What I'm trying to do is to plug in var_a and var_b's values from vars into eqat and see if eqat

Re: Modifying Class Object

2010-02-11 Thread Terry Reedy
On 2/11/2010 1:37 AM, Alf P. Steinbach wrote: Consider just the assert( t is not s ) t = s Does this change anything at all in the computer's memory? By 'computer', do you mean 'anything that computes' (including humans) or specifically 'electronic computer'? But since it does have an

Re: Modifying Class Object

2010-02-11 Thread Alf P. Steinbach
* Terry Reedy: On 2/11/2010 1:37 AM, Alf P. Steinbach wrote: Consider just the assert( t is not s ) t = s Does this change anything at all in the computer's memory? By 'computer', do you mean 'anything that computes' (including humans) or specifically 'electronic computer'? In this

Re: Need debugging knowhow for my creeping Unicodephobia

2010-02-11 Thread Steve Holden
mk wrote: MRAB wrote: When working with Unicode in Python 2, you should use the 'unicode' type for text (Unicode strings) and limit the 'str' type to binary data (bytestrings, ie bytes) only. Well OK, always use u'something', that's simple -- but isn't str what I get from files and

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 11, 8:42 pm, Jerry Hill malaclyp...@gmail.com wrote: On Thu, Feb 11, 2010 at 9:32 AM, hjebbers hjebb...@gmail.com wrote: To all, I am running an EDI translator, and doing stress tests. When processing a test with a (relatively) big EDI file(s) on windowsXP  I get a crash:    

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 11, 8:42 pm, Jerry Hill malaclyp...@gmail.com wrote: On Thu, Feb 11, 2010 at 9:32 AM, hjebbers hjebb...@gmail.com wrote: To all, I am running an EDI translator, and doing stress tests. When processing a test with a (relatively) big EDI file(s) on windowsXP  I get a crash:    

Re: Bizarre arithmetic results

2010-02-11 Thread Terry Reedy
On 2/11/2010 11:23 AM, Jussi Piitulainen wrote: Robert Kern writes: On 2010-02-11 06:31 AM, Shashwat Anand wrote: There is a little issue here that ' -.1 ** .1' should give you error message. That is it. No, fractional powers of negative numbers are perfectly valid mathematically. The

Re: python crash on windows but not on linux

2010-02-11 Thread Carl Banks
On Feb 11, 2:39 pm, hjebbers hjebb...@gmail.com wrote: On Feb 11, 8:42 pm, Jerry Hill malaclyp...@gmail.com wrote: On Thu, Feb 11, 2010 at 9:32 AM, hjebbers hjebb...@gmail.com wrote: To all, I am running an EDI translator, and doing stress tests. When processing a test with a

Re: python crash on windows but not on linux

2010-02-11 Thread Terry Reedy
On 2/11/2010 9:32 AM, hjebbers wrote: To all, I am running an EDI translator, and doing stress tests. When processing a test with a (relatively) big EDI file(s) on windowsXP I get a crash: 'sorry for the inconvenience' etc (so no clues about what is causing the problem) This happens with

Re: python crash on windows but not on linux

2010-02-11 Thread Emile van Sebille
On 2/11/2010 6:32 AM hjebbers said... To all, I am running an EDI translator, ... let's say bots :) and doing stress tests. When processing a test with a (relatively) big EDI file(s) on windowsXP I get a crash: 'sorry for the inconvenience' etc (so no clues about what is causing the

Re: python and http POST

2010-02-11 Thread Terry Reedy
On 2/11/2010 2:11 PM, galileo228 wrote: Hey All, Been teaching myself Python for a few weeks, and am trying to write a program that will go to a url, enter a string in one of the search fields, submit the search, and return the contents of the search result. I'm using httplib2. My two

Re: Is a merge interval function available?

2010-02-11 Thread Peter
On Feb 12, 8:03 am, Jonathan Gardner jgard...@jonathangardner.net wrote: On Feb 10, 3:23 pm, Peng Yu pengyu...@gmail.com wrote: I'm wondering there is already a function in python library that can merge intervals. For example, if I have the following intervals ('[' and ']' means closed

Re: Need debugging knowhow for my creeping Unicodephobia

2010-02-11 Thread Terry Reedy
On 2/11/2010 4:43 PM, mk wrote: Neat, except that the process of porting most projects and external libraries to P3 seems to be, how should I put it, standing still? What is important are the libraries, so more new projects can start in 3.x. There is a slow trickly of 3.x support

Re: MODULE FOR I, P FRAME

2010-02-11 Thread Rhodri James
On Thu, 11 Feb 2010 19:31:52 -, DANNY danijel.gv...@gmail.com wrote: Hello! I am currently developing a simple video player in python, and my problem is that i can't find a module which has a function that can determine if frame(image) is I or P coded (MPEG coding). I have been using PIL

Please help with MemoryError

2010-02-11 Thread Jeremy
I have been using Python for several years now and have never run into memory errors… until now. My Python program now consumes over 2 GB of memory and then I get a MemoryError. I know I am reading lots of files into memory, but not 2GB worth. I thought I didn't have to worry about memory

Re: Function attributes

2010-02-11 Thread Gabriel Genellina
En Thu, 11 Feb 2010 00:25:00 -0300, Terry Reedy tjre...@udel.edu escribió: On 2/10/2010 4:49 PM, Gabriel Genellina wrote: I've written a decorator for injecting a __function__ name into the function namespace, but I can't find it anywhere. I think I implemented it by adding a fake additional

Re: Please help with MemoryError

2010-02-11 Thread Stephen Hansen
On Thu, Feb 11, 2010 at 3:39 PM, Jeremy jlcon...@gmail.com wrote: My Python program now consumes over 2 GB of memory and then I get a MemoryError. I know I am reading lots of files into memory, but not 2GB worth. I thought I didn't have to worry about memory allocation in Python because of

  1   2   >