Re: How to determine that if a folder is empty?

2005-08-07 Thread could ildg
Thank you . so you mean that this is not platform-independent? On 8/8/05, Neil Hodgson <[EMAIL PROTECTED]> wrote: > could ildg: > > > I want to check if a folder named "foldername" is empty. > > I use os.listdir(foldername)==[] to do this, > > but it will be very slow if the folder has a lot of s

Re: Oreilly CodeZoo

2005-08-07 Thread richard
gene tani wrote: > http://radar.oreilly.com/archives/2005/08/codezoo_program_1.html > > http://python.codezoo.com/ > > Nice to see that python is in-demand, but what is the rationale for > another ASPN cookbook/Parnassus / pypackage / dmoz type repository? We (PyPI / Cheese Shop developers) are

Re: PEP: Specialization Syntax

2005-08-07 Thread Kay Schluehr
Nicolas Fleury wrote: > It is necessary to maintain a > dictionary of types (to avoid redundacy) and simple things like: > > def makeType(someArgument): > class MyObject: > someArgument = someArgument > return MyObject > > are not allowed. def makeClass(cls_name, **kw): ret

Re: How to determine that if a folder is empty?

2005-08-07 Thread Neil Hodgson
could ildg: > I want to check if a folder named "foldername" is empty. > I use os.listdir(foldername)==[] to do this, > but it will be very slow if the folder has a lot of sub-files. > Is there any efficient ways to do this? The first thing to do is measure the performance of this operation

Re: Metaclasses and new-style classes

2005-08-07 Thread Robert Kern
Jan-Ole Esleben wrote: > Hi! > > I've just posted a question about metaclasses in ZOPE on the ZOPE > list, and one of the replies said that metaclasses (at least > "painless" metaclasses) cannot be used without new-style classes (or > rather, that they don't work where you cannot explicitly use ne

re:Python HTTP digest authentication woes...

2005-08-07 Thread ravelox
I hacked this a little bit and it seems to do the trick. import urllib2 theurl = "192.168.0.25/TiVoConnect?Container=%2FNowPlaying&Command=QueryContainer&Recurse=Yes" print theurl protocol = 'https://' username = 'tivo' password = '11' authhandler = urllib2.HTTPDigestAuthHandler() auth

Re: Decline and fall of scripting languages ?

2005-08-07 Thread Paul Rubin
"Donn Cave" <[EMAIL PROTECTED]> writes: > My vote would be Haskell first, then other functional languages. > Learning FP with Objective CAML is like learning to swim in a > wading pool -- you won't drown, but there's a good chance you > won't really learn to swim either. Has an interesting, very >

How to change pymssql timeout value?

2005-08-07 Thread saqib
I have a query that is running on a mssql DB that takes about 15 minutes when run "directly"; IE: thru MS SQL Query Analyzer. I know, it sucks. I'm trying to fix it. But in the meantime, I have a python process which connects to the DB using pymssql. This process runs the aformentioned query...

error with examples (UDP broadcast)

2005-08-07 Thread Damir Hakimov
Hi All! I'm writing a small programm which must send and service UDP broadcast packets. As start of it I looked at /usr/share/doc/python2.4/Examples/Demo/sockets/broadcast.py [EMAIL PROTECTED]:/usr/share/doc/python2.4/examples/Demo/sockets$ python2.4 broadcast.py Traceback (most recent call las

Re: Decline and fall of scripting languages ?

2005-08-07 Thread gene tani
(throw Martin Fowler and Paul Graham into google blender) http://www.billkatz.com/node/42 http://osteele.com/archives/2005/03/ruby-and-laszlo -- http://mail.python.org/mailman/listinfo/python-list

How to determine that if a folder is empty?

2005-08-07 Thread could ildg
I want to check if a folder named "foldername" is empty. I use os.listdir(foldername)==[] to do this, but it will be very slow if the folder has a lot of sub-files. Is there any efficient ways to do this? Thanks~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Decline and fall of scripting languages ?

