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

2010-06-28 Thread Chris Rebert
> -- 原始邮件 -- > 发件人: "Chris Rebert"; > 发送时间: 2010年6月28日(星期一) 中午1:09 > 收件人: "Roger"; > 主题: 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 wrote: > > As I plan to study JSP, I find it extremly compl

Re: Python dynamic attribute creation

2010-06-28 Thread Aahz
In article <4c2747c1$0$4545$426a7...@news.free.fr>, Bruno Desthuilliers 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 think that Python is extremely e

Re: Python dynamic attribute creation

2010-06-28 Thread Aahz
In article , Neil Hodgson 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 Smalltalk >have allowed adding attributes (addInstVarName) to class

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 mi

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 message, 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 reason, to keep the spammers away. I'm assuming this was 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 Rebert"; 发送时间: 2010年6月28日(星期一) 中午1:09 收件人: "Roger"; 主题: Re: I wander

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

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 -- http://mail.python.org/mailman/listinfo/pyt

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 > wrote: >> On Sun, 2010-06-27, Lawrence D'Oliveiro wrote: >>> In message , Roy Smith wrote: >>> I recently fixed a bug in some production code.  The programmer was careful to use snprintf() to avo

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 versions

Re: I strongly dislike Python 3

2010-06-28 Thread John Bokma
geremy condra writes: > On Sun, Jun 27, 2010 at 10:35 PM, John Bokma 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 think it is. While it's true tha

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

Re: I strongly dislike Python 3

2010-06-28 Thread John Bokma
Stephen Hansen 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 in the >> aformen

Re: I strongly dislike Python 3

2010-06-28 Thread John Bokma
Tim Golden 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 >> settle it th

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 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; Python Zen, #9 (o

Re: I strongly dislike Python 3

2010-06-28 Thread Tim Golden
On 28/06/2010 09:29, John Bokma wrote: Tim Golden 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

Re: I strongly dislike Python 3

2010-06-28 Thread geremy condra
On Mon, Jun 28, 2010 at 4:23 AM, John Bokma wrote: > geremy condra writes: > >> On Sun, Jun 27, 2010 at 10:35 PM, John Bokma 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 >>> f

Re: I strongly dislike Python 3

2010-06-28 Thread John Bokma
geremy condra 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 in Mexico - http

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 >> Edwards wrote: >>> If you install a real shell on Windows, then the hash-bang line works >>> fine. :) >> >> Might as well spare yourself the trouble and install lin

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 > > http://openidenabled.com/

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 things

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 b

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 wrote: WANG Cong a écrit : On 06/26/10 00:11, Neil Hodgson 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 la

Re: Why Is Escaping Data Considered So Magical?

2010-06-28 Thread Paul Rubin
Gregory Ewing 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 think so. Traditional C st

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 doe

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

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 pr

Re: compile as exe with arguments

2010-06-28 Thread dirknbr
On Jun 28, 11:26 am, "Martin P. Hellwig" 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 understand your ques

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 celebr

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 t

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 http://danweinreb.org/blog/rebuttal-to-stallmans-story-about-

Re: compile as exe with arguments

2010-06-28 Thread dirknbr
On Jun 28, 11:40 am, dirknbr wrote: > On Jun 28, 11:26 am, "Martin P. Hellwig" > 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 h

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 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 I like JSP's --

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 wrote: >> It sounds to me, since your script is acting on an event, that it >> would benefit from using something like inotify, or whatever your >> system equiv

Is safe to use the shelve module with eventlet?

2010-06-28 Thread Alex
Hi all. I'm using eventlet 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 do

Re: I strongly dislike Python 3

2010-06-28 Thread Aaron Watters
On Jun 26, 9:06 pm, Steven D'Aprano 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 additions to > Python than anything 3.

Re: I strongly dislike Python 3

2010-06-28 Thread Grant Edwards
On 2010-06-28, 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 >>> Edwards wrote: If you install a real shell on Windows, then the hash-bang line works fine. :) >>> >>> Might as

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

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 d

Re: optparse TypeError

2010-06-28 Thread Simon Brunning
On 28 June 2010 14:30, dirknbr 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 are attemptin

Re: I strongly dislike Python 3

2010-06-28 Thread Edward A. Falk
In article , 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? -- -Ed Falk, f...@despams.r.us.com http://thespamdiaries.blogspot.com/ -- http://

Re: I strongly dislike Python 3

2010-06-28 Thread Stefan Behnel
Edward A. Falk, 28.06.2010 16:15: In article, 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 file.write() or log.info() and friends. Since you can't r

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 Edwards wrote: If you install a real shell on Windows, then the hash-bang line works fine. :) Might as well spare yourself

Re: I strongly dislike Python 3

2010-06-28 Thread Grant Edwards
On 2010-06-28, Stefan Behnel wrote: > Edward A. Falk, 28.06.2010 16:15: >> In article, >> 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

Re: I strongly dislike Python 3

