Re: Function Overloading and Python

2008-02-24 Thread Paul Rudin
Allen Peloquin <[EMAIL PROTECTED]> writes: > I have a personal project that has an elegant solution that requires > both true multiple inheritance of classes (which pretty much limits my > language choices to C++ and Python) and type-based function > overloading. > Common Lisp :/ -- http://mail

Re: Function Overloading and Python

2008-02-24 Thread Allen Peloquin
On Feb 24, 11:44 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Allen Peloquin wrote: > > class B > > { > > fun(A x, A y, A z)... > > fun(A1 x, A y, A z)... > > } > > > class B1 > > { > > fun(A1 x, A y, A z)... > > } > > > Such that any previous behavior is inherited, but behaves > > po

Re: Function Overloading and Python

2008-02-24 Thread Stefan Behnel
Stefan Behnel wrote: > Allen Peloquin wrote: >> class B >> { >> fun(A x, A y, A z)... >> fun(A1 x, A y, A z)... >> } >> >> class B1 >> { >> fun(A1 x, A y, A z)... >> } >> >> Such that any previous behavior is inherited, but behaves >> polymorphically because of the single function name.

Re: Function Overloading and Python

2008-02-24 Thread Stefan Behnel
Allen Peloquin wrote: > class B > { > fun(A x, A y, A z)... > fun(A1 x, A y, A z)... > } > > class B1 > { > fun(A1 x, A y, A z)... > } > > Such that any previous behavior is inherited, but behaves > polymorphically because of the single function name. Try something like this: class

Re: Is crawling the stack "bad"? Why?

2008-02-24 Thread Paul Rubin
Russell Warren <[EMAIL PROTECTED]> writes: > That is exactly where I started (creating my own request handler, > snagging the IP address and stashing it), but I couldn't come up with > a stash location that would work for a threaded server. How about a dictionary indexed by by the thread name. It

Weird cgi error

2008-02-24 Thread Jesse Aldridge
I uploaded the following script, called "test.py", to my webhost. It works find except when I input the string "python ". Note that's the word "python" followed by a space. If I submit that I get a 403 error. It seems to work fine with any other string. What's going on here? Here's the script i

Function Overloading and Python

2008-02-24 Thread Allen Peloquin
I have a personal project that has an elegant solution that requires both true multiple inheritance of classes (which pretty much limits my language choices to C++ and Python) and type-based function overloading. Now, while this makes it sound like I have to resign myself to C++, which I am not a

Re: Is crawling the stack "bad"? Why?

2008-02-24 Thread Russell Warren
> That is just madness. What specifically makes it madness? Is it because sys._frame is "for internal and specialized purposes only"? :) > The incoming ip address is available to the request handler, see the > SocketServer docs I know... that is exactly where I get the address, just in a mad wa

Re: How about adding rational fraction to Python?

2008-02-24 Thread Carl Banks
On Feb 25, 2:04 am, Paul Rubin wrote: > Carl Banks <[EMAIL PROTECTED]> writes: > > Try doing numerical integration sometime with rationals, and tell me > > how that works out. Try calculating compound interest and storing > > results for 1000 customers every month, and c

Re: How about adding rational fraction to Python?

2008-02-24 Thread Paul Rubin
Carl Banks <[EMAIL PROTECTED]> writes: > Try doing numerical integration sometime with rationals, and tell me > how that works out. Try calculating compound interest and storing > results for 1000 customers every month, and compare the size of your > database before and after. Usually you would r

Re: How about adding rational fraction to Python?

2008-02-24 Thread Carl Banks
On Feb 24, 10:56 pm, Mensanator <[EMAIL PROTECTED]> wrote: > But that doesn't mean they become less manageable than > other unlimited precision usages. Did you see my example > of the polynomial finder using Newton's Forward Differences > Method? The denominator's certainly don't settle out, neithe

Re: How about adding rational fraction to Python?

2008-02-24 Thread Carl Banks
On Feb 24, 12:32 pm, Lie <[EMAIL PROTECTED]> 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

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mensanator
On Feb 24, 10:34�pm, casevh <[EMAIL PROTECTED]> wrote: > On Feb 24, 7:56 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > But that doesn't mean they become less manageable than > > other unlimited precision usages. Did you see my example > > of the polynomial finder using Newton's Forward Difference

Re: Is crawling the stack "bad"? Why?

2008-02-24 Thread Paul Rubin
That is just madness. The incoming ip address is available to the request handler, see the SocketServer docs. Write a request handler that stashes that info somewhere that rpc responders can access it in a sane way. -- http://mail.python.org/mailman/listinfo/python-list