2005-08-07 Thread Donn Cave
Quoth "Kay Schluehr" <[EMAIL PROTECTED]>: | Paul Rubin wrote: [ ... re where to go from Python ] |> Lately I'm interested in OCAML as a possible step up from Python. It |> has bogosity of its own (much of it syntactic) but it has static |> typing and a serious compiler, from what I understand. I

Embedding a runtime graph in Qt3 designer generated UI

2005-08-07 Thread Madhusudan Singh
Hi Two questions : 1. Is it possible to use an import command in a qt3 designer code ? (I know that it is possible to write python inside the braces -- but is it possible to use an import command for some rather large libraries I wrote that I need to access ?). 2. In the same vein, how does one

OT: World's largest Python caught!:)

2005-08-07 Thread Ashok Rajasingh
Hi   Can I please get some information on this python?  I saw a brief news clip last year & am very keen to know more.   Thanks Ashok Rajasingh 21 Cumberland street New Plymouth New Zealand +646 7575698 (home)   7599592 (work)   Attention:The information contai

zipped socket

2005-08-07 Thread John
Is there anyway open a socket so that every send/listen/recv goes thru a zipping/unzipping process automatically? Thanks, --j -- http://mail.python.org/mailman/listinfo/python-list

Re: socket + file i/o question

2005-08-07 Thread John
I found the problem. There was a recv that was not from an open socket... Sorry abt the trouble, --j -- http://mail.python.org/mailman/listinfo/python-list

Re: Splitting a string into groups of three characters

2005-08-07 Thread John Machin
gene tani wrote: > Um, you shd 1st search cookbook, or Vaults Parnassu, dmoz python > section, pypackage: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/347689 which includes e.g. def each_slice_lol(listin,n): """non-overlapp'g slices, return (list of lists) """ len_listin=le

Re: Splitting a string into groups of three characters

2005-08-07 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there a function that split a string into groups, containing an "x" > amount of characters? There have been previous threads giving various solutions (which generally are not specific to strings). You might find some some by sear

Re: IronPython 0.9 Released

2005-08-07 Thread Al Christians
EP wrote: > > yes, my apologies to all things Iron and or Python. > > "language" and "version" can be confusing if one stays up late without > coffee, or perhaps if one has not been debugging their English code properly. > Still, it's a bit of a PITB to me that it says XP and not Win2000. Al

Re: Splitting a string into groups of three characters

2005-08-07 Thread [EMAIL PROTECTED]
Thank You, For your help, I guess I will just make a couple of these functions and find out which one is that fastest. -- http://mail.python.org/mailman/listinfo/python-list

Re: Fat and happy Pythonistas (was Re: Replacement forkeyword'global' good idea? ...)

2005-08-07 Thread Terry Reedy
"Bengt Richter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I think the relationship of abstract entities and their concrete > representations > is very interesting. ditto > BTW, maybe this is a place to mention the concept of an AST decorator, > that works like > a function

Re: Splitting a string into groups of three characters

2005-08-07 Thread gene tani
Um, you shd 1st search cookbook, or Vaults Parnassu, dmoz python section, pypackage: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/347689 http://www.codezoo.com/ http://www.vex.net/parnassus/ http://www.pypackage.org/packages -- http://mail.python.org/mailman/listinfo/python-list

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Terry Reedy
"Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] (Björn Lindström) writes: >Actually that proliferation is one of the culprits in Python being a >pain to deal with. I'm personally not a GUI fetishist and Tkinter has >been good enough for the

Re: Python's CSV reader

2005-08-07 Thread Stephan
Andrew McLean wrote: > You are welcome. One point. I think there have been at least two > different interpretations of precisely what you task is. > > I had assumed that all the different "header" lines contained data for > the same fields in the same order, and similarly that all the "detail" > l

Re: Splitting a string into groups of three characters

2005-08-07 Thread John Machin
[EMAIL PROTECTED] wrote: > Hi, > > Is there a function that split a string into groups, containing an "x" > amount of characters? > > Ex. > TheFunction("Hello World",3) > > Returns: > > ['Hell','o W','orl','d'] > > > Any reply would be truly appreciated. > > Thank You, > Maybe, somewhere o

