Re: Return value of an assignment statement?

2008-02-24 Thread Marc 'BlackJack' Rintsch
On Sat, 23 Feb 2008 22:44:30 +, Tim Roberts wrote: > Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > >>On Fri, 22 Feb 2008 11:00:17 -0800, Aahz wrote: >> >>> It's just too convenient to be able to write >>> >>> L += ['foo'] >>> >>> without rebinding L. >> >>But ``+=`` does rebind. >

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Steven D'Aprano
On Sat, 23 Feb 2008 19:45:45 -0800, Jeff Schwab wrote: > Paul Rubin wrote: >> Jeff Schwab <[EMAIL PROTECTED]> writes: >>> One great thing about C is that >>> a programmer can realistically hope to know the entire language >>> definition; maybe Guido would like the same to be true of Python. >> >>

Re: Official IRC channel for Python?

2008-02-24 Thread Torsten Bronger
Hallöchen! Steve Holden writes: > js wrote: > >> Really? maybe I'm been blocked from it... thanks. > > Currently 479 users. I'd be nice if we could achieve some sort of network effect in [EMAIL PROTECTED] I don't want to start a Jabber v. IRC debate here; I simply prefer it and maybe others do

simpleparse - what is wrong with my grammar?

2008-02-24 Thread Laszlo Nagy
The program below gives me "segmentation fault (core dumped)". Environment: Linux gandalf-desktop 2.6.20-16-generic #2 SMP Tue Feb 12 05:41:34 UTC 2008 i686 GNU/Linux Python 2.5.1 What is wrong with my grammar? Can it be an internal error in simpleparse? Thanks, Laszlo from simplepa

Re: Tkinter: Missing the last piece of the puzzle

2008-02-24 Thread MartinRinehart
Simon Forman wrote: > yes! check out http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/464635 > > HTH, > ~Simon Thanks, Simon. Looks like that will do it. Actually, it looks like that will overdo it. I'll be setting File/Save to enabled after every keystroke. Ideally, I'd like to set my s

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Arnaud Delobelle
On Feb 24, 8:08 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 23 Feb 2008 19:45:45 -0800, Jeff Schwab wrote: > The second link is just bizarre. It claims that Python "does not have > nested, block variable scopes like I am accustomed to in nearly every > other programm

Re: looking for open source simulink clone in python

2008-02-24 Thread Stef Mientki
[EMAIL PROTECTED] wrote: > Does anyone know of something like this? I've searched to no avail. > GNUradio companion is promising but tied to gnuradio. > not exactly, this is what I've found until now * Orange * Elefant

Re: PHP Developer highly interested in Python (web development) with some open questions...

2008-02-24 Thread MartinRinehart
re encryption I ran a small software company in the '80s. We did the unthinkable: shipped our software with a money-back guarantee. Anyone could buy the software, copy it and then request a full refund. Return rate: 0.5%. Of the returns we guessed that about half of them were for perfectly legit

Re: n00b with urllib2: How to make it handle cookie automatically?

2008-02-24 Thread est
On Feb 23, 5:57 am, 7stud <[EMAIL PROTECTED]> wrote: > On Feb 21, 11:50 pm, est <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > I need urllib2 do perform series of HTTP requests with cookie from > > PREVIOUS request(like our browsers usually do ). > > Cookies from a previous request made in the curr

iter(lambda:f.read(8192),'')

