Re: Quality of Standard Modules

2008-08-08 Thread Terry Reedy
js wrote: I read an interview with Guido at http://www.techworld.com.au/article/255835/a-z_programming_languages_python and that's very interesting. In that article, he said "there are also a lot of modules that aren't particularly well thought-out, or serve only a very small specialized audie

Re: sending to an xterm

2008-08-08 Thread Rich Healey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kent Tenney wrote: > Derek Martin pizzashack.org> writes: > >> On Fri, Aug 08, 2008 at 08:25:19PM +, Kent Tenney wrote: >>> Howdy, >>> >>> I want to open an xterm, send it a command and have it execute it. >> You can't do that. xterm doesn't exe

Quality of Standard Modules

2008-08-08 Thread js
I read an interview with Guido at http://www.techworld.com.au/article/255835/a-z_programming_languages_python and that's very interesting. In that article, he said "there are also a lot of modules that aren't particularly well thought-out, or serve only a very small specialized audience, or don't

Re: CAB files

2008-08-08 Thread oyster
there is 2 files: text2pdf.py and cab.py but I get a cab, in which there is a file text2pdf.py in it, but cab.py is created as a directory! [your cab.py starts] blahblah if __name__ == "__main__": import os, glob hfci = HFCI("my-first.cab", verbose=1) files = glob.glob(r"*.py") for

Re: Remove the first few(or any amount really) of letters in a string

2008-08-08 Thread Terry Reedy
Alexnb wrote: Lets say I've got a stirng: blah This is my string blah I want to get rid of the blah's but keep the "This is my string." I know you can do this with a for loop, but that is messy and a pain. So does anyone have any suggestions on how to do this? Strings are immutable. Just s

Remove the first few(or any amount really) of letters in a string

2008-08-08 Thread Alexnb
Lets say I've got a stirng: blah This is my string blah I want to get rid of the blah's but keep the "This is my string." I know you can do this with a for loop, but that is messy and a pain. So does anyone have any suggestions on how to do this? -- View this message in context: http://www.nab

Win32 trouble with threading, signals, and sleep()

2008-08-08 Thread Lowell Alleman
I'm trying to track down an issue with a multi-threaded program that is responsible for handling real-time monitoring a business process. Different threads track various aspects of the process and all of the statistics filter back to the main thread for analysis. The program is run as a scheduled

Re: variable expansion with sqlite

2008-08-08 Thread Kris Kennaway
marc wyburn wrote: Hi and thanks, I was hoping to avoid having to weld qmarks together but I guess that's why people use things like SQL alchemy instead. It's a good lesson anyway. The '?' substitution is there to safely handle untrusted input. You *don't* want to pass in arbitrary user dat

Re: maybe a stupid question

2008-08-08 Thread Christian Heimes
Strato wrote: I have an app installed in /usr/lib/python2.5/site-package/MyApp I have a symlink in /usr/local/bin that points to /usr/lib/python2.5/site-package/MyApp/myscript.py Then, when I launch my script from anywhere using the symlink, how to determine that the script is located in /u

Re: Keg - A python web framework

2008-08-08 Thread Terry Reedy
eghansah wrote: As to the question on how different this is from other frameworks, I think there are certainly many similarities. As I admitted in the writeup, it draws from other projects including django. However, there is one new idea I haven't seen anywhere . . . not yet at least. In keg,

maybe a stupid question

2008-08-08 Thread Strato
Hi, I suppose this has already been asked in the list, but I ask anyway: I want to determine from where my python app is executed, but I want to determine the path of the real script file, not the path of the command being executed (in case of symlink in a *bin dir in the system). I explain:

RE: sending to an xterm

2008-08-08 Thread Edwin . Madari
since I do not have access to xterm, here is the interactive session for spawning bash(another session if you will), sending ls command to it, and retrieving the results. things to note are: 1. after spawning expect for the prompt, timeout, and eof #which ever happens first 2. return value is th

Re: Keg - A python web framework

