Pyro 4.1 released

2010-06-28 Thread Irmen de Jong
Pyro 4.1 - I'm pleased to announce the release of Pyro 4.1! Detailed info here: http://www.razorvine.net/python/Pyro (a page about migration from Pyro 3.x is included) Download Pyro 4.1 here: http://www.xs4all.nl/~irmen/pyro4/download/ License: MIT software license. What is Pyro?

Pydev 1.5.8 Released

2010-06-28 Thread Fabio Zadrozny
Hi All, Pydev 1.5.8 has been released Details on Pydev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: --- * Features only available on Aptana Studio 3 (Beta): * Theming support provided by Aptana Studio used *

Re: Python dynamic attribute creation

2010-06-28 Thread Stephen Hansen
On 6/27/10 10:10 PM, Carl Banks wrote: On Jun 27, 3:49 am, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: WANG Cong a écrit : On 06/26/10 00:11, Neil Hodgsonnyamatongwe+thun...@gmail.com wrote: WANG Cong: 4) Also, this will _somewhat_ violate the OOP princples, in

Extension modules and common routines in Python/C API

2010-06-28 Thread ty ty
Hi, folks! I'm writing wrapper for C library. This library consist of several parts. And i want split my extension package into different extension modules. I think, this is the right way ;-) But, there are some common parts that exist in extension package, get_library_version, Error, and so

Re: Python dynamic attribute creation

2010-06-28 Thread geremy condra
On Sun, Jun 27, 2010 at 6:49 AM, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: WANG Cong a écrit : On 06/26/10 00:11, Neil Hodgson nyamatongwe+thun...@gmail.com wrote: WANG Cong: 4) Also, this will _somewhat_ violate the OOP princples, in OOP, this is and should be

Re: 回复: I wander which is better? JSP or Pytho n? And is there a place for JSP?

2010-06-28 Thread Chris Rebert
-- 原始邮件 -- 发件人: Chris Rebertc...@rebertia.com; 发送时间: 2010年6月28日(星期一) 中午1:09 收件人: Rogerrogerda...@gmail.com; 主题: Re: I wander which is better? JSP or Python? And is there a place for JSP? On Sun, Jun 27, 2010 at 9:49 PM, Roger rogerda...@gmail.com wrote: As

Re: Python dynamic attribute creation

2010-06-28 Thread Aahz
In article 4c2747c1$0$4545$426a7...@news.free.fr, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: Python has no pretention at elegance. That's not true at all. More precisely, I would agree with you if the emphasis is on pretention but not if the emphasis is on elegance; I

Re: Python dynamic attribute creation

2010-06-28 Thread Aahz
In article viavn.238$vd2...@news-server.bigpond.net.au, Neil Hodgson nyamatongwe+thun...@gmail.com wrote: WANG Cong: 4) Also, this will _somewhat_ violate the OOP princples, in OOP, this is and should be implemented by inherence. Most object oriented programming languages starting with

Re: Extension modules and common routines in Python/C API

2010-06-28 Thread Stefan Behnel
ty ty, 28.06.2010 08:16: I'm writing wrapper for C library. This library consist of several parts. And i want split my extension package into different extension modules. I think, this is the right way ;-) Depends. If it's somewhat large or deals with sufficiently distinct functionality, it

Re: Why Is Escaping Data Considered So Magical?

2010-06-28 Thread Stephen Hansen
On 6/26/10 7:21 PM, Lawrence D'Oliveiro wrote: In messagemailman.2123.1277522976.32709.python-l...@python.org, Tim Chase wrote: On 06/25/2010 07:49 PM, Lawrence D'Oliveiro wrote: ... I see that you published my unobfuscated e-mail address on USENET for all to see. I obfuscated it for a

回复: I wander which is bette r? JSP or Python? And is there a place for JSP?

2010-06-28 Thread rogerdai16
Oh,sorry.I was just to make a comparison between Python and JSP.Will Python take the place of JSP? 我的QQ空间 the Past 24 Hours. 昨天下午,毛概被点 已经有所预感,没有郁闷的心情 反倒是... -- 原始邮件 -- 发件人: Chris Rebertc...@rebertia.com; 发送时间: 2010年6月28日(星期一) 中午1:09 收件人:

Re: Why Python3

2010-06-28 Thread Steven D'Aprano
On Sun, 27 Jun 2010 21:25:49 -0700, John Nagle wrote: Unfortunately, that's not what's happening in the development pipeline. PyPy targets Python 2.5. Unladen Swallow targets Python 2.6.1. IronPython targets Python 2.6. C module support for CPython 3.x is still very spotty. We have a

Re: I strongly dislike Python 3

2010-06-28 Thread Stefan Behnel
Stefan Reich, 26.06.2010 17:59: This has probably been talked about on your lists, but I wasn't part of that discussion. I don't care to read up old arguments in one of the archives isn't a very convincing reason to start a discussion. Stefan --

Re: Why Is Escaping Data Considered So Magical?

2010-06-28 Thread Jorgen Grahn
On Mon, 2010-06-28, Kushal Kumaran wrote: On Mon, Jun 28, 2010 at 2:00 AM, Jorgen Grahn grahn+n...@snipabacken.se wrote: On Sun, 2010-06-27, Lawrence D'Oliveiro wrote: In message roy-854954.20435125062...@news.panix.com, Roy Smith wrote: I recently fixed a bug in some production code.  The

Re: I strongly dislike Python 3

2010-06-28 Thread Tim Golden
On 28/06/2010 00:03, eric_dex...@msn.com wrote: It should be easier to have a large number of python versions on one machine... I am realy fond of 2.5 so I am probily going to start compiling them or just include the python2.5 exe if I port stuff and settle it that way.. I have Python

Re: I strongly dislike Python 3

2010-06-28 Thread John Bokma
geremy condra debat...@gmail.com writes: On Sun, Jun 27, 2010 at 10:35 PM, John Bokma j...@castleamber.com wrote: [..] I've used several operating systems over many years and each OS has its own issues. I am currently using mostly Linux and it's far from the flawless OS some people seem to

[python-openid] 2.2.3 python package missing

2010-06-28 Thread Stéphane Klein
Hi, I write to you, to inform I can't install python-openid 2.2.3 version. I've writed to the author : I've work on a project, I use AuthKit and this tool have a dependency with python-openid-2.2.3 http://openidenabled.com/files/python-openid/packages/python-openid-2.2.3.tar.gz this file

Re: I strongly dislike Python 3

2010-06-28 Thread John Bokma
Stephen Hansen me+list/pyt...@ixokai.io writes: On 6/27/10 7:35 PM, John Bokma wrote: On top of that, I don't think it's that hard to make a small program that one associates with .py files which checks the first line and feeds the .py to the correct version of Python based on the information

Re: I strongly dislike Python 3

2010-06-28 Thread John Bokma
Tim Golden m...@timgolden.me.uk writes: On 28/06/2010 00:03, eric_dex...@msn.com wrote: It should be easier to have a large number of python versions on one machine... I am realy fond of 2.5 so I am probily going to start compiling them or just include the python2.5 exe if I port stuff and

Re: Python dynamic attribute creation

2010-06-28 Thread Bruno Desthuilliers
Aahz a écrit : In article 4c2747c1$0$4545$426a7...@news.free.fr, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: Python has no pretention at elegance. That's not true at all. More precisely, I would agree with you if the emphasis is on pretention but not if the emphasis

Re: I strongly dislike Python 3

2010-06-28 Thread Tim Golden
On 28/06/2010 09:29, John Bokma wrote: Tim Goldenm...@timgolden.me.uk writes: On 28/06/2010 00:03, eric_dex...@msn.com wrote: It should be easier to have a large number of python versions on one machine... I am realy fond of 2.5 so I am probily going to start compiling them or just include

Re: I strongly dislike Python 3

2010-06-28 Thread geremy condra
On Mon, Jun 28, 2010 at 4:23 AM, John Bokma j...@castleamber.com wrote: geremy condra debat...@gmail.com writes: On Sun, Jun 27, 2010 at 10:35 PM, John Bokma j...@castleamber.com wrote: [..] I've used several operating systems over many years and each OS has its own issues. I am currently

Re: I strongly dislike Python 3

2010-06-28 Thread John Bokma
geremy condra debat...@gmail.com writes: I'm starting to think Great, about time. Based on your previous reply I had the feeling you're a condescending prick, but now I am conviced, so *ploink*! -- John Bokma j3b Hacking Hiking

Re: I strongly dislike Python 3

2010-06-28 Thread Thomas Jollans
On 06/28/2010 03:21 AM, Stephen Hansen wrote: On 6/27/10 6:11 PM, geremy condra wrote: On Sun, Jun 27, 2010 at 8:50 PM, Grant Edwardsinva...@invalid.invalid wrote: If you install a real shell on Windows, then the hash-bang line works fine. :) Might as well spare yourself the trouble and

Re: [python-openid] 2.2.3 python package missing