Splitting a string into groups of three characters

2005-08-07 Thread [EMAIL PROTECTED]
Hi, Is there a function that split a string into groups, containing an "x" amount of characters? Ex. TheFunction("Hello World",3) Returns: ['Hell','o W','orl','d'] Any reply would be truly appreciated. Thank You, -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP: Specialization Syntax

2005-08-07 Thread Nicolas Fleury
Bengt Richter wrote: > I don't understand why you wouldn't give the function arg a different name > in the first place instead of via a temporary intermediary binding, e.g., > > def makeType(someArgument_alias): > class MyObject: > someArgument = someArgument_alias > return

Re: PEP: Specialization Syntax

2005-08-07 Thread Nicolas Fleury
Bengt Richter wrote: >>__specialize__ Special Member Function. > > By "Member Function" do you mean anything different from "method"? No, I should have written method. C++ habit. >>The first element of this proposal is the addition of the >>__specialize__ special member function. The _

Re: Euclid's Algorithm in Python?

2005-08-07 Thread [EMAIL PROTECTED]
Erik the Red wrote: > So, I did the following: > --- > a=input("Give me an integer") > b=input("Give me another integer") > > def gcd(a,b): > > if a < b: > a, b = b, a > while b != 0: > a, b = b, a % b > return a > --- > But, in the xterm, it terminates after "Give me

Re: Fat and happy Pythonistas (was Re: Replacement for keyword'global' good idea? ...)

2005-08-07 Thread Bengt Richter
On Sun, 7 Aug 2005 18:37:42 -0400, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > >"John Roth" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> http://martinfowler.com/articles/languageWorkbench.html > >This clarified your proposal for Python considerably. So I note that now >and esp

Re: Proposed new collection methods

2005-08-07 Thread Terry Reedy
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Another thread pointed out a couple of methods that would be nice to > have on Python collections: find and inject. Since Python does not have a collections superclass, I am puzzled as to what you are really proposing.

Re: Euclid's Algorithm in Python?

2005-08-07 Thread Bengt Richter
On 7 Aug 2005 17:31:02 -0700, "Jordan Rastrick" <[EMAIL PROTECTED]> wrote: >Good point. I suppose I'd only ever seen it implemented with the if >test, but you're right, the plain while loop should work fine. Silly >me. > >def gcd(a,b): > while b != 0: > a, b = b, a%b >return a >

Re: gettext again

2005-08-07 Thread cantabile
stasz a écrit : > On Sun, 07 Aug 2005 21:33:21 +0200, cantabile wrote: > > >>stasz a écrit : >> >>>On Sun, 07 Aug 2005 11:09:14 +0200, cantabile wrote: >>> >>> >>> Hi, I'm failing to make it work but can't find out what's wrong. Here's what I do : >>> >>>[] >>> >>> How come ?

Re: PEP: Specialization Syntax

2005-08-07 Thread Bengt Richter
On Sun, 07 Aug 2005 17:20:25 -0400, Nicolas Fleury <[EMAIL PROTECTED]> wrote: >Martin v. Löwis wrote: >> -1. I don't see the point of this PEP. Apparently, you want to define >> parametrized types - but for what purpose? I.e. what are the specific >> use cases for the proposed syntax, and why do y

Re: PEP: Specialization Syntax

2005-08-07 Thread Bengt Richter
On Sun, 07 Aug 2005 16:22:11 -0400, Nicolas Fleury <[EMAIL PROTECTED]> wrote: >Hi everyone, I would to know what do you think of this PEP. Any comment >welcomed (even about English mistakes). > >PEP: XXX >Title: Specialization Syntax >Version: $Revision: 1.10 $ >Last-Modified:

Re: Euclid's Algorithm in Python?

2005-08-07 Thread Jordan Rastrick
Good point. I suppose I'd only ever seen it implemented with the if test, but you're right, the plain while loop should work fine. Silly me. def gcd(a,b): while b != 0: a, b = b, a%b return a Even nicer. -- http://mail.python.org/mailman/listinfo/python-list

Re: Metaclasses and new-style classes

2005-08-07 Thread Jordan Rastrick
Correct me if I'm wrong, but I think the OP was asking if metaclasses work with old-style classes, not new-style. [EMAIL PROTECTED] wrote: > This may be a limitation Zope imposes. > > I wrote this program: > #--- > class M(type):

RE: WSGI-server in the standard distro?

2005-08-07 Thread Robert Brewer
> Having a HTTP 1.0/1.1-compliant production-grade > WSGI-only server in the distro would be sweet :-) > > I might be demanding a bit much here, but still ... To "demand" it might be a bit much, but to "expect" it...? ;) I don't think anyone's going to drop what they're doing and go code such a s

Re: Some newbie cgi form questions...

2005-08-07 Thread googleboy
Robert Kern wrote: > Diez B.Roggisch wrote: > >>Traceback (most recent call last): > >> File "/var/www/users/senta/html/gobooks/cgi/form.py", line 35, in ? > >>if not form.keys()[key]: > >>TypeError: list indices must be integers > >> > >>As you can see, I am using python 2.3 (my web service

Re: Metaclasses and new-style classes

2005-08-07 Thread jepler
This may be a limitation Zope imposes. I wrote this program: #--- class M(type): def __new__(*args): print "new M", args class T(object): __metaclass__ = M #

Metaclasses and new-style classes

2005-08-07 Thread Jan-Ole Esleben
Hi! I've just posted a question about metaclasses in ZOPE on the ZOPE list, and one of the replies said that metaclasses (at least "painless" metaclasses) cannot be used without new-style classes (or rather, that they don't work where you cannot explicitly use new-style classes). I haven't so far

Re: Fat and happy Pythonistas (was Re: Replacement for keyword'global' good idea? ...)

2005-08-07 Thread Terry Reedy
"John Roth" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://martinfowler.com/articles/languageWorkbench.html This clarified your proposal for Python considerably. So I note that now and especially once the AST compiler is completed, you are quite free to start a Python AS

Re: Chopping off spaces at both ends

2005-08-07 Thread Bengt Richter
On 7 Aug 2005 10:14:33 -0700, "Kay Schluehr" <[EMAIL PROTECTED]> wrote: >Use the strip() method. > >Example: > "\t abc\n".strip() >"abc" > >Variants are lstrip() and rstrip(). > and also occasionally useful: >>> 'abc123cab'.strip('bca') '123' I.e., a strip argument as an unordered se

Re: Fat and happy Pythonistas (was Re: Replacement for keyword'global' good idea? ...)

2005-08-07 Thread Terry Reedy
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> http://martinfowler.com/articles/languageWorkbench.html > > Um - I see no mention of "AST" in that article at all. He's mostly > talking about "Language Oriented Programming" (seems to be another > term to describe DSLs)

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope'or 'module' better?)

2005-08-07 Thread Bengt Richter
On Sat, 6 Aug 2005 19:28:13 -0400, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > >"Paolino" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> [EMAIL PROTECTED] wrote: >> I don't think the global keyword is useful actually. >> What's so special in a module nemespace to be priviledged li

Re: Euclid's Algorithm in Python?

2005-08-07 Thread Reinhold Birkenfeld
Erik the Red wrote: > So, I did the following: > --- > a=input("Give me an integer") > b=input("Give me another integer") > > def gcd(a,b): > > if a < b: > a, b = b, a > while b != 0: > a, b = b, a % b > return a > --- > But, in the xterm, it terminates after "Give m

Re: Euclid's Algorithm in Python?

2005-08-07 Thread Erik the Red
So, I did the following: --- a=input("Give me an integer") b=input("Give me another integer") def gcd(a,b): if a < b: a, b = b, a while b != 0: a, b = b, a % b return a --- But, in the xterm, it terminates after "Give me another integer." Is Euclid's Algorithm suppo

Re: PEP: Specialization Syntax

2005-08-07 Thread Nicolas Fleury
Martin v. Löwis wrote: > -1. I don't see the point of this PEP. Apparently, you want to define > parametrized types - but for what purpose? I.e. what are the specific > use cases for the proposed syntax, and why do you need to change the > language to support these use cases? I very much doubt that