2008-08-08 Thread eghansah
Hi, Thank you for the comments so far. To be honest with you I didn't know about pycoon until Bukzor mentioned it. There appears to be some similarities between the two projects. However, I think I'd have to take a closer look at it to be sure that I'm not duplicating the efforts made in that pro

RE: I need a Python mentor

2008-08-08 Thread Support Desk
U...yea _ From: A. Joseph [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2008 1:44 PM To: python-list@python.org Subject: I need a Python mentor How are you? You look good; I will like to meet you. Visit my profile and drop some line for me. Abah Hello everybo

Re: sending to an xterm

2008-08-08 Thread Kent Tenney
Derek Martin pizzashack.org> writes: > > On Fri, Aug 08, 2008 at 08:25:19PM +, Kent Tenney wrote: > > Howdy, > > > > I want to open an xterm, send it a command and have it execute it. > > You can't do that. xterm doesn't execute shell commands passed on > stdin... It can, however, execut

Re: sending to an xterm

2008-08-08 Thread Kent Tenney
Derek Martin pizzashack.org> writes: > > On Fri, Aug 08, 2008 at 08:25:19PM +, Kent Tenney wrote: > > Howdy, > > > > I want to open an xterm, send it a command and have it execute it. > > You can't do that. xterm doesn't execute shell commands passed on > stdin... It can, however, execut

Re: small issue with Idle

2008-08-08 Thread Terry Reedy
Mike Driscoll wrote: There's a free version of Wing IDE that has an IDLE-like interface that doesn't have this issue...or you could just use the command line version of IDLE. What are you referring to? -- http://mail.python.org/mailman/listinfo/python-list

Re: small issue with Idle

2008-08-08 Thread Terry Reedy
Lie wrote: On Aug 8, 9:41 pm, v4vijayakumar <[EMAIL PROTECTED]> wrote: When you press 'home' button cursor goes before >>> prompt. This is little uncomfortable. I am using Idle 1.2.2. (python 2.5.2.) This is IDLE's behavior, not really python's. Anyway, I don't really mind the minor annoyan

Re: I need a Python mentor

2008-08-08 Thread Emile van Sebille
A. Joseph wrote: *Please the first message i sent out contain error, i`m very very sorry.* Hello everybody, i`m new to this list. I was programming in PHP before, so just of recent I started learning python. I need someone who I can be giving me some assignment based on the chapter I read in

Re: sending to an xterm

2008-08-08 Thread Derek Martin
On Fri, Aug 08, 2008 at 08:25:19PM +, Kent Tenney wrote: > Howdy, > > I want to open an xterm, send it a command and have it execute it. You can't do that. xterm doesn't execute shell commands passed on stdin... It can, however, execute one passed on the command line. Instead of just runni

Re: sending to an xterm

2008-08-08 Thread Emile van Sebille
Kent Tenney wrote: Howdy, I want to open an xterm, send it a command and have it execute it. I thought pexpect would do this, but I've been unsuccessful. term = pexpect.spawn('xterm') starts an xterm, but term.sendline('ls') doesn't seem to do anything. Suggestions? Thanks, Kent -- htt

Re: Best practise implementation for equal by value objects

2008-08-08 Thread Terry Reedy
Slaunger wrote: OK, i am encouraged to carry on my quest with the eval(repr)) for my 'nice' classes. I just revisited the documentation for eval and noticed that there are optional globals and locals name space variables, that one could specify: http://docs.python.org/lib/built-in-funcs.html

sending to an xterm

2008-08-08 Thread Kent Tenney
Howdy, I want to open an xterm, send it a command and have it execute it. I thought pexpect would do this, but I've been unsuccessful. term = pexpect.spawn('xterm') starts an xterm, but term.sendline('ls') doesn't seem to do anything. Suggestions? Thanks, Kent -- http://mail.python.org/ma

Re: benchmark

2008-08-08 Thread Terry Reedy
Dhananjay wrote: On Aug 7, 11:58 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > Are there any implications of using psyco ? It compiles statements to machine code for each set of types used in the statement or code block over the history of the run. So code used polym

Re: numpy and filtering (was: Fastest way to store ints and floats on disk)

2008-08-08 Thread Robert Kern
Laszlo Nagy wrote: Attached there is an example program that only requires numpy. At the end I have two numpy array: rdims: [[3 1 1] [0 0 4] [1 3 0] [2 2 0] [3 3 3] [0 0 2]] rmeas: [[10.0 254.0] [4.0 200.0] [5.0 185.0] [5000.0 160.0] [15.0 260.0] [2.0 180.0]] I would l

Re: Psycho question

2008-08-08 Thread bearophileHUGS
John Krukoff: > One possibility for the performance difference, is that as I understand > it the psyco developer has moved on to working on pypy, and probably > isn't interested in keeping psyco updated and optimized for new python > syntax. > Somebody correct me if I'm wrong, but last I heard ther

Re: Problem with global variables

2008-08-08 Thread Marc 'BlackJack' Rintsch
On Fri, 08 Aug 2008 13:10:48 -0400, Anthony Kuhlman wrote: > I'm having trouble understanding the behavior of global variables in a > code I'm writing. I have a file, test.py, with the following contents > > foo = [] > > def goo(): > global foo > foo = [] > foo.append(2) > > def mo

I need a Python mentor

2008-08-08 Thread A. Joseph
*Please the first message i sent out contain error, i`m very very sorry.* Hello everybody, i`m new to this list. I was programming in PHP before, so just of recent I started learning python. I need someone who I can be giving me some assignment based on the chapter I read in the book, and tell pe

I need a Python mentor