2010-06-28 Thread Thomas Jollans
On 06/28/2010 10:26 AM, Stéphane Klein wrote: Hi, I write to you, to inform I can't install python-openid 2.2.3 version. I've writed to the author : I've work on a project, I use AuthKit and this tool have a dependency with python-openid-2.2.3

Creating exception class with custom fields in Python/C API

2010-06-28 Thread ty ty
Hello, list! I'm writing a wrapper for C-library. When something goes wrong in that library, i can get error details. And i want to assign them to fields of my own exception class. For this purpose, i looked throught Modules/_ctypes/_ctypes.c (in python source tree) and implemented same

Re: [ANN] Benchmarker 1.1.0 released - a samll benchmark utility

2010-06-28 Thread Stefan Behnel
Makoto Kuwata, 26.06.2010 19:09: I released Benchmarker 1.1.0. http://pypi.python.org/pypi/Benchmarker/ Benchmarker is a small utility to benchmark your code. Does it use any statistically sound way to run the benchmarks? It seems to produce just one number on output, which can be misleading

Re: Why Is Escaping Data Considered So Magical?

2010-06-28 Thread Gregory Ewing
Carl Banks wrote: Indeed, strncpy does not copy that final NUL if it's at or beyond the nth element. Probably the most mind-bogglingly stupid thing about the standard C library, which has lots of mind-boggling stupidity. I don't think it was as stupid as that back when C was designed. Every

Re: python source code - win/dos executable (on linux)

2010-06-28 Thread superpollo
Lawrence D'Oliveiro ha scritto: In message 4c24c152$0$31381$4fafb...@reader1.news.tin.it, superpollo wrote: suppose i work in a linux environment, but i would like to ship a win/dos executable file from time to time, just for test purposes (my testers are windows users and don't want to go

Re: Python dynamic attribute creation

2010-06-28 Thread Bruno Desthuilliers
Carl Banks a écrit : On Jun 27, 3:49 am, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: WANG Cong a écrit : On 06/26/10 00:11, Neil Hodgson nyamatongwe+thun...@gmail.com wrote: WANG Cong: 4) Also, this will _somewhat_ violate the OOP princples, in OOP, this is and should

Re: Why Is Escaping Data Considered So Magical?

2010-06-28 Thread Paul Rubin
Gregory Ewing greg.ew...@canterbury.ac.nz writes: I don't think it was as stupid as that back when C was designed. Every byte of memory was precious in those days, and if you had, say, 10 bytes allocated for a string, you wanted to be able to use all 10 of them for useful data. No I don't

Re: [python-openid] 2.2.3 python package missing

2010-06-28 Thread Stéphane Klein
Le 28/06/2010 11:34, Thomas Jollans a écrit : On 06/28/2010 10:26 AM, Stéphane Klein wrote: Hi, I write to you, to inform I can't install python-openid 2.2.3 version. I've writed to the author : I've work on a project, I use AuthKit and this tool have a dependency with python-openid-2.2.3

compile as exe with arguments

2010-06-28 Thread dirknbr
I want to compile as an exe using py2exe but the function should take arguments. How would I do this? Currently my exe runs (no errors) but nothing happens. -- http://mail.python.org/mailman/listinfo/python-list

Re: compile as exe with arguments

2010-06-28 Thread Martin P. Hellwig
On 06/28/10 11:18, dirknbr wrote: I want to compile as an exe using py2exe but the function should take arguments. How would I do this? Currently my exe runs (no errors) but nothing happens. I am not sure if I understand your question correctly, have you used a module like optparse and it

Re: Python dynamic attribute creation

2010-06-28 Thread Bruno Desthuilliers
Alexander Kapps a écrit : (snip) While I personally don't agree with this proposal (but I understand why some people might want it), I can see a reason. When disallowing direct attribute creation, those typos that seem to catch newcommers won't happen anymore. What I mean is this: class

Re: [python-openid] 2.2.3 python package missing

2010-06-28 Thread Thomas Jollans
On 06/28/2010 11:51 AM, Stéphane Klein wrote: Le 28/06/2010 11:34, Thomas Jollans a écrit : On 06/28/2010 10:26 AM, Stéphane Klein wrote: Hi, I write to you, to inform I can't install python-openid 2.2.3 version. I've writed to the author : I've work on a project, I use AuthKit and this

Re: compile as exe with arguments

2010-06-28 Thread dirknbr
On Jun 28, 11:26 am, Martin P. Hellwig martin.hell...@dcuktec.org wrote: On 06/28/10 11:18, dirknbr wrote: I want to compile as an exe using py2exe but the function should take arguments. How would I do this? Currently my exe runs (no errors) but nothing happens. I am not sure if I

Famous Emacs People With Hand Injuries

2010-06-28 Thread Xah Lee
• Famous Emacs People With Hand Injuries http://xahlee.org/emacs/emacs_hand_pain_celebrity.html plain text version follows. - Famous Emacs People With Hand Injuries Xah Lee, 2010-06-28 This page collect tales of computer programer

Python as a scripting language. Alternative to bash script?

2010-06-28 Thread Dave Pawson
I've a fairly long bash script and I'm wondering how easy it would be to port to Python. Main queries are: Ease of calling out to bash to use something like imageMagick or Java? Ease of grabbing return parameters? E.g. convert can return both height and width of an image. Can this be returned to

disputing the history of lisp machines

2010-06-28 Thread Xah Lee
just discovered a blog written by a old lisper Dan Weinreb, refuting on a story on Lisp Machine companies as told by Richard Stallman. “Rebuttal to Stallman’s Story About The Formation of Symbolics and LMI” (2007-11), by Dan Weinreb. At

Re: compile as exe with arguments

2010-06-28 Thread dirknbr
On Jun 28, 11:40 am, dirknbr dirk...@gmail.com wrote: On Jun 28, 11:26 am, Martin P. Hellwig martin.hell...@dcuktec.org wrote: On 06/28/10 11:18, dirknbr wrote: I want to compile as an exe using py2exe but the function should take arguments. How would I do this? Currently my exe runs

An invalid expression as parameter

2010-06-28 Thread Li Hui
When write i for i in range(16) I get SyntaxError: invalid syntax but When I use it like this: def f(x):\ ... pass f(i for i in range(16)) all is right I think it maybe f((i for i in range(16))) -- Li Hui http://www.lihui.org -- http://mail.python.org/mailman/listinfo/python-list

Re: I wander which is better? JSP or Python? And is there a place for JSP?

2010-06-28 Thread Aaron Watters
On Jun 28, 12:49 am, Roger rogerda...@gmail.com wrote: As I plan to study JSP, I find it extremly complicated and a part of J2EE. I did not attend to get the whole of J2EE. I hope anybody can describe the future of JSP. Is there a place for JSP? I work on a big java project to make money and

RE: Continuously running scripts question

2010-06-28 Thread jyoung79
Thank you all very much for your replies. Appreciate your thoughts. I'll check this out. Thanks. Jay -- On 2010-06-25, Tim Harig usernet at ilthio.net wrote: It sounds to me, since your script is acting on an event, that it would benefit from using something like inotify, or whatever

Is safe to use the shelve module with eventlet?

2010-06-28 Thread Alex
Hi all. I'm using eventlet http://eventlet.net/ to build a simple web crawler. Can I use the shelve module for data persistence? Will I run into problems due to the non-blocking nature of eventlet? Thanks in advanced. Alex -- http://mail.python.org/mailman/listinfo/python-list

Copy / Update - Paste a directory.

2010-06-28 Thread Alban Nona
Hello everybody ! wow my first time on this mailing list :) Well, here the deal. Im doing a script that basically copy and past into the local drive a specified directory with all this files. Im doing the copy with a copytree which is working well. But, (and I know it will not work as copytree

Re: I strongly dislike Python 3

2010-06-28 Thread Aaron Watters
On Jun 26, 9:06 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: I didn't notice this level of angst when Python made equally significant changes going from 1.5 to 2.0... admittedly Python 1.5 code would work unchanged in 2.0, but the 2.x series introduced MUCH bigger

Re: I strongly dislike Python 3

2010-06-28 Thread Grant Edwards
On 2010-06-28, Thomas Jollans tho...@jollans.com wrote: On 06/28/2010 03:21 AM, Stephen Hansen wrote: On 6/27/10 6:11 PM, geremy condra wrote: On Sun, Jun 27, 2010 at 8:50 PM, Grant Edwardsinva...@invalid.invalid wrote: If you install a real shell on Windows, then the hash-bang line works

optparse TypeError

2010-06-28 Thread dirknbr
I get an int object is not callable TypeError when I execute this. But I don't understand why. parser = optparse.OptionParser(usage: %lines [options] arg1) parser.add_option(-l, --lines, dest=lines, default=10, type=int, help=number of lines)

Copy / Update - Paste a directory.

2010-06-28 Thread Alban Nona
Hello everybody ! wow my first time on this mailing list :) Well, here the deal. Im doing a script that basically copy and past into the local drive a specified directory with all this files. Im doing the copy with a copytree which is working well. But, (and I know it will not work as copytree

Re: optparse TypeError

2010-06-28 Thread Simon Brunning
On 28 June 2010 14:30, dirknbr dirk...@gmail.com wrote: I get an int object is not callable TypeError when I execute this. But I don't understand why. (snip)    lines=options.lines Here you are assigning the -l option to the name 'lines'.    lines(args[0],topbottom=tb,maxi=lines) Here you

Re: I strongly dislike Python 3

2010-06-28 Thread Edward A. Falk
In article mailman.2146.1277570052.32709.python-l...@python.org, Thomas Jollans tho...@jollans.com wrote: There is no reason for print not being a function. Also, do you use print *that* much? Really? I use it all the time. Who doesn't? What do you use instead? -- -Ed Falk,

Re: I strongly dislike Python 3

2010-06-28 Thread Stefan Behnel
Edward A. Falk, 28.06.2010 16:15: In articlemailman.2146.1277570052.32709.python-l...@python.org, Thomas Jollans wrote: There is no reason for print not being a function. Also, do you use print *that* much? Really? I use it all the time. Who doesn't? What do you use instead? Usually

video

2010-06-28 Thread ali alali
http://www.islamhouse.com/tp/236845 -- http://mail.python.org/mailman/listinfo/python-list

Re: I strongly dislike Python 3

2010-06-28 Thread Stephen Hansen
On 6/28/10 2:20 AM, Thomas Jollans wrote: On 06/28/2010 03:21 AM, Stephen Hansen wrote: On 6/27/10 6:11 PM, geremy condra wrote: On Sun, Jun 27, 2010 at 8:50 PM, Grant Edwardsinva...@invalid.invalid wrote: If you install a real shell on Windows, then the hash-bang line works fine. :)

Re: I strongly dislike Python 3

2010-06-28 Thread Grant Edwards
On 2010-06-28, Stefan Behnel stefan...@behnel.de wrote: Edward A. Falk, 28.06.2010 16:15: In articlemailman.2146.1277570052.32709.python-l...@python.org, Thomas Jollans wrote: There is no reason for print not being a function. Also, do you use print *that* much? Really? I use it all the

Re: I strongly dislike Python 3

2010-06-28 Thread Stephen Hansen
On 6/28/10 7:15 AM, Edward A. Falk wrote: In articlemailman.2146.1277570052.32709.python-l...@python.org, Thomas Jollanstho...@jollans.com wrote: There is no reason for print not being a function. Also, do you use print *that* much? Really? I use it all the time. Who doesn't? What do you

Re: An invalid expression as parameter

2010-06-28 Thread Stephen Hansen
On 6/28/10 5:47 AM, Li Hui wrote: When write i for i in range(16) I get SyntaxError: invalid syntax but When I use it like this: def f(x):\ ... pass f(i for i in range(16)) all is right I think it maybe f((i for i in range(16))) The expression for name in iterator syntax is

Re: I strongly dislike Python 3

2010-06-28 Thread Stephen Hansen
On 6/28/10 7:35 AM, Grant Edwards wrote: On 2010-06-28, Stefan Behnelstefan...@behnel.de wrote: Edward A. Falk, 28.06.2010 16:15: In articlemailman.2146.1277570052.32709.python-l...@python.org, Thomas Jollans wrote: There is no reason for print not being a function. Also, do you use print

Re: GDAL-1.7.1 : vcvarsall.bat missing

2010-06-28 Thread kBob
On Jun 25, 9:51 am, Max Erickson maxerick...@gmail.com wrote: kBob krd...@gmail.com wrote: On Jun 25, 1:26 am, Mark Lawrence breamore...@yahoo.co.uk wrote: On 24/06/2010 21:48, Christian Heimes wrote:   I am attempting to install the GDAL bindings (GDAL-1.7.1) on a Windows XP Desktop

Re: Python as a scripting language. Alternative to bash script?

2010-06-28 Thread Benjamin Kaplan
On Mon, Jun 28, 2010 at 4:48 AM, Dave Pawson dave.paw...@gmail.com wrote: I've a fairly long bash script and I'm wondering how easy it would be to port to Python. Main queries are: Ease of calling out to bash to use something like imageMagick or Java? Easiest way is os.system, most flexible

Re: Python as a scripting language. Alternative to bash script?

2010-06-28 Thread D'Arcy J.M. Cain
On Mon, 28 Jun 2010 12:48:51 +0100 Dave Pawson dave.paw...@gmail.com wrote: I've a fairly long bash script and I'm wondering how easy it would be to port to Python. That's too big a question without seeing more of what your script does. I will try to suggest some direction though. First, if

Re: Python dynamic attribute creation