Re: Creating a virtual file system

2005-08-07 Thread Jeff Schwab
Atila Olah wrote: > I'm working on a project to implement a simple cross-platform file > sharing protocol (using Python) that is similar to HTTP, and I have to > write a GUI for Windows and Linux. But let's start with the harder one: > Windows. > > My question is: How do I implement a virtual part

visual studio 2005

2005-08-07 Thread wilf
Has anyone had success compiling python with this? -- http://mail.python.org/mailman/listinfo/python-list

Re: gettext again

2005-08-07 Thread stasz
On Sun, 07 Aug 2005 21:33:21 +0200, cantabile wrote: > stasz a écrit : >> On Sun, 07 Aug 2005 11:09:14 +0200, cantabile wrote: >> >> >>>Hi, >>>I'm failing to make it work but can't find out what's wrong. Here's what >>>I do : >> >> [] >> >>>How come ? What's wrong with what I am doing ? >

Re: PEP: Specialization Syntax

2005-08-07 Thread Martin v. Löwis
Nicolas Fleury wrote: > Hi everyone, I would to know what do you think of this PEP. Any comment > welcomed (even about English mistakes). -1. I don't see the point of this PEP. Apparently, you want to define parametrized types - but for what purpose? I.e. what are the specific use cases for the p

PEP: Specialization Syntax

2005-08-07 Thread Nicolas Fleury
Hi everyone, I would to know what do you think of this PEP. Any comment welcomed (even about English mistakes). PEP:XXX Title: Specialization Syntax Version:$Revision: 1.10 $ Last-Modified: $Date: 2003/09/22 04:51:49 $ Author: Nicolas Fleury Status: Draft Type: S

Firedrop2 Updated Tutorial and Podcast

2005-08-07 Thread UrsusMaximus
I have revised, updated and added to the Mini How-To for intalling and setting up Firedrop2, and I have also posted a podcast about Firedrop2, both can be found on my http://www.awaretek.com/weblog/index.html";>Blog. Firedrop2 is a client side weblog and content management tool written by Hans No

Re: Some newbie cgi form questions...