Re: most loved template engine on python is?

2008-02-24 Thread Bernard
I've been using Cheetah Template for a year now and loved every bit of it. There's plenty of well written documentation[1] files as well so that you may learn it quick. [1]: http://www.cheetahtemplate.org/learn.html On 24 fév, 14:01, Tamer Higazi <[EMAIL PROTECTED]> wrote: > Hi people! > After de

Re: How about adding rational fraction to Python?

2008-02-24 Thread casevh
On Feb 24, 7:56 pm, Mensanator <[EMAIL PROTECTED]> wrote: > But that doesn't mean they become less manageable than > other unlimited precision usages. Did you see my example > of the polynomial finder using Newton's Forward Differences > Method? The denominator's certainly don't settle out, neithe

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

2008-02-24 Thread est
On Feb 25, 5:46 am, 7stud <[EMAIL PROTECTED]> wrote: > 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 c

Re: Is crawling the stack "bad"? Why?

2008-02-24 Thread Russell Warren
Argh... the code wrapped... I thought I made it narrow enough. Here is the same code (sorry), but now actually pasteable. --- import SimpleXMLRPCServer, xmlrpclib, threading, sys def GetCallerNameAndArgs(StackDepth = 1): """This function returns a tuple (a,b) where: a = The name of the ca

Is crawling the stack "bad"? Why?

2008-02-24 Thread Russell Warren
I've got a case where I would like to know exactly what IP address a client made an RPC request from. This info needs to be known inside the RPC function. I also want to make sure that the IP address obtained is definitely the correct one for the client being served by the immediate function call

Re: object identity and hashing

2008-02-24 Thread castironpi
On Feb 24, 9:28 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Feb 24, 9:11 pm, [EMAIL PROTECTED] wrote: > > > > > > > On Feb 24, 7:58 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > > > > [EMAIL PROTECTED] wrote: > > > > Can someone explain this? > > > > a= {} > > > > Create an empty dict and

Re: How about adding rational fraction to Python?

2008-02-24 Thread Mensanator
On Feb 24, 6:09 pm, Mel <[EMAIL PROTECTED]> wrote: > 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 de

Re: most loved template engine on python is?

2008-02-24 Thread makoto kuwata
On 2008-02-25 Tamer Higazi <[EMAIL PROTECTED]> wrote: > Question: > Which is the most loved template engine for python? > I recommend pyTenjin template engine. http://www.kuwata-lab.com/tenjin/ pyTenjin is not famous nor popular, but it is very fast, full- featured, and very easy-to-use. The abov

Question about PyPI and 'easy_install'

2008-02-24 Thread makoto kuwata
Hi, I have a trouble around PyPI and easy_install. I have developed OSS (Tenjin) and registered it to PyPI. http://pypi.python.org/pypi/Tenjin/0.6.1 But I can't install it by 'easy_install' command. $ easy_install Tenjin Searching for Tenjin Reading http://pypi.python.org/simple/Ten

Re: object identity and hashing

2008-02-24 Thread George Sakkis
On Feb 24, 9:11 pm, [EMAIL PROTECTED] wrote: > 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,)

Re: Create multiple directories

2008-02-24 Thread Paul Lemelle
7stud & Jeff, Thanks for yoru input - there's still a few things for me to learn. :) Paul On Sun, 24 Feb 2008 18:07:15 -0800 (PST), 7stud <[EMAIL PROTECTED]> wrote: >On Feb 24, 6:27 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Paul Lemelle wrote: >> > I am somewhat new to Python and I am tryi

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 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 ... .. >> >> >From then on you are on your own. >> >> H

Re: Hyphenation module PyHyphen-0.3 released

2008-02-24 Thread Ivan Illarionov
> I don't know if I'm just doing it wrong, or if I can't use extensions > compiled with mingw32 with the standard distribution Python > executable? I was able to install on Windows XP with mingw: setup.py build -c mingw32 setup.py install --skip-build It works fine with English dictionary, but h

Re: Create multiple directories

2008-02-24 Thread Paul Rubin
Paul Rubin writes: > fmt = "new_dir%0%d" % len(str(num)) Typo, that was supposed to say "new_dir%%0%d" ... -- http://mail.python.org/mailman/listinfo/python-list

Re: Create multiple directories

2008-02-24 Thread Paul Rubin
7stud <[EMAIL PROTECTED]> writes: > for i in range(num): > dir_name = "new_dir%s" % i #same result as "new_dir" + str(i) > os.mkdir(dir_name) #creates dirs in current directory I find it's useful to keep all the filenames the same length and put leading zeros in the directory numbers, so

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >