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

2005-08-06 Thread Paolino
Terry Reedy 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 like that. > > > The specialness of globals and locals was

Re: Decline and fall of scripting languages ?

2005-08-06 Thread Paul Rubin
"gene tani" <[EMAIL PROTECTED]> writes: > http://martinfowler.com/bliki/CollectionClosureMethod.html > http://onestepback.org/index.cgi/Tech/Ruby/PythonAndRuby.rdoc Thanks, the way Ruby passes closure arguments to various of its library builtins is cute. PEP 343 adds something sort of comparable

Re: Decline and fall of scripting languages ?

2005-08-06 Thread gene tani
(copied from "Fat/Lazy" thread http://martinfowler.com/bliki/CollectionClosureMethod.html http://onestepback.org/index.cgi/Tech/Ruby/PythonAndRuby.rdoc -- http://mail.python.org/mailman/listinfo/python-list

Re: Berkely DB – many writers, many readers

2005-08-06 Thread Andy Leszczynski
Eric S. Johansson wrote: > Andy Leszczynski wrote: > >> >> I need to now option I open the Berkley DB (both db and env) to have >> configuration for multiple writers and multiple readers. Via multiple >> processes and multiple threads. No trx needed. > > > the simple answer is you can't. bd

Re: Decline and fall of scripting languages ?

2005-08-06 Thread Paul Rubin
"Kay Schluehr" <[EMAIL PROTECTED]> writes: > The whole ML family ( including OCaml ) and languages like Haskell > based on a Hindley-Milnor type system clearly make a difference. I > would say that those languages are also cutting edge in language theory > research. It should be definitely interest

Re: Proposed new collection methods

2005-08-06 Thread Christopher Subich
Robert Kern wrote: > Jeff Schwab wrote: >> Why are you retarded? Isn't the above code O(n)? >> >> Forgive me for not understanding, I'm still awfully new to Python >> (having come from Perl & C++), and I didn't see an explanation in the >> FAQ. > (s for s in iter(self) is test(s)) is a generato

Re: Decline and fall of scripting languages ?

2005-08-06 Thread Kay Schluehr
Paul Rubin wrote: > Cliff Wells <[EMAIL PROTECTED]> writes: > > It didn't say what they left PHP, Perl and Python for (if you are to > > even believe their findings). > > > > PHP has been losing programmers in droves... to Ruby on Rails, but I'm > > not sure how that is bad news for scripting-langu

Re: Proposed new collection methods

2005-08-06 Thread Jeff Schwab
Robert Kern wrote: > (s for s in iter(self) is test(s)) is a generator expression. It is > roughly equivalent to > > def g(self, test=lambda x: True): > for s in iter(self): > if test(s): > yield s > > Now, if I were to do > > item = g(self, test).next() > > the generato

Re: Decline and fall of scripting languages ?

2005-08-06 Thread Robert Kern
Paul Rubin wrote: > Joseph Garvin <[EMAIL PROTECTED]> writes: > >>>That's the second time in one or two days that I've heard Ruby on >>>Rails mentioned. Can anyone here post a paragraph or two description? >>>I sort of know what Ruby is, a very OOP-ified Perl-resemblant >>>language, that's also i

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

2005-08-06 Thread Donn Cave
Quoth Mike Meyer <[EMAIL PROTECTED]>: | "John Roth" <[EMAIL PROTECTED]> writes: ... |> It seems to be the concensus on this group anyway: declarative typing |> does not give enough improvement in program correctness to override |> more concise programs and TDD. That may, of course, be wishful |> t

Re: Decline and fall of scripting languages ?

2005-08-06 Thread Paul Rubin
Joseph Garvin <[EMAIL PROTECTED]> writes: > >That's the second time in one or two days that I've heard Ruby on > >Rails mentioned. Can anyone here post a paragraph or two description? > >I sort of know what Ruby is, a very OOP-ified Perl-resemblant > >language, that's also implemented only as an i

Re: Proposed new collection methods

2005-08-06 Thread Robert Kern
Jeff Schwab wrote: > Robert Kern wrote: > >>Robert Kern wrote: >> >>>Christopher Subich wrote: >>> Dear Zeus no. Find can be defined as: def find(self, test=lambda x:1): try: item = (s for s in iter(self) if test(s)).next() except StopIteration: raise Val

Re: Proposed new collection methods

2005-08-06 Thread Jeff Schwab
Robert Kern wrote: > Robert Kern wrote: > >> Christopher Subich wrote: >> >> >>> Dear Zeus no. Find can be defined as: >>> def find(self, test=lambda x:1): >>>try: >>> item = (s for s in iter(self) if test(s)).next() >>>except StopIteration: >>> raise ValueError('No matching i

Re: Decline and fall of scripting languages ?

2005-08-06 Thread Joseph Garvin
Paul Rubin wrote: >Cliff Wells <[EMAIL PROTECTED]> writes: > > >>It didn't say what they left PHP, Perl and Python for (if you are to >>even believe their findings). >> >>PHP has been losing programmers in droves... to Ruby on Rails, but I'm >>not sure how that is bad news for scripting-language

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

2005-08-06 Thread Paul Rubin
"Terry Reedy" <[EMAIL PROTECTED]> writes: > Actually, it is the reinvention of classes: > > class enclosing(object): > def __init__(self): > self.var = 2 > def enclosed(self): > self.var = 4 Actually, having to wrap classes around operation as simple as variable binding is

Re: Decline and fall of scripting languages ?

2005-08-06 Thread Paul Rubin
Cliff Wells <[EMAIL PROTECTED]> writes: > It didn't say what they left PHP, Perl and Python for (if you are to > even believe their findings). > > PHP has been losing programmers in droves... to Ruby on Rails, but I'm > not sure how that is bad news for scripting-language fans. That's the second

seek python parser

2005-08-06 Thread Evil Bastard
Hi, Does anyone know of a python source parser program which can return the parsed source file as a coherent dom-like data structure? I'm playing around with ast, and the output of ast.tolist(), but it's got a lot of chaff, and would need a lot of hacking to break it down to simple data structure

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

2005-08-06 Thread Peter Hansen
Mike Meyer wrote: > "John Roth" <[EMAIL PROTECTED]> writes: >>"Mike Meyer" <[EMAIL PROTECTED]> wrote in message >>>I find it hilarious that this arrived at my news server the same day >>>that Peter Hansens rant (look for the subject "Syntax error after >>>upgrading to Python 2.4") about Python chan

Re: Proposed new collection methods

2005-08-06 Thread Robert Kern
Robert Kern wrote: > Christopher Subich wrote: > > >>Dear Zeus no. Find can be defined as: >>def find(self, test=lambda x:1): >>try: >> item = (s for s in iter(self) if test(s)).next() >>except StopIteration: >> raise ValueError('No matching items in list') > > I would prefe

Re: Proposed new collection methods

2005-08-06 Thread Robert Kern
Christopher Subich wrote: > Dear Zeus no. Find can be defined as: > def find(self, test=lambda x:1): > try: >item = (s for s in iter(self) if test(s)).next() > except StopIteration: >raise ValueError('No matching items in list') I would prefer that a find() operation retu

Re: Get directory from http web site

2005-08-06 Thread [EMAIL PROTECTED]
You might want to also modify your c:/python/Lib/urllib.py file. By adding/modifying the following headers. self.addheaders = [('User-agent', 'Mozilla/4.0')] #Trick the server into thinking it is explorer self.addheaders = [('Referer','http://www.infomedia.it')] #Trick the site that you clicked

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

2005-08-06 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> "John Roth" <[EMAIL PROTECTED]> writes: >>>The world is moving on, in ways that I think you're not seeing. >>>And Python is standing still in many of those same ways. >> I find it hilarious that this arrived at my news server the same

Re: Proposed new collection methods

2005-08-06 Thread Christopher Subich
Mike Meyer wrote: > Another thread pointed out a couple of methods that would be nice to > have on Python collections: find and inject. These are taken from > http://martinfowler.com/bliki/CollectionClosureMethod.html >. > > find can be defined as: > > def find(self, test = None): >

Re: The ONLY thing that prevents me from using Python

2005-08-06 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > The only way ISPs will find out that Python is popular is if potential > customers tell them they need it. So if they say no, be *sure* and > tell them you won't be using them because of that. I think the issue is low cost web hosts, not ISP's. PHP is much

Re: SWIG again

2005-08-06 Thread Robert Kern
Jerry He wrote: >>Robert Kern >>Please don't make a new thread every time you post. > > sorry, I chose the digest mode when I signed up, and I > have no idea how to reply, nor any idea how to change > to the normal mode where I get individual emails so I > can actually just hit the reply button in

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

2005-08-06 Thread John Roth
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "John Roth" <[EMAIL PROTECTED]> writes: >> However. I see nothing in the existing Python 3000 PEP that does >> anything other than inspire a yawn. Sure, it's a bunch of cleanup, and >> some of it is definitely needed. > > A

Re: Does FTPLIB have a 'local change directory' ?

2005-08-06 Thread Dan Sommers
On Sun, 07 Aug 2005 01:28:31 GMT, "python newbie" <[EMAIL PROTECTED]> wrote: > I'd like to be able to first > ftplib.lcd( "c:\myfiles\morefiles" ) > and then just > storbinary( picture.gif .. ). > But the python doc doesn't show any LCD. Try os.chdir. HTH, Dan -- Dan Sommers

Re: Wheel-reinvention with Python

2005-08-06 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > Is there a free language you consider successful? I can't think of any > that are a lot more (i.e. - an order of magnitude) successful than > Python that aren't derived from C. SQL > Have you noticed that languages with really cool features aren't very > p

Re: Does FTPLIB have a 'local change directory' ?

2005-08-06 Thread Steve Bailey
Yes, I tried using just the filename itself in using storbinary, but it returned some kind of error, but your suggestion to use os.chdir is so obvious I'm not sure why I didn't think of that. Thanks for the email Steve On 8/6/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > If you want to change

Re: Wheel-reinvention with Python

2005-08-06 Thread Dan Sommers
On Fri, 05 Aug 2005 21:59:28 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: > Is there a free language you consider successful? I can't think of any > that are a lot more (i.e. - an order of magnitude) successful than > Python that aren't derived from C. How about Postscript? (I believe that Posts

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

2005-08-06 Thread Mike Meyer
"John Roth" <[EMAIL PROTECTED]> writes: > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message >>> What I want to see in Python 3000 is an AST based language >>> that lets the editors do the pretty printing. Do you want automatic >>> indenting or would you prefer end statements? It's an editor formatt

Re: Does FTPLIB have a 'local change directory' ?

2005-08-06 Thread jepler
If you want to change the working directory of a Python program, then use os.chdir() for that purpose. That's what 'lcd' does in ftp client software. It doesn't send a remote command of any kind. Or, when you call the storbinary method, give the os.path.basename() of the file you are storing, ins

Re: Does FTPLIB have a 'local change directory' ?

2005-08-06 Thread Robert Kern
python newbie wrote: > Hi, first I wanted to say that: > > I have finally been able to ftp a file in my python app - however, it > works like this: > > When you use storbinary and hand it a full path > "c:\myfiles\morefiles\picture.gif".. > it will find the file on your hard drive, and > th

Does FTPLIB have a 'local change directory' ?

2005-08-06 Thread python newbie
Hi, first I wanted to say that: I have finally been able to ftp a file in my python app - however, it works like this: When you use storbinary and hand it a full path "c:\myfiles\morefiles\picture.gif".. it will find the file on your hard drive, and then upload the file, but on the ftp ser

Re: Some simple performace tests (long)

2005-08-06 Thread Justin Azoff
How much ram does your machine have? the main point is "except when a very large range is used on a memory-starved machine" run x = range(10 ** 6) and look at the memory usage of python.. what happens when you run this program: import time def t(func, num): s = time.time() for x in fun

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

2005-08-06 Thread Peter Hansen
Mike Meyer wrote: > "John Roth" <[EMAIL PROTECTED]> writes: >>The world is moving on, in ways that I think you're not seeing. >>And Python is standing still in many of those same ways. > > I find it hilarious that this arrived at my news server the same day > that Peter Hansens rant (look for the

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

2005-08-06 Thread Terry Reedy
"John Roth" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Maybe "fat and happy" wasn't the best choice of words Depends on the reaction you wanted ;-) > However. I see nothing in the existing Python 3000 PEP that does > anything other than inspire a yawn. Sure, it's a bunch of c

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

2005-08-06 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > You can't "fix" this. This code (in some python-like langauge that > isn't python): > > x = 23 > > def fun(): > x = 25 > # Rest of code > > has two possible interpretations. The fix is to add a "local" declaration in "fun": local x = 25 for

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

2005-08-06 Thread Paul Rubin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > I've heard 2 people complain that word 'global' is confusing. > Perhaps 'modulescope' or 'module' would be better? > Am I the first peope to have thought of this and suggested it? > Is this a candidate for Python 3000 yet? It's not

re:SWIG again

2005-08-06 Thread Jerry He
> Robert Kern >Please don't make a new thread every time you post. sorry, I chose the digest mode when I signed up, and I have no idea how to reply, nor any idea how to change to the normal mode where I get individual emails so I can actually just hit the reply button instead of copying your name

Re: Syntax error after upgrading to Python 2.4

2005-08-06 Thread jepler
On Sat, Aug 06, 2005 at 05:15:22PM -0400, Terry Reedy wrote: > In any case letting developers add new features is part of the price of > getting unpaid bug fixes for free software. But note that PSF does not > make you to upgrade. Here is the current list of possible downloads. > [a mere 8 ver

Re: Generalised String Coercion

2005-08-06 Thread John Roth
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> PEP: 349 >> Title: Generalised String Coercion > ... >> Rationale >>Python has had a Unicode string type for some time now but use of >>it is not yet widespread. There is a large amount of Python code >>that

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

2005-08-06 Thread Terry Reedy
"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 like that. The specialness of globals and locals was part of Python's original simpl

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

2005-08-06 Thread Mike Meyer
"John Roth" <[EMAIL PROTECTED]> writes: > However. I see nothing in the existing Python 3000 PEP that does > anything other than inspire a yawn. Sure, it's a bunch of cleanup, and > some of it is definitely needed. Actually, that's pretty much *all* it is. I always figured it was a warning about t

Re: SWIG again

2005-08-06 Thread Robert Kern
Please don't make a new thread every time you post. Jerry He wrote: > Robert Kern > >>Write a distutils setup.py script to do all of the >>compiling and linking. > > Ok, I wrote the following distutils setup.py script > from distutils.core import setup, Extension > > setup (name = 'example', >

Proposed new collection methods

2005-08-06 Thread Mike Meyer
Another thread pointed out a couple of methods that would be nice to have on Python collections: find and inject. These are taken from http://martinfowler.com/bliki/CollectionClosureMethod.html >. find can be defined as: def find(self, test = None): for item in self: if

SWIG again

2005-08-06 Thread Jerry He
Robert Kern >Write a distutils setup.py script to do all of the >compiling and linking. Ok, I wrote the following distutils setup.py script from distutils.core import setup, Extension setup (name = 'example', version = '2.4', ext_modules = [Extension('example', \ ['example.c',

Re: Some simple performace tests (long)

2005-08-06 Thread Terry Reedy
"TPJ" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "The advantage of xrange() over range() is minimal (since xrange() > still has to create the values when asked for them) except when a very > large range is used on a memory-starved machine or when all of the > range's elements a

Re: Syntax error after upgrading to Python 2.4

2005-08-06 Thread Terry Reedy
"Fernando" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I wrote >> I don't see the problem yet. I certainly do not see anything that >> should >> have been affected by the upgrade (was it from 2.3 on XP also?) > Yes. and >> After checking for nonprinting chars, I would shuffle

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

2005-08-06 Thread Kay Schluehr
John Roth wrote: > Another thing that stands out: the explicit versus dynamic typing debate > has moved on from program correctness (which is a wash) to > other areas that explicit (or derived) type information can be used > for. I see this in PyFit: the languages where explicit type information >

Re: Decline and fall of scripting languages ?

2005-08-06 Thread Cliff Wells
On Sat, 2005-08-06 at 03:24 -0700, Kay Schluehr wrote: > No good news for scripting-language fans: > > http://www.phpmag.net/itr/news/psecom,id,23284,nodeid,113.html It didn't say what they left PHP, Perl and Python for (if you are to even believe their findings). PHP has been losing programmers

Re: Get directory from http web site

2005-08-06 Thread Kent Johnson
rock69 wrote: > Hi all :) > > I was wondering if there's some neat and easy way to get the entire > contents of a directory at a specific web url address. > > I have the following link: > > http://www.infomedia.it/immagini/riviste/covers/cp > > and as you can see it's just a list containing all

Re: Generalised String Coercion

2005-08-06 Thread Terry Reedy
> PEP: 349 > Title: Generalised String Coercion ... > Rationale >Python has had a Unicode string type for some time now but use of >it is not yet widespread. There is a large amount of Python code >that assumes that string data is represented as str instances. >The long term plan f

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

2005-08-06 Thread Dan Sommers
On Sat, 6 Aug 2005 11:53:04 -0600, "John Roth" <[EMAIL PROTECTED]> wrote: > What I want to see in Python 3000 is an AST based language that lets > the editors do the pretty printing. Do you want automatic indenting or > would you prefer end statements? It's an editor formatting option. The > AST n

Re: Sample code to build rfc822 mail message building

2005-08-06 Thread Terry Reedy
"praba kar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am new to python world. I have pasted my code > which I used it to build rfc822 format mails for When you start a completely new subject, you should start a new thread and not make your new-subject post a reply in

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

2005-08-06 Thread Devan L
John Roth wrote: > "Peter Hansen" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > John Roth wrote: > >> It's not going to happen because the Python community is fat and happy, > >> and is not seeing the competition moving up on the outside. > >> Characteristics > >> that make a gr

Re: Decline and fall of scripting languages ?

2005-08-06 Thread Paddy
Do you know anyone who has dropped LAMP for a proprietary Web solution? Or vice versa? Know any sys-admins that have dropped their use of scripting languages for something else? What are the alternatives that are supposedly driving scripting languages out? - I'm unconvinced. -- http://mail.pytho

looking to GIVE my first oral favor

2005-08-06 Thread Casee
im new to this, i guess you can say im still curious about having extra marital lovers. i've only had 1 encounter with a married man and I loved it so much. its such a strong burning desire now. when I look at men, i'm always wondering how they look nude, or their cock size. basically, i want

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

2005-08-06 Thread D H
[EMAIL PROTECTED] wrote: > I'm not saying 'modulescope' and 'module' are the only alternatives or > even > the best anyone can come up with. > > 'global' has the connotation of being visible *EVERYWHERE* > where in Python it is just visible in one module's space. > > Can you think of a better alt

Re: Decline and fall of scripting languages ?

2005-08-06 Thread Reinhold Birkenfeld
Kay Schluehr wrote: > No good news for scripting-language fans: > > http://www.phpmag.net/itr/news/psecom,id,23284,nodeid,113.html The study was conducted by Evans Data Corporation. Look here: http://www.evansdata.com/n2/about_us_clients.shtml Do you see the PSF or Larry Wall on the list? Rein

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

2005-08-06 Thread Paolino
Peter Hansen wrote: > Paolino wrote: > >>[EMAIL PROTECTED] wrote: >>def enclosing(): >> var=[] >> var[0]=2 >> def enclosed(): >>var[0]=4 >>which is like saying python is not working >> >>It's ok to mark non locals,but why var=4 is not searched outside and >>var[0]=4 yes? > > > Because "v

Re: minidom xml & non ascii / unicode & files

2005-08-06 Thread Martin v. Löwis
> so what i understood of all this, is that once you're using unicode > objects you're safe ! > At least as long as you don't use statements or operators that will > implicitely try to convert the unicode object back to bytestring using > your default encoding (ascii) which will most certainly resu

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

2005-08-06 Thread Christopher Subich
John Roth wrote: > > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> >> So the only way to remove the global statement would be to have some >> way to mark the other interpretation, with say a "local" >> decleration. I thik that would be much worse than "global". For

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

2005-08-06 Thread John Roth
"Paolino" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] wrote: >> I've heard 2 people complain that word 'global' is confusing. >> >> Perhaps 'modulescope' or 'module' would be better? >> >> Am I the first peope to have thought of this and suggested it? >> >> Is t

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

2005-08-06 Thread John Roth
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > John Roth wrote: >> It's not going to happen because the Python community is fat and happy, >> and is not seeing the competition moving up on the outside. >> Characteristics >> that make a great language one day make a m

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

2005-08-06 Thread Peter Hansen
Paolino wrote: > [EMAIL PROTECTED] wrote: > def enclosing(): > var=[] > var[0]=2 > def enclosed(): > var[0]=4 > which is like saying python is not working > > It's ok to mark non locals,but why var=4 is not searched outside and > var[0]=4 yes? Because "var=4" rebinds the name "var", wh

python-list@python.org

2005-08-06 Thread Kay Schluehr
[EMAIL PROTECTED] wrote: > I've heard 2 people complain that word 'global' is confusing. > > Perhaps 'modulescope' or 'module' would be better? > > Am I the first peope to have thought of this and suggested it? > > Is this a candidate for Python 3000 yet? > > Chris Maybe a solution would be best t

Re: Point and click GUI builder for Python

2005-08-06 Thread neuruss neuruss
Madhusudan Singh wrote: > Is there such a thing for python ? Like Qt Designer for instance ? The easiest way to create Python GUI apps: PythonCard. It is based on wxPython by it has a higher level of abstraction. You just drag and drop widgets on a form and code the events like you woud in Visual

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

2005-08-06 Thread Paolino
[EMAIL PROTECTED] wrote: > I've heard 2 people complain that word 'global' is confusing. > > Perhaps 'modulescope' or 'module' would be better? > > Am I the first peope to have thought of this and suggested it? > > Is this a candidate for Python 3000 yet? > > Chris I don't think the global key

Re: about coding

2005-08-06 Thread cantabile
Robert Kern a écrit : > It depends. Are those characters encoded as UTF-8? Or, more likely, are > they encoded as ISO-8859-1? > >> Where can I find a pratical explanation about these encodings ? > > > http://www.amk.ca/python/howto/unicode > http://en.wikipedia.org/wiki/Character_encoding > ht

Re: why no arg, abs methods for comlex type?

2005-08-06 Thread Bengt Richter
On Sat, 06 Aug 2005 06:44:03 GMT, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >On Fri, 05 Aug 2005 18:24:26 +0200, Daniel Schüle ><[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> >>c = 1+1j >> >>c.arg(angle_mode = cmath.GRAD) -> 45.0 >> > >> > >> >Is that right? The res

Re: How to use DrPython plugins

2005-08-06 Thread RunLevelZero
Well I think you should post in this forum and you will get your answer more quickly. http://sourceforge.net/forum/?group_id=83074 I'm not sure which version you are using? The developer for DrPython is rather busy right now but someone else there might be able to help you a bit more than me. H

Re: Some simple performace tests (long)

2005-08-06 Thread Michael Hoffman
TPJ wrote: > I decided to measure the performance of range and xrange... > > The results were as follows: > > n rprint xrprint > > 10^40.37 s 0.34 s <- (1) > 10^54.26 s 4.25 s > 10^642.57 s 42.57 s > 10^7431.94 s438.32 s

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

2005-08-06 Thread Peter Hansen
John Roth wrote: > It's not going to happen because the Python community is fat and happy, > and is not seeing the competition moving up on the outside. Characteristics > that make a great language one day make a mediocre one a few years > later, and make a has-been a few years after that. And her

Re: Syntax error after upgrading to Python 2.4

2005-08-06 Thread John Machin
Fernando wrote: >>I don't see the problem yet. I certainly do not see anything that should >>have been affected by the upgrade (was it from 2.3 on XP also?) > > > Yes. > > >>After checking for nonprinting chars, I would shuffle the param-default >>lines to try to determine which is really at f

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

2005-08-06 Thread John Roth
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "John Roth" <[EMAIL PROTECTED]> writes: >> <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> A much better idea would be to fix the underlying >> situation that makes the global statement necessary. > > You

Re: about coding

2005-08-06 Thread John Machin
Benjamin Niemann wrote: > cantabile wrote: > > >>Hi, being a newbie in Python, I'm a bit lost with the '-*- coding : -*-' >>directive. >> >>I'm using an accented characters language. Some of them are correctly >>displayed while one doesn't. I've written : >>-*- coding: utf-8 -*- >> >>Is this wron

Some simple performace tests (long)

2005-08-06 Thread TPJ
"The advantage of xrange() over range() is minimal (since xrange() still has to create the values when asked for them) except when a very large range is used on a memory-starved machine or when all of the range's elements are never used (such as when the loop is usually terminated with break)." - f

Re: Syntax error after upgrading to Python 2.4

2005-08-06 Thread Peter Hansen
Fernando wrote: > I reinstalled version 2.3.5 and everything works fine now. It's > definately something related to the latest version. No problem in software is definite until you actually know what the solution is. I'd suspect something other than a simple problem in 2.4 itself, since otherwi

Re: Putting function references in a Queue

2005-08-06 Thread Benjamin Niemann
Richard Townsend wrote: > I've been experimenting putting a reference to a function into a Queue > object and was wondering what actually gets put in the Queue - is it the > function's code object? No, it's justa referenceto the function object. > If I read from the Queue in a different module,

Re: Putting function references in a Queue

2005-08-06 Thread tiissa
Richard Townsend wrote: > I've been experimenting putting a reference to a function into a Queue > object and was wondering what actually gets put in the Queue - is it the > function's code object? It would simply be the entire function object (unless you choose it otherwise). > If I read from t

Re: why no arg, abs methods for comlex type?

2005-08-06 Thread tiissa
Daniel Schüle wrote: >> Okay. Write a patch. Personally, I would prefer that it be a >> function in cmath rather than a method because then it could be made >> to work on integers and regular floats, too. > > Ok, but what semantic should angle/arg have, say for 3 respectively > for 3.0? > the s

Putting function references in a Queue

2005-08-06 Thread Richard Townsend
I've been experimenting putting a reference to a function into a Queue object and was wondering what actually gets put in the Queue - is it the function's code object? If I read from the Queue in a different module, it appears that I don't need to import the module that defines the function - or a

Re: why no arg, abs methods for comlex type?

2005-08-06 Thread Daniel Schüle
[...] > Okay. Write a patch. Personally, I would prefer that it be a > function in cmath rather than a method because then it could be made to > work on integers and regular floats, too. Ok, but what semantic should angle/arg have, say for 3 respectively for 3.0? the same as for arg(3+0j)? --

Re: How to get ScrollRegion to adjust w/ window-size?

2005-08-06 Thread jepler
The ScrollRegion of the canvas gives the area that should be "available" for scrolling. If this is larger than the visible area of the canvas, then associated scrollbars will allow scrolling. If this is smaller than the visible area of the canvas, then the scrollbar will fill with the "thumb" and

How to use DrPython plugins

2005-08-06 Thread Laszlo Zsolt Nagy
Hi All! I have DrPython installed. I see there are cool plugins but I cannot user them. For example, I installed the "CodeCompletion" and "CodeMark" plugins. I have enabled the "CodeCompletion" plugin by default. I assigned the shortcut CTRL+SPACE to :CodeCompletion "Toggle Code Completion"

Re: about coding

2005-08-06 Thread Benjamin Niemann
cantabile wrote: > Hi, being a newbie in Python, I'm a bit lost with the '-*- coding : -*-' > directive. > > I'm using an accented characters language. Some of them are correctly > displayed while one doesn't. I've written : > -*- coding: utf-8 -*- > > Is this wrong ? > > Where can I find a pra

Re: Do I need to have site.py available or not ?

2005-08-06 Thread Thomas Heller
Reinhold Birkenfeld <[EMAIL PROTECTED]> writes: > Terry Reedy wrote: >> <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> Hi, >>> on startup my embedded python comes up with "import site failed use >>> -v". Later python crashes on Pyrun_file(). This is the first time I >>> have u

Re: Installing/Using SWIG for python again

2005-08-06 Thread Robert Kern
Jerry He wrote: > Ok, I managed to get rid of the weird Tcl_Append, and > strlen error messages, but right now I'm left with > undefined references to what seems like Python-C API > objects. > > Does anyone know how to handle these undefined > references? Write a distutils setup.py script to do

Installing/Using SWIG for python again

2005-08-06 Thread Jerry He
>From Jerry He: >For the third one however >ld -shared example.o example_wrap.o -o _example.so >It gave me a long list of errors listed at the end of >this email. Ok, I managed to get rid of the weird Tcl_Append, and strlen error messages, but right now I'm left with undefined references to w

Re: about coding

2005-08-06 Thread Robert Kern
cantabile wrote: > Hi, being a newbie in Python, I'm a bit lost with the '-*- coding : -*-' > directive. > > I'm using an accented characters language. Some of them are correctly > displayed while one doesn't. I've written : > -*- coding: utf-8 -*- > > Is this wrong ? It depends. Are those cha

Decline and fall of scripting languages ?

2005-08-06 Thread Kay Schluehr
No good news for scripting-language fans: http://www.phpmag.net/itr/news/psecom,id,23284,nodeid,113.html Regards Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: substring and regular expression

2005-08-06 Thread [EMAIL PROTECTED]
can you be so kind to show me a small example in spark if u like for remove all string with a substring of length 4 and the reverse of it? i thank you a lot -- http://mail.python.org/mailman/listinfo/python-list

PEP: Generalised String Coercion

2005-08-06 Thread Neil Schemenauer
The title is perhaps a little too grandiose but it's the best I could think of. The change is really not large. Personally, I would be happy enough if only %s was changed and the built-in was not added. Please comment. Neil PEP: 349 Title: Generalised String Coercion Version: $Revision: 1.2

Re: Syntax error after upgrading to Python 2.4

2005-08-06 Thread Fernando
> I don't see the problem yet. I certainly do not see anything that should > have been affected by the upgrade (was it from 2.3 on XP also?) Yes. > After checking for nonprinting chars, I would shuffle the param-default > lines to try to determine which is really at fault. Good luck, or wait fo

about coding

2005-08-06 Thread cantabile
Hi, being a newbie in Python, I'm a bit lost with the '-*- coding : -*-' directive. I'm using an accented characters language. Some of them are correctly displayed while one doesn't. I've written : -*- coding: utf-8 -*- Is this wrong ? Where can I find a pratical explanation about these encodi

Re: Point and click GUI builder for Python

2005-08-06 Thread Micetto Nero
Madhusudan Singh wrote: > Is there such a thing for python ? Like Qt Designer for instance ? pyGTK http://glade.gnome.org/ http://gazpacho.sicem.biz/ wxPython http://boa-constructor.sourceforge.net/ You can even use Qt Designer with pyQt http://www.riverbankcomputing.co.uk/pyqt/ --

Re: minidom xml & non ascii / unicode & files

2005-08-06 Thread webdev
Thx Martin for your comments. indeed the charset of the web document is set in the meta tag, it's iso-8859-1 so i'll decode it to unicode using something like: html = html.decode('iso-8859-1') html then contains the unicode version of the html document As i've finally managed to make this work

installing SWIG for python

2005-08-06 Thread Jerry He
Hi, I just installed SWIG on Windows(Cygwin) and tried to use it to compile some of the example python programs. For the first two commands it produced no error swig -python example.i gcc -c example.c example_wrap.c -I \ /usr/include/python2.4 For the third one however ld -shared

Sample code to build rfc822 mail message building

2005-08-06 Thread praba kar
Dear All, I am new to python world. I have pasted my code which I used it to build rfc822 format mails for webbased mailing system task(which is like to yahoo.com web interface). Now I am asking some suggestions and guidence regarding this below code. Still What way I can improve this code

  1   2   >