2005-08-07 Thread Robert Kern
Diez B.Roggisch wrote: >>Traceback (most recent call last): >> File "/var/www/users/senta/html/gobooks/cgi/form.py", line 35, in ? >>if not form.keys()[key]: >>TypeError: list indices must be integers >> >>As you can see, I am using python 2.3 (my web service provider is >>responsible for thi

Re: gettext again

2005-08-07 Thread cantabile
stasz a écrit : > On Sun, 07 Aug 2005 11:09:14 +0200, cantabile wrote: > > >>Hi, >>I'm failing to make it work but can't find out what's wrong. Here's what >>I do : > > [] > >>How come ? What's wrong with what I am doing ? > > Start with this little howto about gettext. > http://childspla

Re: Fat and happy Pythonistas

2005-08-07 Thread Mike Meyer
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > On Sat, 06 Aug 2005 21:37:54 -0400, Mike Meyer <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: >> "The concensus of this group" is a *long* way from "the debate has >> moved on". I agree that it's the concensus of this group - but t

Re: Wheel-reinvention with Python

2005-08-07 Thread Mike Meyer
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > On 06 Aug 2005 17:27:33 -0700, Paul Rubin > declaimed the following in comp.lang.python: > >> Mike Meyer <[EMAIL PROTECTED]> writes: >> > Is there a free language you consider successful? I can't think of any >> > that are

Re: Some newbie cgi form questions...

2005-08-07 Thread Diez B.Roggisch
> Traceback (most recent call last): > File "/var/www/users/senta/html/gobooks/cgi/form.py", line 35, in ? > if not form.keys()[key]: > TypeError: list indices must be integers > > As you can see, I am using python 2.3 (my web service provider is > responsible for this - I'd use 2.4.1 if I

Re: SWIG again

2005-08-07 Thread Robert Kern
Jerry He wrote: > > Can you tell me how to completely remove that > >>module? >> >>For cygwin, it should be in whatever corresponds to >>/usr/lib/python2.4/site-packages . >> >>-- >>Robert Kern >>[EMAIL PROTECTED] >> > > Hi, > Do you mean to say that all I have to do is delete > "example.py"

Re: Optional assignments ?

2005-08-07 Thread Madhusudan Singh
Robert Kern wrote: > Madhusudan Singh wrote: >> Hi >> >> Is it possible to have something like : >> >> a,b,c,d=fn(that returns 10 return values) ? > > a,b,c,d = fn()[:4] > Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Decline and fall of scripting languages ?

2005-08-07 Thread c d saunter
Kay Schluehr ([EMAIL PROTECTED]) wrote: : No good news for scripting-language fans: : http://www.phpmag.net/itr/news/psecom,id,23284,nodeid,113.html Just as well I ditched a scripting language for Python then... cds -- http://mail.python.org/mailman/listinfo/python-list

Re: SWIG again

2005-08-07 Thread Jerry He
> Can you tell me how to completely remove that > module? > > For cygwin, it should be in whatever corresponds to > /usr/lib/python2.4/site-packages . > > -- > Robert Kern > [EMAIL PROTECTED] > Hi, Do you mean to say that all I have to do is delete "example.py" and the "build" folder? (not

Re: gettext again

2005-08-07 Thread stasz
On Sun, 07 Aug 2005 11:09:14 +0200, cantabile wrote: > Hi, > I'm failing to make it work but can't find out what's wrong. Here's what > I do : [] > How come ? What's wrong with what I am doing ? Start with this little howto about gettext. http://childsplay.sourceforge.net/translate-howto.html

authentication project

2005-08-07 Thread jayt33
im working on a project that involves creating a back end solution to authenticate and manage user accounts for a website. im new to python and am looking for some good references that can help me with this task. the requirements for the project are as follows: A new user can register with the

Re: Optional assignments ?

2005-08-07 Thread Robert Kern
Madhusudan Singh wrote: > Hi > > Is it possible to have something like : > > a,b,c,d=fn(that returns 10 return values) ? a,b,c,d = fn()[:4] -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter --

Optional assignments ?

2005-08-07 Thread Madhusudan Singh
Hi Is it possible to have something like : a,b,c,d=fn(that returns 10 return values) ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Some newbie cgi form questions...

2005-08-07 Thread Devan L
googleboy wrote: > for key in form.keys():Yes, I know which fields are hidden because I > made them that way, but I am trying to figure out a way I can iterate > over the fields and do one thing with hidden fields (assign them to > variables that tell the form how to process) and a different th

Re: Chopping off spaces at both ends

2005-08-07 Thread Kay Schluehr
Use the strip() method. Example: >>> "\t abc\n".strip() "abc" Variants are lstrip() and rstrip(). Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Chopping off spaces at both ends

2005-08-07 Thread Madhusudan Singh
Hi I am a newbie to python and am using it to interface some of my lab equipment. How does one get rid of spaces at both ends of a string ? A little like the trim() intrinsic in fortran 95. One of my instruments is returning a string that has one or more blanks in it, a

Re: socket + file i/o question

2005-08-07 Thread John
Here is what the send and recieved number of bytes show up as: Filesize being sent = 507450 Server sending file to client... (total size sent , buffer size) ... 491520 4096 495616 4096 499712 4096 503808 3642 ./server.py: (107, 'Transport endpoint is not connected') On the client side, the bytes

WSGI-server in the standard distro?

2005-08-07 Thread Thomas W
Will there be a WSGI-server like BaseHTTPServer etc in the standard distro? I think that would increase the adoptation of the WSGI-standard. A new web-framework for python pops up every other week and more and more support WSGI. Why not focus on getting an optimized, production-grade fully document

amazon web services/api...

2005-08-07 Thread bruce
hi... has anybody ever played/successfully with the amazon- web services/api? i'm trying to figure out how i can use the browsenodeid to generate ISBN information for a book. the examples i've seen on various sites haven't been much help yet. thanks -bruce [EMAIL PROTECTED] -- http://mail.py

socket + file i/o question

2005-08-07 Thread John
I am sending a file on a tcp socket using the following code while 1: buf = os.read(fd, 4096) if not buf: break print total, len(buf) conn.send(b

Re: Some newbie cgi form questions...

2005-08-07 Thread googleboy
for key in form.keys():Yes, I know which fields are hidden because I made them that way, but I am trying to figure out a way I can iterate over the fields and do one thing with hidden fields (assign them to variables that tell the form how to process) and a different thing with non hidden fields

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Robert Kern
Paul Rubin wrote: > Robert Kern <[EMAIL PROTECTED]> writes: > >>As a maintainers of a convenient unified distro, I have to say that >>it's a losing strategy. No matter how much you include, for every >>person that tells you, "Thank you, you've made my Python experience >>better," there are three w

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Kay Schluehr
Martin P. Hellwig wrote: > Kay Schluehr wrote: > > Eric Pederson wrote: > > > >>Raise your hand if you think the best technology wins! > > > > > > Who is interested in such a matter? Is this a forum dedicated to some > > programming language or a popularity contest? > > > > If Python dies in a few

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Paul Boddie
Paul Rubin wrote: > Come on, this is silly, Java is a lot more cumbersome for doing small, > quick projects, but Python doesn't have the language discipline or the > library support to do heavyweight projects that Java can. I'm not necessarily arguing that Python goes all the way up to the upper e

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Paul Rubin
Robert Kern <[EMAIL PROTECTED]> writes: > As a maintainers of a convenient unified distro, I have to say that > it's a losing strategy. No matter how much you include, for every > person that tells you, "Thank you, you've made my Python experience > better," there are three who say, "Thanks, but co

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Brian Beck
Eric Pederson wrote: > Raise your hand if you think the best technology wins! > > > For those of you with your hands in the air, tell me: if Python is so good, > why has PHP achieved such greater adoption and mindshare? Why do web > scripters still cling to their Perl, even in corporate enviro

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Paul Rubin
"Paul Boddie" <[EMAIL PROTECTED]> writes: > > Why do web scripters still cling to their Perl, even in corporate > > environments? > > Ignorance. One could argue that Python should be promoted more, but > Perl had the "cool tool" buzz a good ten years ago. Such habits don't > fade away very quickly

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Robert Kern
Paul Rubin wrote: > [EMAIL PROTECTED] (Björn Lindström) writes: > >>>That would imply that it included the Ruby language. Nothing stops the >>>Ruby on Rails packagers from making the Ruby on Rails distro a >>>superset of the Ruby distro, after all. >> >>So you agree with me then? That _was_ exactl

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Martin P. Hellwig
Kay Schluehr wrote: > Eric Pederson wrote: > >>Raise your hand if you think the best technology wins! > > > Who is interested in such a matter? Is this a forum dedicated to some > programming language or a popularity contest? > > If Python dies in a few years / looses attention but the Python Z

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Roy Smith
"Paul Boddie" <[EMAIL PROTECTED]> wrote: > Perl had the "cool tool" buzz a good ten years ago. That's true, but I think it understates just how important a development Perl really was. Before Perl, unix scripting consisted of awk, sed, grep, tr, a random assortment of incompatible shells, and l

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Paul Rubin
[EMAIL PROTECTED] (Björn Lindström) writes: > > That would imply that it included the Ruby language. Nothing stops the > > Ruby on Rails packagers from making the Ruby on Rails distro a > > superset of the Ruby distro, after all. > > So you agree with me then? That _was_ exactly my point, after al

Grayson's Tkinter Programming

2005-08-07 Thread EuGeNe
Just noticed that it is now availabe as an ebook from Manning : http://www.manning.com/books/grayson I bought an edition on abebooks for a little fortune a few months ago ... -- http://mail.python.org/mailman/listinfo/python-list

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Björn Lindström
Paul Rubin writes: > That would imply that it included the Ruby language. Nothing stops the > Ruby on Rails packagers from making the Ruby on Rails distro a > superset of the Ruby distro, after all. So you agree with me then? That _was_ exactly my point, after all. Not

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Paul Boddie
Eric Pederson wrote: > Why do web scripters still cling to their Perl, even in corporate > environments? Ignorance. One could argue that Python should be promoted more, but Perl had the "cool tool" buzz a good ten years ago. Such habits don't fade away very quickly. > Why hasn't Python made inro

Re: seek python parser

2005-08-07 Thread Paul Boddie
I tend to use the compiler module: http://docs.python.org/lib/compiler.html With the output of the parsing functions I selectively inspect the AST nodes using the named attributes listed in the documentation: http://docs.python.org/lib/module-compiler.ast.html For cases where one just needs to

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Paul Rubin
[EMAIL PROTECTED] (Björn Lindström) writes: > > I haven't used Ruby on Rails but from the description I saw, its distro > > includes everything needed, which I assume includes Ruby itself. > > Hm... did you read my posting before you answered? That's exactly the > kind of distro I suggested that y

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Paul Rubin
Peter Decker <[EMAIL PROTECTED]> writes: > Hmmm. Plonk. -- http://mail.python.org/mailman/listinfo/python-list

Re: Making a timebomb

2005-08-07 Thread Peter Hansen
Cantankerous Old Git wrote: > Peter Hansen wrote: >> Cantankerous Old Git wrote: >>> The dirty way, which can leave corrupt half-written files and other >>> nasties, is something like sys.exit(). >> >> sys.exit() won't help you if your server is running in the main >> thread, nor if your server t

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Peter Decker
On 07 Aug 2005 02:42:43 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > [EMAIL PROTECTED] (Björn Lindström) writes: > > I don't see why the things you talk about would have to be part of the > > main Python distribution. Ruby on Rails seems to do pretty well without > > being included w

Re: Making a timebomb

2005-08-07 Thread Cantankerous Old Git
Peter Hansen wrote: > Cantankerous Old Git wrote: > >> [EMAIL PROTECTED] wrote: >> >>> I have a server that right now runs infinitely. I'd like to make it >>> die after some amount of time. >> >> >> The proper way to do it is to have the timer set a flag that the other >> threads check regular

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Kay Schluehr
Eric Pederson wrote: > Raise your hand if you think the best technology wins! Who is interested in such a matter? Is this a forum dedicated to some programming language or a popularity contest? If Python dies in a few years / looses attention but the Python Zen survives in another language I have

Re: Abstract methods in python - is this a good way ?)

2005-08-07 Thread Robert Kern
Philipp H. Mohr wrote: > Hello, > > I would like to use abstract methods in python to force some of the > classes to implement common methods. > > I found this web page and wonder if it is a good way of implementing them: > > http://www.lychnis.net/blosxom/programming/python-abstract-methods-3.l

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Neil Hodgson
Paul Rubin: > I haven't used Ruby on Rails but from the description I saw, its distro > includes everything needed, which I assume includes Ruby itself. Whatever led you to assume that? * Install Ruby * Install RubyGems * Invoke gem to install rails http://download.rubyonrails.c

Abstract methods in python - is this a good way ?)

2005-08-07 Thread Philipp H. Mohr
Hello, I would like to use abstract methods in python to force some of the classes to implement common methods. I found this web page and wonder if it is a good way of implementing them: http://www.lychnis.net/blosxom/programming/python-abstract-methods-3.lychnis Also could some one please tel

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Björn Lindström
Paul Rubin writes: > [EMAIL PROTECTED] (Björn Lindström) writes: >> I don't see why the things you talk about would have to be part of the >> main Python distribution. Ruby on Rails seems to do pretty well without >> being included with the core language. > > I haven't u

Re: Creating a virtual file system

2005-08-07 Thread Jorgen Grahn
On 5 Aug 2005 16:47:08 -0700, Atila Olah <[EMAIL PROTECTED]> wrote: > I'm working on a project to implement a simple cross-platform file > sharing protocol (using Python) that is similar to HTTP, and I have to Like WebDAV, then? > My question is: How do I implement a virtual partition that acts l

  1   2   >