2010-06-28 Thread Aahz
In article 4c285e7c$0$17371$426a7...@news.free.fr, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid wrote: Aahz a écrit : In article 4c2747c1$0$4545$426a7...@news.free.fr, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: Python has no pretention at elegance.

Re: Python dynamic attribute creation

2010-06-28 Thread Stephen Hansen
On 6/28/10 8:27 AM, Aahz wrote: In article4c285e7c$0$17371$426a7...@news.free.fr, Bruno Desthuilliersbruno.42.desthuilli...@websiteburo.invalid wrote: Aahz a écrit : In article4c2747c1$0$4545$426a7...@news.free.fr, Bruno Desthuilliersbdesth.quelquech...@free.quelquepart.fr wrote: Python

Re: optparse TypeError

2010-06-28 Thread Michele Simionato
On Jun 28, 3:30 pm, dirknbr dirk...@gmail.com wrote: I get an int object is not callable TypeError when I execute this. But I don't understand why.     parser = optparse.OptionParser(usage: %lines [options] arg1)     parser.add_option(-l, --lines, dest=lines,                      

Python 2.6.x version module compatibility

2010-06-28 Thread Ratufa
Suppose I have a webapp running in a virtualenv (--no-site-packages) cloned off a Python 2.6.2 install, running under mod_wsgi. The virtual environment has various modules installed in it, some perhaps using C extensions. Question: If the Python installation gets upgraded to 2.6.5 (or 2.6.7

Re: Python as a scripting language. Alternative to bash script?

2010-06-28 Thread Dave Pawson
Thanks for the replies (and Benjamin). Not met with the subprocess idea. On 28 June 2010 16:29, D'Arcy J.M. Cain da...@druid.net wrote: Main queries are: Ease of calling out to bash to use something like imageMagick or Java? You don't need to call bash to call an external program.  Check out

More MySQL Stuff

2010-06-28 Thread Victor Subervi
Hi; So I'm launching into a major rewrite of my shopping cart because I've finally woken up to the challenge of injection attacks. One of my major problems is that many column names are determined when the shopping cart is built. For example, how many photos are to be uploaded is determined that

Re: Python 2.6.x version module compatibility

2010-06-28 Thread Stephen Hansen
On 6/28/10 9:06 AM, Ratufa wrote: Suppose I have a webapp running in a virtualenv (--no-site-packages) cloned off a Python 2.6.2 install, running under mod_wsgi. The virtual environment has various modules installed in it, some perhaps using C extensions. Question: If the Python

Re: I strongly dislike Python 3

2010-06-28 Thread Thomas Jollans
On 06/28/2010 04:36 PM, Stephen Hansen wrote: On 6/28/10 2:20 AM, Thomas Jollans wrote: On 06/28/2010 03:21 AM, Stephen Hansen wrote: On 6/27/10 6:11 PM, geremy condra wrote: On Sun, Jun 27, 2010 at 8:50 PM, Grant Edwardsinva...@invalid.invalid wrote: If you install a real shell on

Re: Python as a scripting language. Alternative to bash script?

2010-06-28 Thread Thomas Jollans
On 06/28/2010 06:08 PM, Dave Pawson wrote: Thanks for the replies (and Benjamin). Not met with the subprocess idea. On 28 June 2010 16:29, D'Arcy J.M. Cain da...@druid.net wrote: Main queries are: Ease of calling out to bash to use something like imageMagick or Java? You don't need to

Re: More MySQL Stuff

2010-06-28 Thread Stephen Hansen
On 6/28/10 9:10 AM, Victor Subervi wrote: Hi; So I'm launching into a major rewrite of my shopping cart because I've finally woken up to the challenge of injection attacks. One of my major problems is that many column names are determined when the shopping cart is built. For example, how many

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician ?Tom ?Sullivan 911 TESTIMONIAL Video

2010-06-28 Thread Juha Nieminen
In comp.lang.c++ small Pox smallpox...@gmail.com wrote: Academia and Scientific and Arts community is the BIGGEST RECIPIENT of Federal Grants from TAX PAYER MONEY What's so hard to understand in take your religion elsewhere, we don't want it here? Go away. --

Re: I strongly dislike Python 3

2010-06-28 Thread Stephen Hansen
On 6/28/10 9:23 AM, Thomas Jollans wrote: Installing Linux is still a LOT easier than installing a working MSYS since you get proper package management with proper dependency resolution, while with MSYS, you end up downloading dozens of different inter-dependent GNU packages one-by-one until

Re: More MySQL Stuff

2010-06-28 Thread Victor Subervi
On Mon, Jun 28, 2010 at 12:11 PM, Stephen Hansen me+list/pyt...@ixokai.iowrote: On 6/28/10 9:10 AM, Victor Subervi wrote: Hi; So I'm launching into a major rewrite of my shopping cart because I've finally woken up to the challenge of injection attacks. One of my major problems is that many

N00b question: matching stuff with variables.

2010-06-28 Thread Ken D'Ambrosio
Hi, all. I've got a file which, in turn, contains a couple thousand filenames. I'm writing a web front-end, and I want to return all the filenames that match a user-input value. In Perl, this would be something like, if (/$value/){print $_ matches\n;} But trying to put a variable into regex

Re: Python as a scripting language. Alternative to bash script?

2010-06-28 Thread Michael Torrie
On 06/28/2010 05:48 AM, Dave Pawson wrote: Main queries are: Ease of calling out to bash to use something like imageMagick or Java? Ease of grabbing return parameters? E.g. convert can return both height and width of an image. Can this be returned to the Python program? Can Python access the

PDF Generation With Reportlab

2010-06-28 Thread Albert Leibbrandt
Hi All I am hoping there is someone out there that knows reportlab quite well. I posted this on the reportlab mailing list but there is not much activity on that list I am currently generating a pdf report using reportlab 2.3 and python 2.5.4. The report has a table that spans multiple

Re: N00b question: matching stuff with variables.

2010-06-28 Thread Thomas Jollans
On 06/28/2010 07:29 PM, Ken D'Ambrosio wrote: Hi, all. I've got a file which, in turn, contains a couple thousand filenames. I'm writing a web front-end, and I want to return all the filenames that match a user-input value. In Perl, this would be something like, if (/$value/){print $_

Re: N00b question: matching stuff with variables.

2010-06-28 Thread Stephen Hansen
On 6/28/10 10:29 AM, Ken D'Ambrosio wrote: Hi, all. I've got a file which, in turn, contains a couple thousand filenames. I'm writing a web front-end, and I want to return all the filenames that match a user-input value. In Perl, this would be something like, if (/$value/){print $_

Re: N00b question: matching stuff with variables.

2010-06-28 Thread Rami Chowdhury
On Monday 28 June 2010 10:29:35 Ken D'Ambrosio wrote: Hi, all. I've got a file which, in turn, contains a couple thousand filenames. I'm writing a web front-end, and I want to return all the filenames that match a user-input value. In Perl, this would be something like, if

Re: Python as a scripting language. Alternative to bash script?

2010-06-28 Thread John Nagle
On 6/28/2010 7:58 AM, Benjamin Kaplan wrote: How does a program return anything other than an exit code? Ah, yes, the second biggest design mistake in UNIX. Programs have argv and argc, plus environment variables, going in. So, going in, there are essentially subroutine parameters. But

Re: Why Python3

2010-06-28 Thread OKB (not okblacke)
Steven D'Aprano wrote: None of PyPy, Unladen Swallow or IronPython are dependencies for Python 3.x to be ready for prime time. Neither is C module support. I think this is being overoptimistic. For me, ready for prime time means I can rely on being able to find a way to do what I

Re: Python as a scripting language. Alternative to bash script?

2010-06-28 Thread Dave Pawson
On 28 June 2010 18:39, Michael Torrie torr...@gmail.com wrote: On 06/28/2010 05:48 AM, Dave Pawson wrote: Main queries are: Ease of calling out to bash to use something like imageMagick or Java? Ease of grabbing return parameters? E.g. convert can return both height and width of an image. Can

Re: dynamically modify help text

2010-06-28 Thread Brian Blais
On Jun 27, 2010, at 22:37 , Red Forks wrote: Read you doc file and set the __doc__ attr of the object you want to change. On Monday, June 28, 2010, Brian Blais bbl...@bryant.edu wrote: I know that the help text for an object will give a description of every method based on the doc string.

Re: dynamically modify help text

2010-06-28 Thread Chris Rebert
On Mon, Jun 28, 2010 at 11:13 AM, Brian Blais bbl...@bryant.edu wrote: On Jun 27, 2010, at 22:37 , Red Forks wrote: Read you doc file and set the __doc__ attr of the object you want to change. On Monday, June 28, 2010, Brian Blais bbl...@bryant.edu wrote: I know that the help text for an

Re: Python as a scripting language. Alternative to bash script?

2010-06-28 Thread Michael Torrie
On 06/28/2010 12:05 PM, Dave Pawson wrote: On 28 June 2010 18:39, Michael Torrie torr...@gmail.com wrote: Sure. I've created a module called runcmd that does 90% of what I want (easy access to stdout, stderr, error code). I've attached it to this e-mail. Feel free to use it; this post

Re: Python as a scripting language. Alternative to bash script?

2010-06-28 Thread Paul Rubin
John Nagle na...@animats.com writes: Programs have argv and argc, plus environment variables, going in. So, going in, there are essentially subroutine parameters. But all that comes back is an exit code. They should have had something similar coming back, with arguments to exit() returning

Re: More MySQL Stuff

2010-06-28 Thread Emile van Sebille
On 6/28/2010 9:10 AM Victor Subervi said... Any other suggestions? http://www.databaseanswers.org/tutorial4_db_schema/index.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamically modify help text

2010-06-28 Thread Benjamin Kaplan
On Mon, Jun 28, 2010 at 11:25 AM, Chris Rebert c...@rebertia.com wrote: On Mon, Jun 28, 2010 at 11:13 AM, Brian Blais bbl...@bryant.edu wrote: On Jun 27, 2010, at 22:37 , Red Forks wrote: Read you doc file and set the __doc__ attr of the object you want to change. On Monday, June 28, 2010,

Re: Why Python3

2010-06-28 Thread rantingrick
On Jun 28, 12:58 pm, OKB (not okblacke) brennospamb...@nobrenspambarn.net wrote: Steven D'Aprano wrote: None of PyPy, Unladen Swallow or IronPython are dependencies for Python 3.x to be ready for prime time. Neither is C module support.         I think this is being overoptimistic.  For

Re: Python dynamic attribute creation

2010-06-28 Thread Alexander Kapps
Bruno Desthuilliers wrote: Alexander Kapps a écrit : (snip) While I personally don't agree with this proposal (but I understand why some people might want it), I can see a reason. When disallowing direct attribute creation, those typos that seem to catch newcommers won't happen anymore. What

Re: Python dynamic attribute creation

2010-06-28 Thread Alexander Kapps
Alexander Kapps wrote: Bruno Desthuilliers wrote: Alexander Kapps a écrit : (snip) While I personally don't agree with this proposal (but I understand why some people might want it), I can see a reason. When disallowing direct attribute creation, those typos that seem to catch newcommers

Re: Python dynamic attribute creation

2010-06-28 Thread Stephen Hansen
On 6/28/10 12:09 PM, Alexander Kapps wrote: This seems to work quite well: class TypoProtection(object): def __init__(self): self.foo = 42 self.bar = 24 def _setattr(self, name, value): if name in self.__dict__: self.__dict__[name] = value else: raise AttributeError, %s has no '%s' attribute \

Re: Python dynamic attribute creation

2010-06-28 Thread Michael Torrie
On 06/25/2010 09:39 PM, WANG Cong wrote: Thanks, I have to admit that I know nothing about Smalltalk. If you know nothing about Smalltalk then you really aren't in a position to talk about what is and is not OOP. Smalltalk is one of the original OOP languages and purists define OOP as the model

C++/Python function call

2010-06-28 Thread Zohair M. Abu Shaban
Hello every one: I have this python function defined as: def set_time_at_next_pps(self, *args, **kwargs): set_time_at_next_pps(self, usrp2::time_spec_t time_spec) - bool it was generated to do the same function as the c++: set_time_at_next_pps(usrp2::time_spec_t(0, 0)) I am new

Re: Python dynamic attribute creation

2010-06-28 Thread Michael Torrie
On 06/27/2010 11:58 PM, Stephen Hansen wrote: To say you can't really know much about OOP without knowing much about Smalltalk seems basically, well, wrong. True. But you can't really criticize a language's implementation of OOP without a good understanding of the pure OO language. For

Re: refactoring a group of import statements

2010-06-28 Thread rantingrick
On Jun 27, 10:20 pm, GrayShark howe.ste...@gmail.com wrote: Question: If you can't answer the question, why are you talking? Q: If you can't take advice without complaining, then why are you asking? I'm American Indian. That's what I was taught. We don't talk that much. But you get an answer

Re: optparse TypeError

2010-06-28 Thread Ben Finney
Michele Simionato michele.simion...@gmail.com writes: optparse is so old-fashioned. Use plac! The OP should be made aware that: * plac is a third-party library with (TTBOMK) no prospect of inclusion in the standard library * optparse is in the standard library and has been for many versions

Re: C++/Python function call

2010-06-28 Thread Rami Chowdhury
On Monday 28 June 2010 12:46:13 Zohair M. Abu Shaban wrote: Hello every one: I have this python function defined as: def set_time_at_next_pps(self, *args, **kwargs): set_time_at_next_pps(self, usrp2::time_spec_t time_spec) - bool it was generated to do the same function as

  1   2   3   >