Re: Exec woes

2009-01-27 Thread Hendrik van Rooyen
Stephen Hansen wrote: >Hendrik van Rooyen wrote: >>IDLE 1.1.3 No Subprocess > help(exec) >>SyntaxError: invalid syntax > >>Its the same under Linux SuSe, Python 2.5.1. >> >>I think this is a BUG. > >Exec is a statement, not a function nor an object: even though you can enc

errno 22 instead of errno 2

2009-01-27 Thread Glenn Linderman
open("c:\abc","rb") This simple one-line script, produces errno 22 on Python 2.6, but errno 2 on Python 2.5.2 Is this an unintentional regression? Or is this an intentional bug fix? The file doesn't exist (errno 2) but I guess on Windows it is also somewhat an invalid file name (errno 22).

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Martin v. Löwis
> Next step? You need to use the Visual Studio debugger to find out where precisely the IOError comes from. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Start Python at client side from web app

2009-01-27 Thread Arlo Belshee
> We create a custom mime-type and register it on the client PC. The web > application > can send signed python code to the client PC. If the signature is correct, > the code will be executed at the client. The signature prevents others from > executing > code. This will let you start a program

Best/better way? (histogram)

2009-01-27 Thread Bernard Rankin
Hello, I've got several versions of code to here to generate a histogram-esque structure from rows in a CSV file. The basic approach is to use a Dict as a bucket collection to count instances of data items. Other than the try/except(KeyError) idiom for dealing with new bucket names, which I d

Python Package Managment

2009-01-27 Thread Bernard Rankin
[extracted from pylons-discuss] > >> I hate to pass the buck, but this is Python's fault for not having > >> reliable package management built in. There's nothing Pylons can do > >> about it except switch to another programming language. > > [SNIP] > > Without Setuptools, > Pylons and TurboGear

Re: "The application has failed to start because the application configuration is incorrect"

2009-01-27 Thread Carl Banks
On Jan 27, 9:16 pm, "Méta-MCI \(MVP\)" wrote: > Hi! > > I have a similar problem, with Python 2.6.1 and pywin32. Since python > 2.6.1. > Return to 2.6: OK ; re-install 2.6.1: the problem return. > No solution to this day. > The problem is known, but not resolved > In the expectation, I stay in 2

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-27 Thread Steven D'Aprano
On Tue, 27 Jan 2009 13:16:36 -0800, Reckoner wrote: > I'm not sure this is possible, but I would like to have a list of > objects > > A=[a,b,c,d,...,z] > > where, in the midst of a lot of processing I might do something like, > > A[0].do_something_which_changes_the_properties() > > which alt

Re: Drawing and Displaying an Image with PIL

2009-01-27 Thread r
Change this line: draw.line((0,0),(20,140), fill=128) To This: draw.line((0,0, 20,140), fill=128) And you should be good to go. Like you said, if you need to combine 2 tuples you can do: (1,2)+(3,4) -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling Python-tk code from C/C++

2009-01-27 Thread Rajorshi Biswas
Thanks David. I found some help in this thread :http://mail.python.org/pipermail/cplusplussig/2006September/010814.htmlI am trying to adapt the same over for our requirements looks like we need new Python interpreters to handle the Tk UI loop. We will post back if we are able to make it work.

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Michele Simionato
On Jan 27, 9:13 pm, Mark Wooding wrote: > I'm referring to a number of features: > >   * Redefinition of classes, yes.  Interactive development is very >     frustrating without this.  Thanks for that link, by the way! > >   * CHANGE-CLASS to change the class of instances.  This is more than >    

Re: "The application has failed to start because the application configuration is incorrect"

2009-01-27 Thread M�ta-MCI (MVP)
Hi! I have a similar problem, with Python 2.6.1 and pywin32. Since python 2.6.1. Return to 2.6: OK ; re-install 2.6.1: the problem return. No solution to this day. The problem is known, but not resolved In the expectation, I stay in 2.6 @-salutations -- Michel Claveau -- http://mail.python.o

Re: How to execute a hyperlink?

2009-01-27 Thread alex23
On Jan 28, 10:59 am, Muddy Coder wrote: > Module os provides a means of running shell commands [...] > > import os > os.system('dir .') > > will execute command dir > > I think a hyperlink should also be executed. I tried: > > os.system('http://somedomain.com/foo.cgi?name=foo&passwd=bar') Well, c

"The application has failed to start because the application configuration is incorrect"

2009-01-27 Thread Carl Banks
Perhaps someone who's familiar with Windows XP and Python can figure this one out, because it's baffling me. I installed the following packages on a more or less clean XP system: Python 2.6.1, straight from the MSI. WxPython 2.8.9.1, straight from the windows installer. Both installed with no er

Re: Python Application Server

2009-01-27 Thread James Mills
On Wed, Jan 28, 2009 at 2:42 PM, James Mills wrote: (...) > Might I recommend circuits (1) as a general purpose > framework that you can build your application on top of. > > circuits will allow you to communicate with long-running > background processes, communicate between processes > (by way o

Re: Drawing and Displaying an Image with PIL

2009-01-27 Thread W. eWatson
r wrote: On Jan 27, 9:15 pm, "W. eWatson" wrote: Here's my program: # fun and games import Image, ImageDraw im = Image.open("wagon.tif") # it exists in the same Win XP # folder as the program draw = ImageDraw.Draw(im) draw.line((0, 0) + im.size, fill=128) draw.line((0,0),(20,140), fill=128)

Re: Python Application Server

2009-01-27 Thread James Mills
On Wed, Jan 28, 2009 at 2:23 PM, Adi Eyal wrote: > Could anyone recommend a python application server? My application > consists mainly of long running background processes that need to > communicate with each other. Features on my wishlist include, process > pooling (each process will in general

Re: Addition of multiprocessing ill-advised? (was: Python 3.0.1)

2009-01-27 Thread James Mills
On Wed, Jan 28, 2009 at 1:49 PM, Ben Finney wrote: > Steve Holden writes: >> I think that [Python 2.6 was a rushed release]. 2.6 showed it in the >> inclusion (later recognizable as somewhat ill-advised so late in the >> day) of multiprocessing […] Steve: It's just a new package - it used to be

Python Application Server

2009-01-27 Thread Adi Eyal
Hi All Could anyone recommend a python application server? My application consists mainly of long running background processes that need to communicate with each other. Features on my wishlist include, process pooling (each process will in general be stateless), monitoring, scheduling and a framew

Addition of multiprocessing ill-advised? (was: Python 3.0.1)

2009-01-27 Thread Ben Finney
(Continuing a side topic of a different discussion) Steve Holden writes: > I think that [Python 2.6 was a rushed release]. 2.6 showed it in the > inclusion (later recognizable as somewhat ill-advised so late in the > day) of multiprocessing […] What was ill-advised about the addition of the ‘mu

Re: Why doesn't eval of generator expression work with locals?

2009-01-27 Thread Steve Holden
Gabriel Genellina wrote: > En Tue, 27 Jan 2009 22:17:16 -0200, Robert Kern > escribió: >> On 2009-01-27 17:56, Fabio Zadrozny wrote: > >> Making locals and globals different emulates a function, where the >> code will fail: >> >>>>> del y, ar >>>>> def f(): >>... y = 'bar' >>.

Re: Drawing and Displaying an Image with PIL

2009-01-27 Thread r
On Jan 27, 9:15 pm, "W. eWatson" wrote: > Here's my program: > > # fun and games > import Image, ImageDraw > > im = Image.open("wagon.tif") # it exists in the same Win XP > # folder as the program > draw = ImageDraw.Draw(im) > draw.line((0, 0) + im.size, fill=128) > draw.line((0,0),(20,140), fill=

Receiving data from USB

2009-01-27 Thread barithegreat
Hi Can any body tell me how can i receive data from usb(usrp) in python. -- http://mail.python.org/mailman/listinfo/python-list

Drawing and Displaying an Image with PIL

2009-01-27 Thread W. eWatson
Here's my program: # fun and games import Image, ImageDraw im = Image.open("wagon.tif") # it exists in the same Win XP # folder as the program draw = ImageDraw.Draw(im) draw.line((0, 0) + im.size, fill=128) draw.line((0,0),(20,140), fill=128) # How show this final image on a display? root.main

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Benjamin Kaplan
On Tue, Jan 27, 2009 at 9:16 PM, Gabriel Genellina wrote: > En Wed, 28 Jan 2009 00:03:55 -0200, John Machin > escribió: > > On Jan 28, 5:56 am, "Martin v. Löwis" wrote: >> >>> > #include "stdio.h" >>> > int main(int argc, char **argv) { >>> > printf("<\xc2\x80>\n"); >>> > } >>> >>> > co

Re: pyAA for Python2.5

2009-01-27 Thread Kottiyath
On Jan 27, 11:56 pm, Mike Driscoll wrote: > On Jan 27, 12:12 pm, Kottiyath wrote: > > > > > Hi, > >    I would like to obtain pyAA for Python 2.5. I went through their > > web site, but they provide the windows exe only for Python2.4. I tried > > compiling from source, but that also was to no ava

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Gabriel Genellina
En Wed, 28 Jan 2009 00:03:55 -0200, John Machin escribió: On Jan 28, 5:56 am, "Martin v. Löwis" wrote: > #include "stdio.h" > int main(int argc, char **argv) { >     printf("<\xc2\x80>\n"); >     } > compiled with mingw32 (gcc (GCC) 3.4.5 (mingw-vista special r3)) > and using "Lucida Console

Re: Why doesn't eval of generator expression work with locals?

2009-01-27 Thread Gabriel Genellina
En Tue, 27 Jan 2009 22:17:16 -0200, Robert Kern escribió: On 2009-01-27 17:56, Fabio Zadrozny wrote: Making locals and globals different emulates a function, where the code will fail: >>> del y, ar >>> def f(): ... y = 'bar' ... ar = ['foo', 'bar'] ... print 'Ra

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread John Machin
On Jan 28, 5:56 am, "Martin v. Löwis" wrote: > > #include "stdio.h" > > int main(int argc, char **argv) { > >     printf("<\xc2\x80>\n"); > >     } > > > compiled with mingw32 (gcc (GCC) 3.4.5 (mingw-vista special r3)) > > and using "Lucida Console" font: > > > After CHCP 1252, this prints < A-cir

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-27 Thread Graham Dumpleton
On Jan 28, 11:28 am, James Mills wrote: > On Wed, Jan 28, 2009 at 10:15 AM, excord80 wrote: > > Well, let's see. I don't need a templating library, since -- as you > > pointed out -- I can just use Python's own. I don't need a db > > interface (can just make my own dbapi calls if needed). Don't n

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-27 Thread excord80
On Jan 27, 7:28 pm, James Mills wrote: > > One option is to configure Apache with mod_wsgi and just > use WSGI. Fairly simple really and much like CGI. This is a shared hosting arrangement, so I don't have the option of adding an apache module. Also, if it's much like CGI, I don't see what benef

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread david.lyon
> joseph.a.mar...@gmail.com wrote: >> Greetings! I've heard enough raving about Python, I'm going to see for >> myself what all the praise is for! >> >> I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you >> even use an IDE for Python? >> >> Any recommendations on open source Python

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Benjamin Kaplan
On Tue, Jan 27, 2009 at 7:41 PM, John Machin wrote: > On Jan 27, 6:17 pm, "Martin v. Löwis" wrote: > > > Well, the first step would be to tell Python that there is a code page > > > 65001. On Python 2.6, I get a LookupError for an unknown encoding after > > > doing "chcp 65001". I checked the li

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread Burukena
On 1/27/09 8:44 PM, James Stroud wrote: joseph.a.mar...@gmail.com wrote: Greetings! I've heard enough raving about Python, I'm going to see for myself what all the praise is for! I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you even use an IDE for Python? Any recommendations

Re: How to execute a hyperlink?

2009-01-27 Thread Jon Clements
On Jan 28, 12:59 am, Muddy Coder wrote: > Hi Folks, > > Module os provides a means of running shell commands, such as: > > import os > os.system('dir .') > > will execute command dir > > I think a hyperlink should also be executed. I tried: > > os.system('http://somedomain.com/foo.cgi?name=foo&pas

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread Philip Semanchuk
On Jan 27, 2009, at 7:44 PM, James Stroud wrote: joseph.a.mar...@gmail.com wrote: Greetings! I've heard enough raving about Python, I'm going to see for myself what all the praise is for! I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you even use an IDE for Python? Any reco

How to execute a hyperlink?

2009-01-27 Thread Muddy Coder
Hi Folks, Module os provides a means of running shell commands, such as: import os os.system('dir .') will execute command dir I think a hyperlink should also be executed. I tried: os.system('http://somedomain.com/foo.cgi?name=foo&passwd=bar') but I got kicked out by the Python interpreter. I

Spam making a comeback??

2009-01-27 Thread r
Seems like the level of spam is increasing in the last week, and today has been bad. How are the spambytes coming along? -- http://mail.python.org/mailman/listinfo/python-list

Python and Nagios

2009-01-27 Thread gslindstrom
Hello all- We have started using Nagios at work to monitor our computer system and have been very happy with the results. We have decided to use it monitor our business processes as well, so I needed to write custom plug-ins and I opted to use Python because I am very comfortable with it. I foun

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread James Stroud
joseph.a.mar...@gmail.com wrote: Greetings! I've heard enough raving about Python, I'm going to see for myself what all the praise is for! I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you even use an IDE for Python? Any recommendations on open source Python environments? Tha

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread John Machin
On Jan 27, 6:17 pm, "Martin v. Löwis" wrote: > > Well, the first step would be to tell Python that there is a code page > > 65001. On Python 2.6, I get a LookupError for an unknown encoding after > > doing "chcp 65001". I checked the list of aliases in Python 3 and there > > was no entry for cp650

Re: Why doesn't eval of generator expression work with locals?

2009-01-27 Thread Fabio Zadrozny
> I think you can work around your problem by using the same dictionary for > both locals and globals. The locals/globals distinction is not useful in > your circumstances. For example, the Python interpreter has these the same: > > >>> globals() is locals() > True > Interesting... In my case, w

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-27 Thread James Mills
On Wed, Jan 28, 2009 at 10:15 AM, excord80 wrote: > Well, let's see. I don't need a templating library, since -- as you > pointed out -- I can just use Python's own. I don't need a db > interface (can just make my own dbapi calls if needed). Don't need url > mapping (can just use mod_rewrite rules

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-27 Thread excord80
On Jan 27, 4:52 pm, Tim Chase wrote: > > I need to make a small, relatively low-traffic site that users can > > create accounts on and log into. Scripts must run as cgi (no > > mod_python or FastCGI is available). Can anyone recommend a small and > > simple web framework for Python, maybe similar

Re: Why doesn't eval of generator expression work with locals?

2009-01-27 Thread Robert Kern
On 2009-01-27 17:56, Fabio Zadrozny wrote: On Tue, Jan 27, 2009 at 9:51 PM, James Mills wrote: On Wed, Jan 28, 2009 at 9:31 AM, Fabio Zadrozny wrote: Anyone knows why the code below gives an error? global_vars = {} local_vars = {'ar':["foo", "bar"], 'y':"bar"} print eval('all((x == y for x

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread joseph.a.mar...@gmail.com
On Jan 27, 6:47 pm, André wrote: > On Jan 27, 7:06 pm, "joseph.a.mar...@gmail.com" > > wrote: > > Greetings! I've heard enough raving about Python, I'm going to see for > > myself what all the praise is for! > > > I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you > > even use an

Re: Why doesn't eval of generator expression work with locals?

2009-01-27 Thread Jon Clements
On Jan 27, 11:31 pm, Fabio Zadrozny wrote: > Hi All, > > Anyone knows why the code below gives an error? > > global_vars = {} > local_vars = {'ar':["foo", "bar"], 'y':"bar"} > print eval('all((x == y for x in ar))', global_vars, local_vars) > > Error: > > Traceback (most recent call last): >   Fil

Re: Why doesn't eval of generator expression work with locals?

2009-01-27 Thread Fabio Zadrozny
On Tue, Jan 27, 2009 at 9:51 PM, James Mills wrote: > On Wed, Jan 28, 2009 at 9:31 AM, Fabio Zadrozny wrote: >> Anyone knows why the code below gives an error? >> >> global_vars = {} >> local_vars = {'ar':["foo", "bar"], 'y':"bar"} >> print eval('all((x == y for x in ar))', global_vars, local_var

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-27 Thread excord80
On Jan 27, 4:52 pm, Tim Chase wrote: > > I need to make a small, relatively low-traffic site that users can > > create accounts on and log into. Scripts must run as cgi (no > > mod_python or FastCGI is available). Can anyone recommend a small and > > simple web framework for Python, maybe similar

Re: Why doesn't eval of generator expression work with locals?

2009-01-27 Thread James Mills
On Wed, Jan 28, 2009 at 9:31 AM, Fabio Zadrozny wrote: > Anyone knows why the code below gives an error? > > global_vars = {} > local_vars = {'ar':["foo", "bar"], 'y':"bar"} > print eval('all((x == y for x in ar))', global_vars, local_vars) y is undefined in your generator expression. Why are yo

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread André
On Jan 27, 7:06 pm, "joseph.a.mar...@gmail.com" wrote: > Greetings! I've heard enough raving about Python, I'm going to see for > myself what all the praise is for! > > I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you > even use an IDE for Python? > If you already use netbeans,

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread Joe Strout
joseph.a.mar...@gmail.com wrote: Greetings! I've heard enough raving about Python, I'm going to see for myself what all the praise is for! I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you even use an IDE for Python? I don't -- I just use TextWrangler and a Terminal window.

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread Benjamin Kaplan
On Tue, Jan 27, 2009 at 6:06 PM, joseph.a.mar...@gmail.com < joseph.a.mar...@gmail.com> wrote: > Greetings! I've heard enough raving about Python, I'm going to see for > myself what all the praise is for! > > I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you > even use an IDE for

Why doesn't eval of generator expression work with locals?

2009-01-27 Thread Fabio Zadrozny
Hi All, Anyone knows why the code below gives an error? global_vars = {} local_vars = {'ar':["foo", "bar"], 'y':"bar"} print eval('all((x == y for x in ar))', global_vars, local_vars) Error: Traceback (most recent call last): File "C:\temp\work\test\src\a.py", line 3, in print eval('all(

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread Ned Deily
In article <0f1ee3b4-e4c1-4ae4-9d6d-1184c6e20...@i24g2000prf.googlegroups.com>, "joseph.a.mar...@gmail.com" wrote: > Greetings! I've heard enough raving about Python, I'm going to see for > myself what all the praise is for! > > I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do y

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread Philip Semanchuk
On Jan 27, 2009, at 6:06 PM, joseph.a.mar...@gmail.com wrote: Greetings! I've heard enough raving about Python, I'm going to see for myself what all the praise is for! I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you even use an IDE for Python? Some people do; I don't.

Re: len()

2009-01-27 Thread Gabriel Genellina
En Tue, 27 Jan 2009 20:30:29 -0200, Tobiah escribió: Just out of curiosity, why was len() made to be it's own function? I often find myself typing things like my_list.len before I catch myself. http://www.python.org/doc/faq/general/#why-does-python-use-methods-for-some-functionality-e-g-list

Re: len()

2009-01-27 Thread Ori Livneh
I'm newish to Python, so this might be way off-base, but I think it this might help: Allen Downey explains in "Think Python" that *"the syntax of a function call suggests that the function is the active agent."* So you're calling the function len() and telling it you have an object for it to measur

Re: ctypes with Compaq Visual Fortran 6.6B *.dll (Windows XP), passing of integer and real values

2009-01-27 Thread Jon Clements
On Jan 27, 9:41 pm, alex wrote: > Hello everybody > I am mainly a Fortran programmer and beginning to learn Python(2.5) > and OOP programming. > I hope in the end to put a GUI on my existing Fortran code. > Therefore I am also trying to learn Python's "ctypes" library. > > Unfortunately the ctypes

New to python, open source Mac OS X IDE?

2009-01-27 Thread joseph.a.mar...@gmail.com
Greetings! I've heard enough raving about Python, I'm going to see for myself what all the praise is for! I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you even use an IDE for Python? Any recommendations on open source Python environments? Thanks! -- http://mail.python.org/mail

Re: Calling Python-tk code from C/C++

2009-01-27 Thread David Boddie
On Tuesday 27 January 2009 18:29, Gabriel Genellina wrote: > En Tue, 27 Jan 2009 07:42:01 -0200, Rajorshi Biswas > escribió: > >> Hello all, This is my first post to this mailing list. Our requirement >> is to invoke a Tkinter python panel from a C++ GUI app where both GUI >> windows would run i

Re: How many followers of comp.lang.python

2009-01-27 Thread Mensanator
On Jan 27, 11:53 am, rantingrick wrote: > On Jan 27, 10:12 am, Bruno Desthuilliers > 42.desthuilli...@websiteburo.invalid> wrote: > > All you can say is that he didn't *post* here (at least under his real > > identity...) for the 9 past years - this doesn't mean he never *reads* > > (and this, yo

Re: USB in python

2009-01-27 Thread Tino Wildenhain
Hi, Astan Chee wrote: Diez B. Roggisch wrote: If all you need is on-off - why can't you just use a switch? Because I want to control the on-off the device using a computer and write software for it (which I am confident I can do if I had references to how the wrappers to said inte

len()

2009-01-27 Thread Tobiah
Just out of curiosity, why was len() made to be it's own function? I often find myself typing things like my_list.len before I catch myself. Thanks, Toby -- http://mail.python.org/mailman/listinfo/python-list

Re: change syntax coloring in IDLE

2009-01-27 Thread Ned Deily
In article , Robert Kern wrote: > On 2009-01-27 13:40, Ned Deily wrote: > > There is supposed to be a Preferences menu option for IDLE on OS X but, > > depending on the Python version and how IDLE is launched, it may or may > > not appear due to various bugs. (I'm working on some patches for the

Re: change syntax coloring in IDLE

2009-01-27 Thread Vincent Davis
using terminal and opening"In Vincent's case (EPD), this would be /Library/Frameworks/Python/Versions/Current/bin/idle2.5" Worked!! Thanks for the help. Vincent Davis On Tue, Jan 27, 2009 at 2:42 PM, Robert Kern wrote: > On 2009-01-27 13:40, Ned Deily wrote: > >> In article >> <77e83110090127

Re: How many followers of comp.lang.python

2009-01-27 Thread Mike Driscoll
On Jan 27, 2:52 pm, Duncan Booth wrote: > Thorsten Kampe wrote: > > * rantingrick (Tue, 27 Jan 2009 10:03:16 -0800 (PST)) > >> On Jan 27, 12:00 pm, Paul Rubin wrote: > >> > Guido does post here once in a while, under his own name.  I can't > >> > think of any very r

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-27 Thread Tim Chase
I need to make a small, relatively low-traffic site that users can create accounts on and log into. Scripts must run as cgi (no mod_python or FastCGI is available). Can anyone recommend a small and simple web framework for Python, maybe similar to Perl's CGI::Application? Or would it just be bett

ctypes with Compaq Visual Fortran 6.6B *.dll (Windows XP), passing of integer and real values

2009-01-27 Thread alex
Hello everybody I am mainly a Fortran programmer and beginning to learn Python(2.5) and OOP programming. I hope in the end to put a GUI on my existing Fortran code. Therefore I am also trying to learn Python's "ctypes" library. Unfortunately the ctypes tutorial does not show simple examples so I s

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Luis Zarrabeitia
On Tuesday 27 January 2009 02:56:51 pm Russ P. wrote: > On Jan 27, 11:40 am, Luis Zarrabeitia wrote: > > I think you still fail to see that what we are objecting is not that the > > original writer can "optionally" use the enforced data hiding (which, as > > someone pointed out before me, can be d

Re: change syntax coloring in IDLE

2009-01-27 Thread Robert Kern
On 2009-01-27 13:40, Ned Deily wrote: In article <77e831100901270950i6b0b510chf80a495a65ca9...@mail.gmail.com>, Vincent Davis wrote: I am using mac with python 2.5.2 and IDLE verison 1.2.2. in the help it states I can change he text coloring by using "Configure IDLE" but I not sure what this

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-27 Thread Chris Rebert
On Tue, Jan 27, 2009 at 1:16 PM, Reckoner wrote: > I'm not sure this is possible, but I would like to have > a list of objects > > A=[a,b,c,d,...,z] > > where, in the midst of a lot of processing I might do something like, > > A[0].do_something_which_changes_the_properties() > > which alter the

Re: optparse with numpy.array?

2009-01-27 Thread Robert Kern
On 2009-01-27 03:09, Johan Ekh wrote: Thanks, James I will try your suggestion! Robert, what mean with "interactively" is that i would like to create an array in the ipython shell, e.g. with m_i = array([1.0, 2.0, 3.0]) or by reading a file with values etc., and then execute my program with "mypr

Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-27 Thread excord80
I need to make a small, relatively low-traffic site that users can create accounts on and log into. Scripts must run as cgi (no mod_python or FastCGI is available). Can anyone recommend a small and simple web framework for Python, maybe similar to Perl's CGI::Application? Or would it just be bette

self-aware list of objects able to sense constituent member alterations?

2009-01-27 Thread Reckoner
I'm not sure this is possible, but I would like to have a list of objects A=[a,b,c,d,...,z] where, in the midst of a lot of processing I might do something like, A[0].do_something_which_changes_the_properties() which alter the properties of the object 'a'. The trick is that I would like A to

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Mark Wooding
"Russ P." writes: > If Python had a "private" keyword (or equivalent), for example, the > user would only need to delete it wherever necessary to gain the > desired access. And you obviously weren't listening when we said that having to make source code changes to upstream modules was a serious

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Scott David Daniels
Paul Rubin wrote: Scott David Daniels writes: But, the research on the language "Self" shows that even in the face of a language with more dynamism than Smalltalk (or Python), performance can be obtained using compiler technology I'd be interested in seeing any publications about that Sel

Re: change syntax coloring in IDLE

2009-01-27 Thread Ned Deily
In article <77e831100901271207o4117998cqc35c3b62fdbb1...@mail.gmail.com>, Vincent Davis wrote: > I am using "EPD with Py2.5 4.0.30002"when I try to launch IDLE.app which is > in the above folder i get -bash: IDLE.app: command not found > which is strange because when I do ls it is listed. > the

Re: How many followers of comp.lang.python

2009-01-27 Thread Duncan Booth
Thorsten Kampe wrote: > * rantingrick (Tue, 27 Jan 2009 10:03:16 -0800 (PST)) >> On Jan 27, 12:00 pm, Paul Rubin wrote: >> > Guido does post here once in a while, under his own name.  I can't >> > think of any very recent examples, but I can remember some from a f

Re: Why GIL? (was Re: what's the point of rpython?)

2009-01-27 Thread Paul Rubin
Rhamphoryncus writes: > IMO it's possible to rewrite only the core while keeping the refcount > API for external compatibility, but a tracing GC API in portable C is > hideous. It's done all the time for other languages, and is less hassle than the incref/decref stuff and having to remember the

Re: Pexpect and telnet not communicating properly

2009-01-27 Thread Mark Wooding
David Anderson writes: > I am trying to automate the following session - to talk to my router: > > telnet speedtouch [...] > I am using the following code: [...] > child.expect('sername : ') > child.sendline('Administrator') I've scripted communications with my Speedtouch 510 using pexpect: I us

Re: How many followers of comp.lang.python

2009-01-27 Thread Steve Holden
rantingrick wrote: > On Jan 27, 12:00 pm, Paul Rubin wrote: >> Guido does post here once in a while, under his own name. I can't >> think of any very recent examples, but I can remember some from a few >> years back. > > I searched the archives for "Guido van Rossum

Re: Why GIL? (was Re: what's the point of rpython?)

2009-01-27 Thread Rhamphoryncus
On Jan 27, 12:47 pm, Steve Holden wrote: > Paul Rubin wrote: > > GIL-less Python (i.e. Jython) already exists and beats CPython in > > performance a lot of the time, including on single processors. > > Whether the GIL can be eliminated from CPython without massive rework > > to every extension mod

Re: How many followers of comp.lang.python

2009-01-27 Thread Mike Driscoll
> > Of the newsgroups I read, c.l.python is probably the most friendly and > > has one of the highest S/N ratios.  People who would have been roasted > > alive in other newsgroups for their laziness or presumptuousness get > > surprisingly gentle treatment in c.l.python.  I do know of a few > > lo

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Rhamphoryncus
On Jan 27, 12:13 pm, "Russ P." wrote: > On Jan 26, 6:09 am, Steve Holden wrote: > > > Quite. Python is a language "for consenting adults". It has perceived > > deficiencies for certain software engineering environments. Can we drop > > the subject now? This horse was flogged to death long ago, an

Re: How many followers of comp.lang.python

2009-01-27 Thread Mark Wooding
Grant Edwards writes: > I've always found comp.lang.c to be a rather dangerous place as well. Hey, I grew up in comp.lang.c! I'd have to agree with you, though. (I try to play nice when I'm here.) In fact, comp.lang.* generally has a reputation as a place you don't want to find yourself afte

Re: *.python.org broken?

2009-01-27 Thread gmail_cs
On Monday 26 January 2009 03:48:25 am you wrote: > I experienced the same problem here in Brazil. Tweeks ago I could not > access any *.python.org site. Today I tried and it worked. The > problem seemed to be limited to Python's domain because I could > access every other site that I tried the same

pyPEG parser-interpreter released

2009-01-27 Thread Volker Birk
Hi, pyPEG is a general parser for context free languages as a small Python module. It is PEG (Parsing Expression Grammar) based. It can be very easily used in your Python program. Everybody who understands regular expressions can quickly understand and use pyPEG. The output result is a standard

pyPEG parser-interpreter released

2009-01-27 Thread Volker Birk
Hi, pyPEG is a general parser for context free languages as a small Python module. It is PEG (Parsing Expression Grammar) based. It can be very easily used in your Python program. Everybody who understands regular expressions can quickly understand and use pyPEG. The output result is a standard

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Mark Wooding
[No, my email address doesn't begin `m...@'. Fixed.] Michele Simionato writes: > On Jan 21, 2:11 am, Mark Wooding wrote: > >> CLOS is much more complex and dynamic than Python's object system; >> but it can be compiled very aggressively. > > I agree that CLOS is complex and that it can be comp

Re: change syntax coloring in IDLE

2009-01-27 Thread Vincent Davis
I am using "EPD with Py2.5 4.0.30002"when I try to launch IDLE.app which is in the above folder i get -bash: IDLE.app: command not found which is strange because when I do ls it is listed. the path to the folder is /Applications/EPD\ with\ Py2.5\ 4.0.30002 ls returns Build Applet.app Mayavi.termin

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Russ P.
On Jan 27, 11:40 am, Luis Zarrabeitia wrote: > I think you still fail to see that what we are objecting is not that the > original writer can "optionally" use the enforced data hiding (which, as > someone pointed out before me, can be done with tools like pylint). The > objection is about the _us

Re: Why GIL? (was Re: what's the point of rpython?)

2009-01-27 Thread Steve Holden
Paul Rubin wrote: > Bryan Olson writes: >> I'm a fan of lock-free data structure and software transactional >> memory, but I'm also a realist. Heck, I'm one of this group's >> outspoken advocates of threaded architectures. Theoretical >> breakthroughs will happen, but in real world of today, threa

Re: optparse question

2009-01-27 Thread Steve Holden
Peter Otten wrote: > Pat wrote: > >> The question was it possible to add a simple flag like 'd-' to optparse >> with no other parameters? > > Do you mean "d-" or "-d"? If the latter, what's wrong with Robert Kern's > answer? > I guess it got crowded out by the prima donnas anxious to help Pat ph

Re: optparse question

2009-01-27 Thread Pat
Peter Otten wrote: Pat wrote: The question was it possible to add a simple flag like 'd-' to optparse with no other parameters? Do you mean "d-" or "-d"? If the latter, what's wrong with Robert Kern's answer? Peter I mean "-d" since that's what Unix commands expect for flags. My sole int

Re: change syntax coloring in IDLE

2009-01-27 Thread Ned Deily
In article <77e831100901270950i6b0b510chf80a495a65ca9...@mail.gmail.com>, Vincent Davis wrote: > I am using mac with python 2.5.2 and IDLE verison 1.2.2. in the help it > states I can change he text coloring by using "Configure IDLE" but I not > sure what this is. It's not sn the menu, running C

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Luis Zarrabeitia
On Tuesday 27 January 2009 02:13:50 pm Russ P. wrote: > I suggested that maybe -- maybe! -- the versatility of Python could be > enhanced with enforced data hiding. I was careful to say several times > that I don't know if that can even be done in Python (with all its > introspection and so forth).

Re: Is this pythonic?

2009-01-27 Thread Baby Coder
On 18 déc 2008, 13:51, Jason Scheirer wrote: > I'd say it's fine but breaking up the statement once or twice is a > good idea just because if one of the function calls in this nested > thing throws an exception, a smaller statement with fewer calls makes > for a far more readable traceback. And I

Re: optparse question

2009-01-27 Thread Peter Otten
Pat wrote: > The question was it possible to add a simple flag like 'd-' to optparse > with no other parameters? Do you mean "d-" or "-d"? If the latter, what's wrong with Robert Kern's answer? Peter -- http://mail.python.org/mailman/listinfo/python-list

Python + IDLE under Linux Suse 11.0

2009-01-27 Thread Rene Heymans
Dear All, This is my first post to this list. When googling of "*python + idle + CallTip + "Exception in Tkinter* * callback"* one finds within a list of 7 results: at the top of the list (Nr. 1) a link to http://mail.python.org/pipermail/python-bugs-list/2004-August/024530.html dated August 200

  1   2   3   >