2008-02-24 Thread gert
what is the difference between iter(lambda:f.read(8192), ') and iter(f.read(8192),'') ? -- http://mail.python.org/mailman/listinfo/python-list

Ruby with Netbeans question!

2008-02-24 Thread Steve
Hi all Hope I`m ok posting a Netbeans query here?. I`m trying to learn Ruby using the Netbeans IDE. It seems a pretty slick application but I`m wondering if its possible to run a prog without creating a `new project` each time?. I just want to be able to type in a few lines of code and run it but i

Re: advanced usage of python threads

2008-02-24 Thread hyperboreean
Chris, I have already made my choice, I am asking just for a little help with some documentation. I know about twisted.enterprise.adbapi, but the company is working with sqlalchemy at the time. So please, I know you have good intentions but you're kind of not helping me :) Well, probably instead

Re: Ruby with Netbeans question!

2008-02-24 Thread Quentin Gallet-Gilles
Hi Steve, Considering this is a Python list, I doubt you'll get much help for something related to Netbeans and Ruby. You're better off asking questions on the proper list : http://www.netbeans.org/community/lists/ Quentin On Sun, Feb 24, 2008 at 12:26 PM, Steve <[EMAIL PROTECTED]> wrote: > Hi

Re: Ruby with Netbeans question!

2008-02-24 Thread Steve
On Feb 24, 11:26 am, Steve <[EMAIL PROTECTED]> wrote: > Hi all > Hope I`m ok posting a Netbeans query here?. I`m trying to learn Ruby > using the Netbeans IDE. It seems a pretty slick application but I`m > wondering if its possible to run a prog without creating a `new > project` each time?. I just

Re: n00b with urllib2: How to make it handle cookie automatically?

2008-02-24 Thread est
On Feb 23, 2:42 am, Rob Wolfe <[EMAIL PROTECTED]> wrote: > est <[EMAIL PROTECTED]> writes: > > Hi all, > > > I need urllib2 do perform series of HTTP requests with cookie from > > PREVIOUS request(like our browsers usually do ). Many people suggest I > > use some library(e.g. pycURL) instead but I

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Matthew Woodcraft
Jeff Schwab <[EMAIL PROTECTED]> wrote: > Matthew Woodcraft wrote: >> I see. Then, unless you don't care about data loss passing silently, >> this 'most traditional' way to open a file is unsuitable for files >> opened for writing. > No, why would you think so? If you want something special to ha

Re: iter(lambda:f.read(8192),'')

2008-02-24 Thread Dustan
On Feb 24, 5:11 am, gert <[EMAIL PROTECTED]> wrote: > what is the difference between iter(lambda:f.read(8192), ') and > iter(f.read(8192),'') ? One does not work, and one is syntactically incorrect: >>> iter(f.read(8192),'') Traceback (most recent call last): File "", line 1, in iter(f.re

Re: graphing/plotting with python and interface builder

2008-02-24 Thread Diez B. Roggisch
Jacob Davis schrieb: > I found SM2DGraphView, but I guess that I am too much of a newbie with > interface builder and pyobjc to figure out how to get SM2DGraphView to > work. Are there any good tutorials (or better yet, examples) of how to > get SM2DGraphView to work? > > I don't know pyobjc w

Re: PHP Developer highly interested in Python (web development) with some open questions...

2008-02-24 Thread Christian Heimes
Tamer Higazi wrote: > - What is the Zope Applikation Server? Is it also a Webserver like the > Apache or Tomcat Webserver? Zope is much more than a webserver. It's a web application server including a fast object database (ACID, support clustering and MVCC), a powerful plugin architecture, builtin

Pydev/Eclipse: How to add filters for the navigator ?

2008-02-24 Thread Nebur
Running the latest version of pydev (1.3.13). I failed to figure out how to add a filter that excludes stuff like *.pyc from the file navigator. The "Filters..." dialogue allows to "Select All" and "Deselect All", but from an empty list :-( What's the trick ? Thanks ... -- http://mail.python.org/m

Re: ILeo (IPython-Leo bridge); a marriage made in heaven?

2008-02-24 Thread shakeeb . alireza
> Are you part of Leo? This smells like a marketing scheme to me. Actually this is an example of a beautiful collaboration between Edward (the progenitor of leo) and Ville (the ipython side). Fantastic and elegant stuff, which you have to try to appreciate. AK -- http://mail.python.org/mailman

Re: PHP Developer highly interested in Python (web development) with some open questions...

2008-02-24 Thread Tamer Higazi
Am Sonntag, den 24.02.2008, 13:44 +0100 schrieb Christian Heimes: > > Plone and Archetypes (based on Zope) have a tool named ArchGenXML. It > takes UML XMI files and generates content types, workflows and products > for the Plone CMS. I don't want workflows, I want the classes and methods genera

Re: advanced usage of python threads

2008-02-24 Thread Steve Holden
hyperboreean wrote: > Chris, I have already made my choice, I am asking just for a little help > with some documentation. > I know about twisted.enterprise.adbapi, but the company is working with > sqlalchemy at the time. > So please, I know you have good intentions but you're kind of not > help

Re: Official IRC channel for Python?

2008-02-24 Thread Steve Holden
Torsten Bronger wrote: > Hallöchen! > > Steve Holden writes: > >> js wrote: >> >>> Really? maybe I'm been blocked from it... thanks. >> Currently 479 users. > > I'd be nice if we could achieve some sort of network effect in > [EMAIL PROTECTED] I don't want to start a Jabber v. IRC > debate her

Re: iter(lambda:f.read(8192),'')

2008-02-24 Thread gert
aha ok got it :) -- http://mail.python.org/mailman/listinfo/python-list

To PEAK or not to PEAK

2008-02-24 Thread Tzury Bar Yochay
I am about to start a large-scale enterprise project next month (I insist on using Python instead Java and .NET and I am sure `they` will thank me eventually). I was wondering around making my components-and-libraries-shopping- list and came across PEAK. My paranoia is that PEAK would make me writ

[ANN] Shed Skin (restricted) Python-to-C++ compiler 0.0.27

2008-02-24 Thread Mark Dufour
Hi all, I have just released Shed Skin 0.0.27. Thanks in large part to the GHOP students, this new release comes with some interesting new goodies: - support for 're', via libpcre (perl-compatible-regular-expressions) - support for 'time' (except for time.strptime under Windows) - basic support f

Re: [ANN] Shed Skin (restricted) Python-to-C++ compiler 0.0.27

2008-02-24 Thread Mark Dufour
Of course I forgot to add the URL: http://shedskin.googlecode.com Mark Dufour. -- "One of my most productive days was throwing away 1000 lines of code" - Ken Thompson -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP Developer highly interested in Python (web development) with some open questions...

2008-02-24 Thread Paul Boddie
On 24 Feb, 14:33, Tamer Higazi <[EMAIL PROTECTED]> wrote: > > Not true! you can disassemble the app and then have fun reading, not > that easy. I simply want that nobody reads the "sourcecode" or better > said the content of the python files I would have generated. Some quick answers: http://wiki

Re: mapping problem

2008-02-24 Thread Mr Shore
yes you guessed perfectly I'm not a native English speaker sorry for my poor english.. On Feb 16, 6:35 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 16 Feb 2008 01:35:32 -0800,MrShorewrote: > > I've now crawled the meta infor,but with multi name all means the same > >

Re: Seeing "locals()" from imported function

2008-02-24 Thread Luis M. González
This is one of these times when I feel so dumb and ashamed that I wished I never dared to ask... Well, that did the trick. Thanks! luis On Feb 24, 3:41 am, 7stud <[EMAIL PROTECTED]> wrote: > Yes, define your functions so that they get all the input they need > from the arguments that are passed i

Re: mapping problem

2008-02-24 Thread Mr Shore
On Feb 16, 6:35 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 16 Feb 2008 01:35:32 -0800,MrShorewrote: > > I've now crawled the meta infor,but with multi name all means the same > > thing, > > such as MS,microsoft,microsoft corporation all means the same thing, how > >

_struct in Python 2.5.2

2008-02-24 Thread Olaf Schwarz
Hi, I am trying to run this application http://svn.navi.cx/misc/trunk/python/bemused/ on uNSLUng Linux 6.10 using the optware python packages. As I obtained segmentation faults using Python 2.4, I have upgraded to 2.5.2. Now the execution terminates a lot earlier with this error message: File

Re: asynchronous alarm

2008-02-24 Thread Alan Isaac
Paul Rubin wrote: > a = Event() > Thread(target=f, args=(a,)).start() > raw_input('hit return when done: ') > a.set() Simple and elegant. Thank you. Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Seeing "locals()" from imported function

2008-02-24 Thread Steve Holden
Luis M. González wrote: > This is one of these times when I feel so dumb and ashamed that I > wished I never dared to ask... > Well, that did the trick. Thanks! > > luis > > On Feb 24, 3:41 am, 7stud <[EMAIL PROTECTED]> wrote: >> Yes, define your functions so that they get all the input they need

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Lou Pecora
Just some anecdotal confirmation: In article <[EMAIL PROTECTED]>, "Ryan Ginstrom" <[EMAIL PROTECTED]> wrote: > I personally used C++ for about 90% of my code for 10 years. During that > time, I was chugging the C++ Kool-Aid so hard I almost peed myself. I still > think that C++ is a beautiful la

Re: some questions about ejabberd,spark and psi

2008-02-24 Thread Mr Shore
the url missed http://allforces.com/2005/05/06/ichat-to-msn-through-jabber/ On 2月25日, 上午12时01分, Mr Shore <[EMAIL PROTECTED]> wrote: > hi,every buddy > I've now installed a jabber server,right it's ejabberd mentioned above > and 2 jabber client,right again it's spark and psi > and I can connect to j

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, Nicola Musatti <[EMAIL PROTECTED]> wrote: > On Feb 22, 12:07 pm, Paul Rubin wrote: > > Nicola Musatti <[EMAIL PROTECTED]> writes: > > > In C++ memory is just another resource which you can handle just like > > > any other one, possibly u

Re: simpleparse - what is wrong with my grammar?

2008-02-24 Thread Gary Herron
Laszlo Nagy wrote: > The program below gives me "segmentation fault (core dumped)". > > Environment: >Linux gandalf-desktop 2.6.20-16-generic #2 SMP Tue Feb 12 05:41:34 > UTC 2008 i686 GNU/Linux >Python 2.5.1 > > What is wrong with my grammar? Can it be an internal error in simpleparse? >

some questions about ejabberd,spark and psi

2008-02-24 Thread Mr Shore
hi,every buddy I've now installed a jabber server,right it's ejabberd mentioned above and 2 jabber client,right again it's spark and psi and I can connect to jabber server by spark but failed by psi,saying 'certificate failed the authenticity test;Reason:certificate is self signed' and i follow thi

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Jeff Schwab
Matthew Woodcraft wrote: > Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Matthew Woodcraft wrote: >>> I see. Then, unless you don't care about data loss passing silently, >>> this 'most traditional' way to open a file is unsuitable for files >>> opened for writing. > >> No, why would you think so? I

Developing Techniques (and naming conventions)

2008-02-24 Thread Adekoba
I have some questions... Say we have a package "food" food/ __init__.py ham.py cheese.py Is it possible to have a file named "food.py" in the package and have non-referential imports work? i.e., for ham.py to have a line "import food.food". From my experience, python will not wo

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-24 Thread Lie
On Feb 24, 11:23 am, zaley <[EMAIL PROTECTED]> wrote: > On Feb 24, 6:48 am, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > > > > > Lie wrote: > > > On Feb 23, 4:02 pm, zaley <[EMAIL PROTECTED]> wrote: > > >> On Feb 22, 11:06 pm, "Jesper" wrote: > > > >>> Give PyScripter fromhttp://www.mmm-experts.com/

Re: How about adding rational fraction to Python?

2008-02-24 Thread Steve Holden
Lie wrote: > On Feb 18, 1:25 pm, Carl Banks <[EMAIL PROTECTED]> wrote: >> On Feb 17, 1:45 pm, Lie <[EMAIL PROTECTED]> wrote: >> Any iteration with repeated divisions and additions can thus run the denominators up. This sort of calculation is pretty common (examples: compound interes

Re: How about adding rational fraction to Python?

2008-02-24 Thread Lie
On Feb 18, 1:25 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Feb 17, 1:45 pm, Lie <[EMAIL PROTECTED]> wrote: > > > > Any iteration with repeated divisions and additions can thus run the > > > denominators up.  This sort of calculation is pretty common (examples: > > > compound interest, numerical

Re: How about adding rational fraction to Python?

2008-02-24 Thread Lie
On Feb 25, 12:46 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Lie wrote: > > On Feb 18, 1:25 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > >> On Feb 17, 1:45 pm, Lie <[EMAIL PROTECTED]> wrote: > > Any iteration with repeated divisions and additions can thus run the > denominators up.  This

Re: Developing Techniques (and naming conventions)

2008-02-24 Thread Christian Heimes
Adekoba wrote: > food.py > food/ > __init__.py > ham.py > cheese.py > > where food.py is a script that uses the package food. Is it possible > for this to work in any way? Every time I try to run food.py, python > tries to import everything from the script instead of from the > p

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mark Dickinson
On Feb 24, 1:09 pm, Lie <[EMAIL PROTECTED]> wrote: > And this limit is much lower than n!. I think it's sum(primes(n)), but > I've got no proof for this one yet. It's the least common multiple of the integers 1 through n, or equivalently the product over all primes p <= n of the highest power of p

most loved template engine on python is?

2008-02-24 Thread Tamer Higazi
Hi people! After deciding choosing python as my future killer application language for writing web applications, I need from you guys still some support, if you apologize. Question: Which is the most loved template engine for python? I see, that I can do more aspect oriented programming with pyt

Re: Python for web...

2008-02-24 Thread Tamer Higazi
http://www.djangobook.com/ if you love to read that book online. Otherwise, if you don't have DSL, just mirror the site for offline usage with "wget" Tamer [EMAIL PROTECTED] wrote: > Hi everyone, > > I have to develop a web based enterprise application for my final year > project. Since i am in

Re: How about adding rational fraction to Python?

2008-02-24 Thread Lie
On Feb 25, 1:21 am, Mark Dickinson <[EMAIL PROTECTED]> wrote: > On Feb 24, 1:09 pm, Lie <[EMAIL PROTECTED]> wrote: > > > And this limit is much lower than n!. I think it's sum(primes(n)), but > > I've got no proof for this one yet. > > It's the least common multiple of the integers 1 through n, or

Re: simpleparse - what is wrong with my grammar?

2008-02-24 Thread Mike C. Fletcher
Laszlo Nagy wrote: > The program below gives me "segmentation fault (core dumped)". > > Environment: >Linux gandalf-desktop 2.6.20-16-generic #2 SMP Tue Feb 12 05:41:34 > UTC 2008 i686 GNU/Linux >Python 2.5.1 > > What is wrong with my grammar? Can it be an internal error in simpleparse? >

Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-24 Thread Daniel Fetchinson
> I'm pleased to announce the release of Phatch which is a > powerful batch processor and renamer. Phatch exposes a big part of the > Python Imaging Library through an user friendly GUI. (It is using > python-pyexiv2 to offer more extensive EXIF and IPTC support.) Phatch > is not targeted at manipu

Re: Developing Techniques (and naming conventions)

2008-02-24 Thread Adekoba
On Feb 24, 1:06 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > Adekoba wrote: > > food.py > > food/ > > __init__.py > > ham.py > > cheese.py > > > where food.py is a script that uses the package food. Is it possible > > for this to work in any way? Every time I try to run food.

Re: _struct in Python 2.5.2

2008-02-24 Thread Martin v. Löwis
> I found out that there has been a file named _struct.so in 2.5.1 but > it has disappeared in 2.5.2. With no package available for downgrading > to 2.5.1 and no idea how to resolve this I am stuck at this point. > > Any help appreciated. Where did you get your copy of Python 2.5.2 from, and how

Re: most loved template engine on python is?

2008-02-24 Thread Daniel Fetchinson
> After deciding choosing python as my future killer application language > for writing web applications, I need from you guys still some support, > if you apologize. > > Question: > Which is the most loved template engine for python? AFAIK, there is no single blessed template system. If you're up

Re: most loved template engine on python is?

2008-02-24 Thread Tim Chase
> AFAIK, there is no single blessed template system. If you're up to web > development then your choice of framework will limit the choices for > template engines. For example if you choose Django I guess you'll have > to stick with its built-in template system (I might be wrong on this) Django's

urllib slow on Leopard

2008-02-24 Thread mark
I've recently switched from Ubuntu to OS X Leopard. I have some python scripts which download info from the web. The scripts were working fine before on Ubuntu, but urllib seems to work really slowly on Leopard. I tried an example from the docs: >>> import urllib2 >>> f = urllib2.urlopen('htt

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Larry Bugbee
On Feb 21, 10:22 am, Nicola Musatti <[EMAIL PROTECTED]> wrote: > On Feb 21, 6:31 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > > > > The main reason why C++ has declined in usage is because almost > > everything of practical value is optional. No, disagree. > The main reason why C++ has declined i

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Jeff Schwab
Larry Bugbee wrote: > And the migration to Python is due in large part because of an > additional factor of 3-4x in personal productivity (over Java). > Improvements in runtime performance wouldn't hurt, but for many > applications that's not an issue. (If optional data typing were You mean stat

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mensanator
On Feb 24, 1:09�pm, Lie <[EMAIL PROTECTED]> wrote: > On Feb 25, 1:21 am, Mark Dickinson <[EMAIL PROTECTED]> wrote: > > > On Feb 24, 1:09 pm, Lie <[EMAIL PROTECTED]> wrote: > > > > And this limit is much lower than n!. I think it's sum(primes(n)), but > > > I've got no proof for this one yet. > > >

Re: Developing Techniques (and naming conventions)

2008-02-24 Thread Jeroen Ruigrok van der Werven
-On [20080224 20:01], Adekoba ([EMAIL PROTECTED]) wrote: >I don't think moving food.py's code to __init__.py would work out to >well, because then how would I run the script? import food Which in turn has something like this in food/__init__.py: from food.cheese import gou

Re: most loved template engine on python is?

2008-02-24 Thread [EMAIL PROTECTED]
On 24 fév, 20:01, Tamer Higazi <[EMAIL PROTECTED]> wrote: > Hi people! (snip) > Question: > Which is the most loved template engine for python? > I don't have a single cue on this, but the one that most impresses me so far is Mako. -- http://mail.python.org/mailman/listinfo/python-list

Re: Developing Techniques (and naming conventions)

2008-02-24 Thread Adekoba
On Feb 24, 3:21 pm, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED] nomine.org> wrote: > -On [20080224 20:01], Adekoba ([EMAIL PROTECTED]) wrote: > > >I don't think moving food.py's code to __init__.py would work out to > >well, because then how would I run the

Re: To PEAK or not to PEAK

2008-02-24 Thread [EMAIL PROTECTED]
On 24 fév, 15:37, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > I am about to start a large-scale enterprise project next month (I > insist on using Python instead Java and .NET and I am sure `they` will > thank me eventually). > > I was wondering around making my components-and-libraries-shopping-

Re: PHP Developer highly interested in Python (web development) with some open questions...

2008-02-24 Thread [EMAIL PROTECTED]
On 24 fév, 13:44, Christian Heimes <[EMAIL PROTECTED]> wrote: > Tamer Higazi wrote: > > - What is the Zope Applikation Server? Is it also a Webserver like the > > Apache or Tomcat Webserver? > > Zope is much more than a webserver. It's a web application server > including a fast object database (AC

Re: urllib slow on Leopard

2008-02-24 Thread James Matthews
Try running the script when python is running as root. I has issues like this also! On Sun, Feb 24, 2008 at 8:57 PM, mark <[EMAIL PROTECTED]> wrote: > I've recently switched from Ubuntu to OS X Leopard. I have some python > scripts which download info from the web. The scripts were working fine >

Re: urllib slow on Leopard

2008-02-24 Thread André
On Feb 24, 3:57 pm, mark <[EMAIL PROTECTED]> wrote: > I've recently switched from Ubuntu to OS X Leopard. I have some python > scripts which download info from the web. The scripts were working fine > before on Ubuntu, but urllib seems to work really slowly on Leopard. > > I tried an example from t

Re: urllib slow on Leopard

2008-02-24 Thread Stefan Behnel
mark wrote: > I've recently switched from Ubuntu to OS X Leopard. I have some python > scripts which download info from the web. The scripts were working fine > before on Ubuntu, but urllib seems to work really slowly on Leopard. > > I tried an example from the docs: > import urllib2 f

Re: How about adding rational fraction to Python?

2008-02-24 Thread casevh
> > Out of curiosity, of what use is denominator limits? > > The problems where I've had to use rationals have > never afforded me such luxury, so I don't see what > your point is In Donald Knuth's The Art of Computer Programming, he described floating slash arithmetic where the total number of bi

Re: Python for web...

2008-02-24 Thread Ivan Van Laningham
Hi All-- Django is slick. I just yesterday picked up the book and started poking away. Downloaded, Installed and running in about ten minutes (I have several servers I can play with). Today I have several working pages. Use mod_python if you can. -ly y'rs, Ivan On Sun, Feb 24, 2008 at 12:03 P

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-24 Thread Ricardo Aráoz
zaley wrote: > On Feb 24, 6:48 am, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: >> Lie wrote: >>> On Feb 23, 4:02 pm, zaley <[EMAIL PROTECTED]> wrote: On Feb 22, 11:06 pm, "Jesper" wrote: > Give PyScripter fromhttp://www.mmm-experts.com/atry > It is for Windows, though it is written in De

Re: Developing Techniques (and naming conventions)

2008-02-24 Thread Steve Holden
Adekoba wrote: > On Feb 24, 1:06 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: >> Adekoba wrote: >>> food.py >>> food/ >>> __init__.py >>> ham.py >>> cheese.py >>> where food.py is a script that uses the package food. Is it possible >>> for this to work in any way? Every time I

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Larry Bugbee
PS: And tools like ShedSkin and Pyrex benefit. -- http://mail.python.org/mailman/listinfo/python-list

Re: How about adding rational fraction to Python?

2008-02-24 Thread Steven D'Aprano
On Sun, 24 Feb 2008 10:09:37 -0800, Lie wrote: > On Feb 25, 12:46 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> Lie wrote: >> > On Feb 18, 1:25 pm, Carl Banks <[EMAIL PROTECTED]> wrote: >> >> On Feb 17, 1:45 pm, Lie <[EMAIL PROTECTED]> wrote: >> >> Any iteration with repeated divisions and a

Re: How about adding rational fraction to Python?

2008-02-24 Thread Steven D'Aprano
On Sun, 24 Feb 2008 12:19:53 -0800, Mensanator wrote: > Out of curiosity, of what use is denominator limits? > > The problems where I've had to use rationals have never afforded me such > luxury, so I don't see what your point is. It ensures that your fraction's denominator doesn't grow indefini

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Larry Bugbee
> You mean static data typing, right? Are there any known holes in the > dynamic type system that still need to be plugged? (I haven't heard of > any.) My apologies. You are right, I meant optional, static typing. Thanks for the catch Jeff. Python's dynamic typing is just fine. But if I know

Re: How about adding rational fraction to Python?

2008-02-24 Thread Steven D'Aprano
On Sun, 24 Feb 2008 11:09:32 -0800, Lie wrote: > I decided to keep the num/den limit low (10) because higher values might > obscure the fact that it do have limits. You do realise that by putting limits on the denominator, you guarantee that the sum of the fractions also has a limit on the denom

Re: PHP Developer highly interested in Python (web development) with some open questions...

2008-02-24 Thread Diez B. Roggisch
> > It's also some kind of a Rube Goldberg thingie... > http://en.wikipedia.org/wiki/Rube_Goldberg_machine > > If you're into web applications, better to have a look at Pylons or > Django IMHO. You are entitled to your opinion, but calling Zope a Rube-Goldberg-machine is strong. To put it mildl

Re: n00b with urllib2: How to make it handle cookie automatically?

2008-02-24 Thread 7stud
On Feb 24, 4:41 am, est <[EMAIL PROTECTED]> wrote: > On Feb 23, 2:42 am, Rob Wolfe <[EMAIL PROTECTED]> wrote: > > > > > est <[EMAIL PROTECTED]> writes: > > > Hi all, > > > > I need urllib2 do perform series of HTTP requests with cookie from > > > PREVIOUS request(like our browsers usually do ). Man

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mensanator
On Feb 24, 4:50�pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 24 Feb 2008 11:09:32 -0800, Lie wrote: > > I decided to keep the num/den limit low (10) because higher values might > > obscure the fact that it do have limits. > > You do realise that by putting limits on t

Re: packing things back to regular expression

2008-02-24 Thread Amit Gupta
> "CL(?P[a-z]+)XY(?:AB)[aeiou]+(?PCD(?P..)\?EF)" > > Good luck. > > -- > Steven This is what I did in the end (in principle). Thanks. A -- http://mail.python.org/mailman/listinfo/python-list

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Aahz
In article <[EMAIL PROTECTED]>, Jeff Schwab <[EMAIL PROTECTED]> wrote: > >What I would like is not so much a new Python implementation, as a >vehicle to help demonstrate a few things to other Python users. >Recently, I've had a few replies in tones that imply I'm on the brink of >entering sever

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mensanator
On Feb 24, 4:42�pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 24 Feb 2008 12:19:53 -0800, Mensanator wrote: > > Out of curiosity, of what use is denominator limits? > > > The problems where I've had to use rationals have never afforded me such > > luxury, so I don't se

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-24 Thread zaley
On 2月25日, 上午6时34分, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > zaley wrote: > > On Feb 24, 6:48 am, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > >> Lie wrote: > >>> On Feb 23, 4:02 pm, zaley <[EMAIL PROTECTED]> wrote: > On Feb 22, 11:06 pm, "Jesper" wrote: > > Give PyScripter fromhttp://www.

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mel
Mensanator wrote: > On Feb 24, 1:09�pm, Lie <[EMAIL PROTECTED]> wrote: >> I decided to keep the num/den limit low (10) because higher values >> might obscure the fact that it do have limits. [ ... ] > > Out of curiosity, of what use is denominator limits? > > The problems where I've had to use ra

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-24 Thread zaley
On 2月25日, 上午6时34分, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > zaley wrote: > > On Feb 24, 6:48 am, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > >> Lie wrote: > >>> On Feb 23, 4:02 pm, zaley <[EMAIL PROTECTED]> wrote: > On Feb 22, 11:06 pm, "Jesper" wrote: > > Give PyScripter fromhttp://www.

Re: most loved template engine on python is?

2008-02-24 Thread subeen
On Feb 25, 1:01 am, Tamer Higazi <[EMAIL PROTECTED]> wrote: > > Question: > Which is the most loved template engine for python? > I am learning MAKO and I think it's good. But can't tell that it's the best as I didn't try others. :) regards, Subeen. http://love-python.blogspot.com/ -- http://ma

How to make "rainbow" RGB values?

2008-02-24 Thread Simon Forman
Hey all, I want to map an int to a color on a rainbow spectrum, i.e. for an int n in the range 0..N, low values (near 0) should map to the red end, and high values (near N) to the blue/violet end. The return values should be R, G, B tuples (well, "#xx" color codes, but that's not the hard part

Re: How to make "rainbow" RGB values?

2008-02-24 Thread Andrew McNamara
>I want to map an int to a color on a rainbow spectrum, i.e. for an int >n in the range 0..N, low values (near 0) should map to the red end, >and high values (near N) to the blue/violet end. [...] >I've tried a simple scheme of overlapping sines, but this resulted in >too much red and blue, and no

Create multiple directories

2008-02-24 Thread Paul Lemelle
I am somewhat new to Python and I am trying to create a program that automatically creates directories from a range of numbers. I researched the os.mkdir & os.makedirs methods, but they do not seem to (I don't know) how to include an argumnet to step through my list. I woudl like to do the follwo

Re: Create multiple directories

2008-02-24 Thread Jeff Schwab
Paul Lemelle wrote: > I am somewhat new to Python and I am trying to create a program that > automatically creates directories from a range of numbers. I > researched the os.mkdir & os.makedirs methods, but they do not seem to > (I don't know) how to include an argumnet to step through my list. >

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-24 Thread Ricardo Aráoz
zaley wrote: >>> So I hope I can find something helpful in open source IDE for python. >> Exactly so. PyScripter does it easy, besides you can have in different >> tabs all the modules of your application. You just hit the run button >> and your program runs, you hit the debug button and you start

object identity and hashing

2008-02-24 Thread castironpi
Can someone explain this? >>> a= {} >>> a[(3,)]= 0 >>> (3,) in a True >>> (3,) is (3,) False -- http://mail.python.org/mailman/listinfo/python-list

Re: object identity and hashing

2008-02-24 Thread Jeff Schwab
[EMAIL PROTECTED] wrote: > Can someone explain this? > a= {} Create an empty dict and bind it to the name a. a[(3,)]= 0 Set the key/value pair (3,):0 to the dict. (3,) in a Is (3,) one of the keys in the dict? > True Yes, it is. (3,) is (3,) Create two separate tuples

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-24 Thread zaley
On 2月25日, 上午10时35分, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > zaley wrote: > >>> So I hope I can find something helpful in open source IDE for python. > >> Exactly so. PyScripter does it easy, besides you can have in different > >> tabs all the modules of your application. You just hit the run but

Re: Create multiple directories

2008-02-24 Thread 7stud
On Feb 24, 6:27 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Paul Lemelle wrote: > > I am somewhat new to Python and I am trying to create a program that > > automatically creates directories from a range of numbers. I > > researched the os.mkdir & os.makedirs methods, but they do not seem to > > (

Re: Using lambda [was Re: Article of interest: Python pros/cons for theenterprise]

2008-02-24 Thread Terry Reedy
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On Sat, 23 Feb 2008 19:35:30 -0800, Jeff Schwab wrote: | | > Every time somebody uses | > lambda here, they seem to get a bunch "why are you using lambda?" | > responses. I think you are overgeneralizing ;-) I use 'e

Re: object identity and hashing

2008-02-24 Thread castironpi
On Feb 24, 7:58 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Can someone explain this? > > a= {} > > Create an empty dict and bind it to the name a. > > a[(3,)]= 0 > > Set the key/value pair (3,):0 to the dict. > > (3,) in a > > Is (3,) one of the keys in

Re: How to make "rainbow" RGB values?

2008-02-24 Thread Simon Forman
On Feb 24, 5:09 pm, Andrew McNamara <[EMAIL PROTECTED]> wrote: > >I want to map an int to a color on a rainbow spectrum, i.e. for an int > >n in the range 0..N, low values (near 0) should map to the red end, > >and high values (near N) to the blue/violet end. > [...] > >I've tried a simple scheme o

  1   2   >