2008-08-08 Thread A. Joseph
How are you? You look good; I will like to meet you. Visit my profile and drop some line for me. Abah Hello everybody, i`m new to this list. I was programming in PHP before, so just of recent I started learning python. I need someone who I can be giving me some assignment based on the chapte

Re: Psycho question

2008-08-08 Thread John Krukoff
On Fri, 2008-08-08 at 12:18 -0500, David C. Ullrich wrote: > Curiously g is exactly how I'd planned on doing it > before trying anything. The one thing that puzzles me about > all the results is why // is so much slower than / inside > that Psyco loop. > > > Tim Delaney > One possibility for t

Programmers needed: open governance project

2008-08-08 Thread Ed Pastore
The Metagovernment project is seeking Python programmers to help us build Metascore, an open source (Affero GPL) web application intended to act as the governing mechanism of any community of any size. http://www.metagovernment.org/wiki/Metascore Metascore could be used for something as simple a

Re: python-mode is missing the class browser

2008-08-08 Thread Neal Becker
>Alexander Schmolck wrote: > "Adam Jenkins" <[EMAIL PROTECTED]> writes: > >> On Fri, Aug 8, 2008 at 7:32 AM, Michele Simionato >> <[EMAIL PROTECTED]> wrote: >>> On Aug 7, 5:55 pm, Alexander Schmolck <[EMAIL PROTECTED]> wrote: >> ... >>> >>> I have solved by using ipython.el which was already inst

Re: HTTP basic authentication with form-based authentication

2008-08-08 Thread Max
On Aug 7, 3:54 pm, Wojtek Walczak <[EMAIL PROTECTED]> wrote: > Dnia Thu, 7 Aug 2008 11:14:05 -0700 (PDT), Max napisa³(a): > Use ClientCookie or even better - > mechanize:http://pypi.python.org/pypi/mechanize/ > The docs aren't perfect, but you should easily > find what you are searching for. Tha

Re: HTTP basic authentication with form-based authentication

2008-08-08 Thread Max
On Aug 7, 3:54 pm, Wojtek Walczak <[EMAIL PROTECTED]> wrote: > Dnia Thu, 7 Aug 2008 11:14:05 -0700 (PDT), Max napisa³(a): > Use ClientCookie or even better - > mechanize:http://pypi.python.org/pypi/mechanize/ > The docs aren't perfect, but you should easily > find what you are searching for. Tha

Problem with global variables

2008-08-08 Thread Anthony Kuhlman
Pythoners, I'm having trouble understanding the behavior of global variables in a code I'm writing. I have a file, test.py, with the following contents foo = [] def goo(): global foo foo = [] foo.append(2) def moo(): print foo In an ipython session, I see the following: In [1]

Re: small issue with Idle

2008-08-08 Thread Mike Driscoll
On Aug 8, 9:41 am, v4vijayakumar <[EMAIL PROTECTED]> wrote: > When you press 'home' button cursor goes before >>> prompt. This is > little uncomfortable. > > I am using Idle 1.2.2. (python 2.5.2.) There's a free version of Wing IDE that has an IDLE-like interface that doesn't have this issue...or

relative imports improve program organization... suggestions?

2008-08-08 Thread DG
Alright, I have searched and searched and read many conversations on the topic of relative and absolute imports and am still not getting the whole thing through my skull. Highlights of what I've read: http://mail.python.org/pipermail/python-list/2007-January/422973.html http://groups.google.com/gr

Re: small issue with Idle

2008-08-08 Thread Lie
On Aug 8, 9:41 pm, v4vijayakumar <[EMAIL PROTECTED]> wrote: > When you press 'home' button cursor goes before >>> prompt. This is > little uncomfortable. > > I am using Idle 1.2.2. (python 2.5.2.) This is IDLE's behavior, not really python's. Anyway, I don't really mind the minor annoyance as you

Re: Psycho question

2008-08-08 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, "Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> wrote: > David C. Ullrich wrote: > > > f: 0.0158488750458 > > g: 0.000610113143921 > > h: 0.00200295448303 > > f: 0.0184948444366 > > g: 0.000257015228271 > > h: 0.00116610527039 > > I suspect you're hitting the point

Re: .cpp to .pyd

2008-08-08 Thread vedrandekovic
On 7 kol, 21:43, Carl Banks <[EMAIL PROTECTED]> wrote: > On Aug 7, 3:25 am, [EMAIL PROTECTED] wrote: > > > > > Hello, > > > I want to build my C++ (.cpp) script to (.pyd) like this: > > >http://en.wikibooks.org/wiki/Python_Programming/Extending_with_C%2B%2B > > > I have installed "Microsoft Visual

Re: python-mode is missing the class browser

2008-08-08 Thread Alexander Schmolck
"Adam Jenkins" <[EMAIL PROTECTED]> writes: > On Fri, Aug 8, 2008 at 7:32 AM, Michele Simionato > <[EMAIL PROTECTED]> wrote: >> On Aug 7, 5:55 pm, Alexander Schmolck <[EMAIL PROTECTED]> wrote: > ... >> >> I have solved by using ipython.el which was already installed. For the >> sake of >> future go

small issue with Idle

2008-08-08 Thread v4vijayakumar
When you press 'home' button cursor goes before >>> prompt. This is little uncomfortable. I am using Idle 1.2.2. (python 2.5.2.) -- http://mail.python.org/mailman/listinfo/python-list

Re: how to find out if an object is a class?

2008-08-08 Thread Stefan Behnel
Miles wrote: > On Fri, Aug 8, 2008 at 2:31 AM, Stefan Behnel wrote: >> I recently had the reverse case that a (stupidly implemented) extension >> module >> required a callback function and I wanted to pass a function wrapped in a >> wrapper object. That failed, because it specifically checked for

Re: CAB files

2008-08-08 Thread Thomas Heller
Virgil Stokes schrieb: > I would appreciate python code for creating *.cab files. > > --V. Stokes Here is some code that I have still laying around. It has never been used in production and I do not know what you can do with the cab files it creates, but I have been able to create a cab and open

Re: Limits of Metaprogramming

2008-08-08 Thread Wilson
On 8 Aug, 13:30, Iain King <[EMAIL PROTECTED]> wrote: > On Aug 4, 5:13 pm, Tomasz Rola <[EMAIL PROTECTED]> wrote: > > > On Mon, 4 Aug 2008, Wilson wrote: > > > " Every sufficiently large application has a poor/incomplete > > > implementation ofLISPembedded within it ". > > > Yep, this is either exa

bbfreeze problem

2008-08-08 Thread Neal Becker
Any ideas on this? bb-freeze test5-coded-pre.py WARNING: found xml.sax in multiple directories. Assuming it's a namespace package. (found in /usr/lib64/python2.5/site-packages/_xmlplus/sax, /usr/lib64/python2.5/xml/sax) *** applied recipe_matplotlib: using the backend_qt4agg matplotlib backend

Re: CAB files

2008-08-08 Thread Tim Golden
Virgil Stokes wrote: I would appreciate python code for creating *.cab files. I'm not aware of any existing modules for creating CABs. I thought there were some MS API calls for doing that kind of thing but a quick search hasn't shown anything up. You may have to roll your own: http://support

Re: Threading and wx.....

2008-08-08 Thread Mike Driscoll
On Aug 8, 2:19 am, SamG <[EMAIL PROTECTED]> wrote: > On Aug 8, 12:01 pm, SamG <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > Im trying my hand at threading with wx applications. I have written > > the following code... > > > import wx > > from threading import Thread, Lock > > > class createWindow(

Re: regular expressions.

2008-08-08 Thread Hrvoje Niksic
"Atul." <[EMAIL PROTECTED]> writes: > the following does not work. > > import re > vowel = > r'[u"\u093e"u"\u093f"u"\u0940"u"\u0941"u"\u0942"u"\u0943"u"\u0944"u"\u0945"u"\u0946"u"\u0947"u"\u0948"u"\u0949"u"\u094a"u"\u094b"u"\u094c"]' Unfortunately you cannot embed arbitrary Python string constant

Re: how to find out if an object is a class?

2008-08-08 Thread Christian Heimes
szczepiq wrote: Pardon me for most likely a dummy question but how do I find out if an object is a class? For God's sake don't reinvent the wheel! The 'inspect' module (part of the Python standard library) has a functions isclass(). It does the proper tests for new style and old style classes

Re: regular expressions.

2008-08-08 Thread Peter Otten
Atul. wrote: > The same file when I use with the following does not work. > > import re > vowel = > r'[u"\u093e"u"\u093f"u"\u0940"u"\u0941"u"\u0942"u"\u0943"u"\u0944"u"\u0945"u"\u0946"u"\u0947"u"\u0948"u"\u0949"u"\u094a"u"\u094b"u"\u094c"]' > print re.findall(vowel, u"\u092f\u093e\u0902\u091a\u09

Re: python-mode is missing the class browser

2008-08-08 Thread Adam Jenkins
On Fri, Aug 8, 2008 at 7:32 AM, Michele Simionato <[EMAIL PROTECTED]> wrote: > On Aug 7, 5:55 pm, Alexander Schmolck <[EMAIL PROTECTED]> wrote: ... > > I have solved by using ipython.el which was already installed. For the > sake of > future googlers using Ubuntu 8.04, emacs and ipython, it is enou

Re: random numbers according to user defined distribution ??

2008-08-08 Thread Jeremy Sanders
Alex wrote: > I wonder if it is possible in python to produce random numbers > according to a user defined distribution? > Unfortunately the random module does not contain the distribution I > need :-( Have you looked at the numpy random number module? It seems to have quite a lot of distribution

Re: regular expressions.

2008-08-08 Thread Atul.
The same file when I use with the following does not work. import re vowel = r'[u"\u093e"u"\u093f"u"\u0940"u"\u0941"u"\u0942"u"\u0943"u"\u0944"u"\u0945"u"\u0946"u"\u0947"u"\u0948"u"\u0949"u"\u094a"u"\u094b"u"\u094c"]' print re.findall(vowel, u"\u092f\u093e\u0902\u091a\u094d\u092f\u093e", re.UNICOD

Re: python-mode is missing the class browser

2008-08-08 Thread Michele Simionato
On Aug 7, 5:55 pm, Alexander Schmolck <[EMAIL PROTECTED]> wrote: > There are two different and independently developedpython-modes. The > politically correct one that comes with emacs (IIRC python.el) that had pretty > limited functionality last time I looked, and the original but not FSF blessed >

Re: Limits of Metaprogramming

2008-08-08 Thread Iain King
On Aug 4, 5:13 pm, Tomasz Rola <[EMAIL PROTECTED]> wrote: > On Mon, 4 Aug 2008, Wilson wrote: > > " Every sufficiently large application has a poor/incomplete > > implementation ofLISPembedded within it ". > > Yep, this is either exact or very close copy of what I have read. > It's Greenspun's Ten

Re: Books to begin learning Python

2008-08-08 Thread Jaime Irurzun
Hi Edward, I like "Dive into Python" because it's been written for people who know programming with other languages. This could be an advantage or a disadvantage, if you feel really uncomfortable reading Python code (if you can't imagine absolutly nothing about what it does), my advice is to choos

Re: regular expressions.

2008-08-08 Thread Peter Otten
Atul. wrote: > On Aug 8, 4:33 pm, "Atul." <[EMAIL PROTECTED]> wrote: >> On Aug 8, 4:22 pm, Peter Otten <[EMAIL PROTECTED]> wrote: >> >> >> >> > Atul. wrote: >> >> > >> Yes. You didn't paste the traceback into your message. >> >> > >> >>> import re >> > >> >>> vowel = r'[aeiou]' >> > >> >>> re.find

Re: regular expressions.

2008-08-08 Thread Diez B. Roggisch
Atul. schrieb: On Aug 8, 4:33 pm, "Atul." <[EMAIL PROTECTED]> wrote: On Aug 8, 4:22 pm, Peter Otten <[EMAIL PROTECTED]> wrote: Atul. wrote: Yes. You didn't paste the traceback into your message. import re vowel = r'[aeiou]' re.findall(vowel, r"vowel") ['o', 'e'] It works as expected here.

Re: regular expressions.

2008-08-08 Thread Atul.
On Aug 8, 4:33 pm, "Atul." <[EMAIL PROTECTED]> wrote: > On Aug 8, 4:22 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > > > > > Atul. wrote: > > > >> Yes. You didn't paste the traceback into your message. > > > >> >>> import re > > >> >>> vowel = r'[aeiou]' > > >> >>> re.findall(vowel, r"vowel") > > >

Re: regular expressions.

2008-08-08 Thread Atul.
On Aug 8, 4:22 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > Atul. wrote: > > >> Yes. You didn't paste the traceback into your message. > > >> >>> import re > >> >>> vowel = r'[aeiou]' > >> >>> re.findall(vowel, r"vowel") > > >> ['o', 'e'] > > >> It works as expected here. > > >> Peter > > > When I

Re: regular expressions.

2008-08-08 Thread Peter Otten
Atul. wrote: > >> Yes. You didn't paste the traceback into your message. >> >> >>> import re >> >>> vowel = r'[aeiou]' >> >>> re.findall(vowel, r"vowel") >> >> ['o', 'e'] >> >> It works as expected here. >> >> Peter > > When I key this input in IDLE it works but when I try to run the > module it

Re: regular expressions.

2008-08-08 Thread Alexei Zankevich
Use the print statement: import re vowel = r'[aeiou]' print re.findall(vowel, r"vowel") Alexey On Fri, Aug 8, 2008 at 2:17 PM, Atul. <[EMAIL PROTECTED]> wrote: > > > Yes. You didn't paste the traceback into your message. > > > > >>> import re > > >>> vowel = r'[aeiou]' > > >>> re.findall(vowel,

Re: regular expressions.

2008-08-08 Thread Atul.
> Yes. You didn't paste the traceback into your message. > > >>> import re > >>> vowel = r'[aeiou]' > >>> re.findall(vowel, r"vowel") > > ['o', 'e'] > > It works as expected here. > > Peter When I key this input in IDLE it works but when I try to run the module it wont work. -- http://mail.python

numpy and filtering (was: Fastest way to store ints and floats on disk)

2008-08-08 Thread Laszlo Nagy
Attached there is an example program that only requires numpy. At the end I have two numpy array: rdims: [[3 1 1] [0 0 4] [1 3 0] [2 2 0] [3 3 3] [0 0 2]] rmeas: [[10.0 254.0] [4.0 200.0] [5.0 185.0] [5000.0 160.0] [15.0 260.0] [2.0 180.0]] I would like to use numpy to

Re: regular expressions.

2008-08-08 Thread Peter Otten
Atul. wrote: > I have been playing around with REs and could not get the following > code to run. > > import re > vowel = r'[aeiou]' > re.findall(vowel, r"vowel") > > anything wrong I have done? Yes. You didn't paste the traceback into your message. >>> import re >>> vowel = r'[aeiou]' >>> re

regular expressions.

2008-08-08 Thread Atul.
Hey All, I have been playing around with REs and could not get the following code to run. import re vowel = r'[aeiou]' re.findall(vowel, r"vowel") anything wrong I have done? Regards, Atul. -- http://mail.python.org/mailman/listinfo/python-list

Re: kill thread

2008-08-08 Thread bockman
On 8 Ago, 10:03, "Mathieu Prevot" <[EMAIL PROTECTED]> wrote: > 2008/8/8 Miki <[EMAIL PROTECTED]>: > > > Hello, > > >> I have a threading.Thread class with a "for i in range(1,50)" loop > >> within. When it runs and I do ^C, I have the error [1] as many as > >> loops. I would like to catch this exce

Re: Best practise implementation for equal by value objects

2008-08-08 Thread Steven D'Aprano
On Fri, 08 Aug 2008 00:28:02 -0700, Slaunger wrote: > OK, i am encouraged to carry on my quest with the eval(repr)) for my > 'nice' classes. > I just revisited the documentation for eval and noticed that there are > optional globals > and locals name space variables, that one could specify: > > h

Re: Create 2D character matrix

2008-08-08 Thread arsyed
On Thu, Aug 7, 2008 at 1:36 PM, Simon Parker <[EMAIL PROTECTED]> wrote: > Hello. > > I want to be able to create a 2D character matrix, ThisMatrix, like : > > > a A > b B > c C > d D > > and to be able to pick out elements, or rows or columns. > > I have become used to programming i

Re: Fastest way to store ints and floats on disk

2008-08-08 Thread Paul Rudin
Laszlo Nagy <[EMAIL PROTECTED]> writes: > Permature optimalization is the root of all evil. (Who said that?) Knuth I think. But note the "premature" bit - around here people sometimes give the impression that it goes "optimisation is the root of all evil". -- http://mail.python.org/mailman/li

Re: Large production environments using ZODB/ZOE?

2008-08-08 Thread Bruno Desthuilliers
Phillip B Oldham a écrit : I've been reading a lot recently on ZODB/ZOE, but I've not seen any reference to its use in large-scale production envrironments. Are there any real-world examples of ZODB/ZOE in use for a large system? By large, I'm thinking in terms of both horizontally-scaled system

Re: Fastest way to store ints and floats on disk

2008-08-08 Thread Laszlo Nagy
Hmm... I wrote an browser based analysis tool and used the working name pyvot... Is this for the public domain? I found Numeric to provide the best balance of memory footprint and speed. I also segregated data prep into a separate process to avoid excessive memory use at run time. Turns o

CAB files

2008-08-08 Thread Virgil Stokes
I would appreciate python code for creating *.cab files. --V. Stokes -- http://mail.python.org/mailman/listinfo/python-list

Re: how to find out if an object is a class?

2008-08-08 Thread Miles
On Fri, Aug 8, 2008 at 2:31 AM, Stefan Behnel wrote: > I recently had the reverse case that a (stupidly implemented) extension module > required a callback function and I wanted to pass a function wrapped in a > wrapper object. That failed, because it specifically checked for the argument > being a

Re: random numbers according to user defined distribution ??

2008-08-08 Thread Robert Kern
sturlamolden wrote: Alex wrote: I wonder if it is possible in python to produce random numbers according to a user defined distribution? Unfortunately the random module does not contain the distribution I need :-( There exist some very general algorithms to generate random numbers from arbitr

Re: kill thread

2008-08-08 Thread Mathieu Prevot
2008/8/8 Miki <[EMAIL PROTECTED]>: > Hello, > >> I have a threading.Thread class with a "for i in range(1,50)" loop >> within. When it runs and I do ^C, I have the error [1] as many as >> loops. I would like to catch this exception (and if possible do some >> cleanup like in C pthreads) so the prog

Re: Suggestions for creating a PDF table

2008-08-08 Thread Ken Starks
Kirk Strauser wrote: Short question: Is there a good library for generating HTML-style tables with the equivalent of colspans, automatically sized columns, etc. that can render directly to PDF? Longer question: I'm re-doing a big chunk of locally-written code. I have a report-generating funct

Re: Best practise implementation for equal by value objects

2008-08-08 Thread Slaunger
On 7 Aug., 21:19, Terry Reedy <[EMAIL PROTECTED]> wrote: > Slaunger wrote: > > On 6 Aug., 21:36, Terry Reedy <[EMAIL PROTECTED]> wrote: > > OK, the situation is more complicated than that then. In the case here > > though, > > the attributes would always be sinmple bulit-in types, where > > eval(re

Re: benchmark

2008-08-08 Thread cokofreedom
On Aug 8, 9:08 am, alex23 <[EMAIL PROTECTED]> wrote: > On Aug 8, 2:49 pm, Dhananjay <[EMAIL PROTECTED]> wrote: > > > Is it that a question of time and effort, > > or is there something that doesn't make it appropriate to python ? > > I don't think I've ever seen anyone who has raised concerns about

Re: Threading and wx.....

2008-08-08 Thread SamG
On Aug 8, 12:01 pm, SamG <[EMAIL PROTECTED]> wrote: > Hi, > > Im trying my hand at threading with wx applications. I have written > the following code... > > import wx > from threading import Thread, Lock > > class createWindow(Thread): > def __init__(self): > Thread.__init__(self) >

Re: .cpp to .pyd

2008-08-08 Thread Kay Schluehr
On 7 Aug., 21:43, Carl Banks <[EMAIL PROTECTED]> wrote: > On Aug 7, 3:25 am, [EMAIL PROTECTED] wrote: > > > > > Hello, > > > I want to build my C++ (.cpp) script to (.pyd) like this: > > >http://en.wikibooks.org/wiki/Python_Programming/Extending_with_C%2B%2B > > > I have installed "Microsoft Visual

Re: Books to begin learning Python

2008-08-08 Thread Mark Summerfield
On 7 Aug, 21:10, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Aug 7, 1:12 pm, Beliavsky <[EMAIL PROTECTED]> wrote: > > > > > On Aug 6, 4:08 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > On Aug 6, 2:56 pm, Edward Cormier <[EMAIL PROTECTED]> wrote: > > > > > Which computer books are the best

Re: benchmark

2008-08-08 Thread alex23
On Aug 8, 2:49 pm, Dhananjay <[EMAIL PROTECTED]> wrote: > Is it that a question of time and effort, > or is there something that doesn't make it appropriate to python ? I don't think I've ever seen anyone who has raised concerns about the speed of python actually offer to contribute to resolving i

Re: Best practise implementation for equal by value objects

2008-08-08 Thread Slaunger
On 7 Aug., 21:25, Paul Rubin wrote: > Terry Reedy <[EMAIL PROTECTED]> writes: > > So when the initializers for instances are all 'nice' (as for range), > > go for it (as in 'Age(10)').  And test it as you are by eval'ing the > > rep. Just accept that the eval will only wo

Threading and wx.....

2008-08-08 Thread SamG
Hi, Im trying my hand at threading with wx applications. I have written the following code... import wx from threading import Thread, Lock class createWindow(Thread): def __init__(self): Thread.__init__(self) self.lock = Lock() self.app=None def run(self):