2010-06-28 Thread Stephen Hansen
On 6/28/10 7:15 AM, Edward A. Falk wrote: In article, 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? It depends on what my purpose is. If its debugging outp

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 " for in " syntax is actu

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 Behnel wrote: Edward A. Falk, 28.06.2010 16:15: In article, 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

Re: GDAL-1.7.1 : vcvarsall.bat missing

2010-06-28 Thread kBob
On Jun 25, 9:51 am, Max Erickson wrote: > kBob wrote: > > On Jun 25, 1:26 am, Mark Lawrence > > 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 with Python 2.6 and GDAL. During > >> >>

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 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 way is subprocess

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 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 you have a complicate

Re: Python dynamic attribute creation

2010-06-28 Thread Aahz
In article <4c285e7c$0$17371$426a7...@news.free.fr>, Bruno Desthuilliers wrote: >Aahz a écrit : >> In article <4c2747c1$0$4545$426a7...@news.free.fr>, >> Bruno Desthuilliers wrote: >>> >>> Python has no pretention at "elegance". >> >> That's not true at all. More precisely, I would agree wit

Re: Python dynamic attribute creation

2010-06-28 Thread Stephen Hansen
On 6/28/10 8:27 AM, Aahz wrote: In article<4c285e7c$0$17371$426a7...@news.free.fr>, Bruno Desthuilliers wrote: Aahz a écrit : In article<4c2747c1$0$4545$426a7...@news.free.fr>, Bruno Desthuilliers wrote: Python has no pretention at "elegance". That's not true at all. More precisely, I wo

Re: optparse TypeError

2010-06-28 Thread Michele Simionato
On Jun 28, 3:30 pm, dirknbr 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", >                       default=10, ty

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 at

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

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 wa

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 installation

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 Edwards wrote: > If you install a real shell on Windows, the

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 wrote: > >>> Main queries are: >>> Ease of calling out to bash to use something like imageMagick or Java? >> >> You don't need to ca

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 pho

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 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. -- http://mail.python.org/mailman/listinfo/pyth

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 anyt

Re: More MySQL Stuff

2010-06-28 Thread Victor Subervi
On Mon, Jun 28, 2010 at 12:11 PM, Stephen Hansen wrote: > 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 ar

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 th

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 pages

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 "$_ matches\n

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 (/$value/

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.

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 w

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

2010-06-28 Thread Dave Pawson
On 28 June 2010 18:39, Michael Torrie 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 this be ret

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 wrote: I know that the help text for an object will give a description of every method based on the doc string. Is there a way t

Re: dynamically modify help text

2010-06-28 Thread Chris Rebert
On Mon, Jun 28, 2010 at 11:13 AM, Brian Blais 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 wrote: >>> I know that the help text for an object will give a descrip

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 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 puts my code

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

2010-06-28 Thread Paul Rubin
John Nagle 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 > the r

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 wrote: > On Mon, Jun 28, 2010 at 11:13 AM, Brian Blais 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 wrote: >

Re: Why Python3

2010-06-28 Thread rantingrick
On Jun 28, 12:58 pm, "OKB (not okblacke)" 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 me, "ready for prime >

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 won

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

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

Re: refactoring a group of import statements

2010-06-28 Thread rantingrick
On Jun 27, 10:20 pm, GrayShark 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 when we do talk. Ma

Re: optparse TypeError

2010-06-28 Thread Ben Finney
Michele Simionato 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 * argparse is a third-par

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 t

Re: I strongly dislike Python 3

2010-06-28 Thread Edward A. Falk
In article , Grant Edwards wrote: > >Maybe it's just me, but I find both debugging and small scripts to be >very useful. Ditto. I've also written a number of large scripts, and I *always* use print in them. -- -Ed Falk, f...@despams.r.us.com http://thespamdiaries.blogspot.com/

Re: refactoring a group of import statements

2010-06-28 Thread Stephen Hansen
On 6/28/10 12:54 PM, rantingrick wrote: On Jun 27, 10:20 pm, GrayShark 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. Bu

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

2010-06-28 Thread Mithrandir
Paul Rubin wrote in news:7xpqzbj8st@ruckus.brouhaha.com: > Re: Python as a scripting language. Alternative to bash script? > That's interesting but I'm having a hard time seeing how it would work. > I think environment variables didn't exist in early versions of Unix, > and argc/argv were p

Re: I strongly dislike Python 3

2010-06-28 Thread Edward A. Falk
In article , Stephen Hansen wrote: > >No one said otherwise, or that print was useless and never used in such >contexts. I was responding to the question "Also, do you use print *that* much? Really?" The implication being that in the majority of useful python programs, you don't really need to

Re: I strongly dislike Python 3

2010-06-28 Thread Edward A. Falk
In article , Stephen Hansen wrote: > >Any other use, I basically operate on a file object. I use file objects all the time. I use print with them. -- -Ed Falk, f...@despams.r.us.com http://thespamdiaries.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >