EPD 2.5.2001 for OS X released!

2008-08-08 Thread Dave Peterson
I'm pleased to announce that Enthought has released the Enthought Python Distribution (EPD) 2.5.2001 for OS X! EPD is a Distribution of the Python Programming Language (currently version 2.5.2) that includes over 60 additional libraries, including ETS 2.7.1. Please visit the EPD website

RE: very newbie question

2008-08-08 Thread Peter Anderson
Try this: # The player tries to guess it and the computer lets # the player know if the guess is too high, too low # or right on the money import random print \tWelcome to 'Guess My Number'! print \nI'm thinking of a number between 1 and 100. print Try to guess it in as few attempts as

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

2008-08-08 Thread Stefan Behnel
Ben Finney wrote: szczepiq writes: Pardon me for most likely a dummy question but how do I find out if an object is a class? Presumably you want to know whether it's a class in order to use it for instantiating it. It is usually more Pythonic to use the object as intended, and allow the

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):

Re: Best practise implementation for equal by value objects

2008-08-08 Thread Slaunger
On 7 Aug., 21:25, Paul Rubin http://[EMAIL PROTECTED] 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 work in

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 it,

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 to begin learning

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 studio .NET 2003

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: 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 the speed

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(repr(x))==x

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

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 program finishes

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

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

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: 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

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

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. --

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 in R where I

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:

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 exception (and if

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, rvowel) anything wrong I have done? Regards, Atul. -- http://mail.python.org/mailman/listinfo/python-list

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, rvowel) anything wrong I have done? Yes. You didn't paste the traceback into your message. import re vowel = r'[aeiou]' re.findall(vowel,

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 Atul.
Yes. You didn't paste the traceback into your message. import re vowel = r'[aeiou]' re.findall(vowel, rvowel) ['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. --

Re: regular expressions.

2008-08-08 Thread Alexei Zankevich
Use the print statement: import re vowel = r'[aeiou]' print re.findall(vowel, rvowel) 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, rvowel) ['o', 'e']

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, rvowel) ['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. What's the name of your

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, rvowel) ['o', 'e'] It works as expected here. Peter When I key this input in IDLE it works but when I

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, rvowel) ['o', 'e'] It works as expected here.

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, rvowel) ['o', 'e'] It works as expected here. Peter

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.findall(vowel, rvowel) ['o', 'e'] It works as

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 choose

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 Tenth Rule of

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: regular expressions.

2008-08-08 Thread Atul.
The same file when I use with the following does not work. import re vowel = r'[u\u093eu\u093fu\u0940u\u0941u\u0942u\u0943u\u0944u\u0945u\u0946u\u0947u\u0948u\u0949u\u094au\u094bu\u094c]' print re.findall(vowel, u\u092f\u093e\u0902\u091a\u094d\u092f\u093e, re.UNICODE) [EMAIL

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 distributions.

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 enough if

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\u093eu\u093fu\u0940u\u0941u\u0942u\u0943u\u0944u\u0945u\u0946u\u0947u\u0948u\u0949u\u094au\u094bu\u094c]' print re.findall(vowel, u\u092f\u093e\u0902\u091a\u094d\u092f\u093e, re.UNICODE)

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

Re: regular expressions.

2008-08-08 Thread Hrvoje Niksic
Atul. [EMAIL PROTECTED] writes: the following does not work. import re vowel = r'[u\u093eu\u093fu\u0940u\u0941u\u0942u\u0943u\u0944u\u0945u\u0946u\u0947u\u0948u\u0949u\u094au\u094bu\u094c]' Unfortunately you cannot embed arbitrary Python string constants (u...) in regular expressions. What

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(Thread):     def

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:

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 function recipe_doctest at 0xc618c0 recipe_matplotlib: using

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 exact or very close

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: 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 the

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: 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 googlers using Ubuntu

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 studio .NET 2003

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 of diminishing

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 don't

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

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 you

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

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. Thank

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. Thank

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 installed. For the sake of

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

Re: Psycho question

2008-08-08 Thread John Krukoff
On Fri, 2008-08-08 at 12:18 -0500, David C. Ullrich wrote: Curiously smug grin 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

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

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

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 moo():

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 there's

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

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

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 --

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

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 --

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 running

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: 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 annoyance

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: sending to an xterm

2008-08-08 Thread Kent Tenney
Derek Martin code at 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, execute

Re: sending to an xterm

2008-08-08 Thread Kent Tenney
Derek Martin code at 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, execute

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

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

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

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

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,

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

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

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

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:

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

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 fnm

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: sending to an xterm

2008-08-08 Thread Rich Healey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kent Tenney wrote: Derek Martin code at 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

[issue3519] Evaluation order example lacks suffix

2008-08-08 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Thanks, fixed in r65591. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3519 ___

[issue3429] urllib.urlopen() return type

2008-08-08 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Agreed. -- resolution: - works for me status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3429 ___

[issue3522] zip() function example in tutorial

2008-08-08 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Thanks, applied in r65592. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3522 ___

[issue3523] Reverse quotes in Python 3.0 tutorial

2008-08-08 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Thanks, applied in r65593. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3523 ___

[issue3525] Changes to exceptions not reflected in tutorial examples.

2008-08-08 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Thanks, applied in r65594. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3525 ___

[issue3524] IOError when attempting negative seek in file (Python 3.0 tutorial)

2008-08-08 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Since the file is a text file, such seeking is not possible. I've now updated the whole section about files; in particular there was also an outdated description of text vs. binary mode. Committed r65595. -- resolution: - fixed

[issue3429] urllib.urlopen() return type

2008-08-08 Thread ThomasH
ThomasH [EMAIL PROTECTED] added the comment: On Fri, Aug 8, 2008 at 2:04 AM, Senthil [EMAIL PROTECTED] wrote: Senthil [EMAIL PROTECTED] added the comment: I agree with Benjamin on this issue, describing what is a File like Object is so much un-needed in Python and especially at urlopen

[issue3429] urllib.urlopen() return type

2008-08-08 Thread ThomasH
ThomasH [EMAIL PROTECTED] added the comment: Georg, you seem like a dedicated person. I'm sure you guys have thought about documenting return types of methods and functions in a standardized way, documenting classes so that you could fade in and out inherited features, and such. Where do you

[issue3270] test_multiprocessing: test_listener_client flakiness

2008-08-08 Thread Trent Nelson
Trent Nelson [EMAIL PROTECTED] added the comment: Jesse, thanks for capturing my e-mail thread in this issue. Can you comment on my last three paragraphs? Essentially, I think we should lock down the API and assert that Listener.address will always be a 'connectable' end-point. (i.e. not a

[issue1117601] os.path.exists returns false negatives in MAC environments.

2008-08-08 Thread Virgil Dupras
Virgil Dupras [EMAIL PROTECTED] added the comment: hsoft-dev:~ hsoft$ mkdir foobar hsoft-dev:~ hsoft$ echo baz foobar/baz hsoft-dev:~ hsoft$ chmod 000 foobar/baz hsoft-dev:~ hsoft$ python Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin

[issue3270] test_multiprocessing: test_listener_client flakiness

2008-08-08 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: This would mean raising an exception in Listener.__init__ if this invariant is violated. If I understand the suggestion correctly, it would forbid people to listen on 0.0.0.0. I'm not sure it is the right correction for the problem.

[issue1117601] os.path.exists returns false negatives in MAC environments.

2008-08-08 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: The only sane alternative to the current behaviour would be to raise an Exception from os.path.exists rather than returning False. But it would also break a lot of code, and complexify code using os.path.exists which currently doesn't need to

  1   2   >