Re: setuptools without unexpected downloads

2007-10-07 Thread John
On Sep 27, 11:42 am, Istvan Albert <[EMAIL PROTECTED]> wrote: > On Sep 26, 2:09 am, Ben Finney <[EMAIL PROTECTED]> wrote: > > > behaviour with a specific invocation of 'setup.py'. But how can I > > disallow this from within the 'setup.py' program, so my users don't > > have to be aware of this unex

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread John Nagle
Michele Simionato wrote: > I wait with > impatience the time when Web programming will become a solved > problem with a standard built-in solution that works. That will probably come from Microsoft. At least for all-Microsoft environments. They're the only player who controls enough of the p

Re: Top Programming Languages of 2013

2007-10-07 Thread Tim Roberts
Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > >import friends >import sex > >try: > sex.have() >except ErrectionError, PrematureError: > pass >finally: > sex.brag(friends) Well, if "ErrectionError" ever becomes a real exception, I certainly get a boatload of email every day from

Re: tinyp2p - trying to get it to work

2007-10-07 Thread Fantus
Marc Christiansen pisze: >> Can anybody help me to solve this? Please. I did browse google but found >> nothing. > > I had a (not so quick) look. The code proves its point (i.e. writing a > very small p2p application is possible), but it is horrible. With only > one server, the code is broken; ma

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-07 Thread Lew
[EMAIL PROTECTED] wrote: > Don't both "man" and those words for measurement come ultimately from > words for "hand" (similarly to words like "manual", as in labor)? Our > clever hands with their opposable thumbs being considered a defining > characteristic. And our tool use thus derived. Handspans

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-07 Thread bbound
On Oct 7, 9:07 pm, Damien Kick <[EMAIL PROTECTED]> wrote: > Perhaps our word "man" (manas) still expresses something of precisely > this feeling of self-satisfaction: man designated himself as the > creature that measures values, evaluates and measures, as the "valuating > animal as such".[1] Don'

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread Michele Simionato
On Oct 7, 6:14 pm, Istvan Albert <[EMAIL PROTECTED]> wrote: > On Oct 7, 12:24 pm, Michele Simionato <[EMAIL PROTECTED]> > wrote: > > > Here we disagree: I think that a programmer should know what he > > is using. > > My point was that they should not *need* to know. Too much information > can be de

Re: Problem of Readability of Python

2007-10-07 Thread Michele Simionato
On Oct 7, 7:58 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > If you REALLY pine for Pascal's records, you might choose to inherit > from ctypes.Structure, which has the additional "advantages" of > specifying a C type for each field and (a real advantage;-) creating an > appropriate __init__ metho

Re: Don't use __slots__ (was Re: Problem of Readability of Python)

2007-10-07 Thread Michele Simionato
On Oct 8, 12:27 am, [EMAIL PROTECTED] (Aahz) wrote: > > Aaaugh! Don't use __slots__! +1 QOTW ;) Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Don't use __slots__ (was Re: Problem of Readability of Python)

2007-10-07 Thread Aahz
In article <[EMAIL PROTECTED]>, Steven Bethard <[EMAIL PROTECTED]> wrote: > >You can use __slots__ [...] Aaaugh! Don't use __slots__! Seriously, __slots__ are for wizards writing applications with huuuge numbers of object instances (like, millions of instances). For an extended thread about t

Re: weakrefs and bound methods

2007-10-07 Thread Michele Simionato
On Oct 7, 11:28 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 07 Oct 2007 12:55:29 -0700, Alex Martelli wrote: > >> What should I do when my objects need to perform some special > >> processing when they are freed, if I shouldn't use __del__? > > > The solid, reliable way is: > > > from

Re: Problem of Readability of Python

2007-10-07 Thread Steven Bethard
Alex Martelli wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> class Record(object): >> __slots__ = ["x", "y", "z"] >> >> has a couple of major advantages over: >> >> class Record(object): >> pass >> >> aside from the micro-optimization that classes using __slots__ are faster >> and s

Re: weakrefs and bound methods

2007-10-07 Thread Steven D'Aprano
On Sun, 07 Oct 2007 12:55:29 -0700, Alex Martelli wrote: >> What should I do when my objects need to perform some special >> processing when they are freed, if I shouldn't use __del__? > > The solid, reliable way is: > > from __future__ import with_statement > > and use module contextlib from

were group "Python 2.4" bugs ported over to the new bug tracker?

2007-10-07 Thread Gregory P. Smith
This bug about a urllib2 urlopen memory leak is still present but I don't see it in the new bug tracker anywhere: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1208304&group_id=5470 If this one is missing, presumably there are others? -gps -- http://mail.python.org/mailman/listi

a good website for softwares,movies and music etc.

2007-10-07 Thread panguohua
www.space666.com support -- http://mail.python.org/mailman/listinfo/python-list

Re: tinyp2p - trying to get it to work

2007-10-07 Thread Marc Christiansen
Fantus <[EMAIL PROTECTED]> wrote: > Hello > > I am doing a small research and I found this: > > http://www.freedom-to-tinker.com/tinyp2p.html [...] > Now when I try to run a client using following command: > > > python tinyp2p.py haslo client http://10.10.10.1:2233 koniki > > it gives me some s

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-07 Thread Damien Kick
Roedy Green wrote: > On Fri, 28 Sep 2007 18:27:04 -0500, Damien Kick <[EMAIL PROTECTED]> > wrote, quoted or indirectly quoted someone who said : > >> "free as in beer". > > but does not "free beer" nearly always come with a catch or implied > obligation? I had been trying to find a good Nietzs

Re: Problem using subprocess.Popen on windows

2007-10-07 Thread Nicholas Bastin
On 10/7/07, jorma kala <[EMAIL PROTECTED]> wrote: > from subprocess import * > > p1 = Popen(["dir"], stdout=PIPE) > output = p1.communicate()[0] > > > But I get a WindowsError : [Error 2] File Not Found Tim answered your actual question, but why are you doing this in the first place? The Py

Re: supplying password to subprocess.call('rsync ...'), os.system('rsync ...')

2007-10-07 Thread Nicholas Bastin
On 05 Oct 2007 16:23:50 GMT, Stargaming <[EMAIL PROTECTED]> wrote: > On Fri, 05 Oct 2007 08:37:05 -0700, timw.google wrote: > >> I can't ssh w/o supplying a password. That's the way the security is > >> set up here. > >> > >> How do I use python to do this, or do I just have to write a zsh > >> scr

Re: Cross platform way of finding number of processors on a machine?

2007-10-07 Thread Nicholas Bastin
On 10/6/07, Lawrence Oluyede <[EMAIL PROTECTED]> wrote: > John <[EMAIL PROTECTED]> wrote: > > Is there a way to find the number of processors on a machine (on linux/ > > windows/macos/cygwin) using python code (using the same code/cross > > platform code)? > > >From processing

Re: Problem of Readability of Python

2007-10-07 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 07 Oct 2007 13:24:14 -0700, Alex Martelli wrote: > > > And yes, you CAN save about 1/3 of those 85 nanoseconds by having > > '__slots__=["zop"]' in your class A(object)... but that's the kind of > > thing one normally does only to tiny parts of

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > For example, a dog with no owner, wandering freely (adverb), would not be > called a free dog (adjective), to mean possessing freedom. Yes it would. City council regulations would commonly contain phrases such as "dogs are not allowed to

Re: Newbie packages Q

2007-10-07 Thread Alex Martelli
MarkyMarc <[EMAIL PROTECTED]> wrote: ... > > As long as '/python' comes in the list before any other directory that > > might interfere (by dint of having a Test.py or Test/__init__.py), and > > in particular in the non-pathological case where there are no such > > possible interferences, my ass

Re: Problem of Readability of Python

2007-10-07 Thread Steven D'Aprano
On Sun, 07 Oct 2007 13:24:14 -0700, Alex Martelli wrote: > And yes, you CAN save about 1/3 of those 85 nanoseconds by having > '__slots__=["zop"]' in your class A(object)... but that's the kind of > thing one normally does only to tiny parts of one's program that have > been identified by profilin

Re: Problem of Readability of Python

2007-10-07 Thread John Machin
On 8/10/2007 4:14 AM, Steven Bethard wrote: > Licheng Fang wrote: >> Python is supposed to be readable, but after programming in Python for >> a while I find my Python programs can be more obfuscated than their C/C >> ++ counterparts sometimes. Part of the reason is that with >> heterogeneous lists

Re: ANN: Pyrex 0.9.6

2007-10-07 Thread Colin J. Williams
Diez B. Roggisch wrote: > Colin J. Williams schrieb: >> Greg Ewing wrote: >>> Pyrex 0.9.6 is now available: >>> >>>http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ >>> >>> There is a *lot* of new stuff in this version, too much >>> to fit into this announcement. Read all about it here: >>>

Re: weakrefs and bound methods

2007-10-07 Thread Mathias Panzenboeck
Alex Martelli wrote: > Mathias Panzenboeck <[EMAIL PROTECTED]> wrote: > >> Marc 'BlackJack' Rintsch wrote: >>> ``del b`` just deletes the name `b`. It does not delete the object. >>> There's still the name `_` bound to it in the interactive interpreter. >>> `_` stays bound to the last non-`None`

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread Istvan Albert
On Oct 7, 12:24 pm, Michele Simionato <[EMAIL PROTECTED]> wrote: > Here we disagree: I think that a programmer should know what he > is using. My point was that they should not *need* to know. Too much information can be detrimental. > > Where is the session data stored: in memory, files, databa

finding out the call (and not only the caller)

2007-10-07 Thread Francesco Guerrieri
Hi, Today I've been thinking a bit about the "python internals". Inspired by this recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66062 I found out a little problem which haven't been able to solve. In short, is there a way to find out how a given name lookup was started? It is not

tinyp2p - trying to get it to work

2007-10-07 Thread Fantus
Hello I am doing a small research and I found this: http://www.freedom-to-tinker.com/tinyp2p.html I tried to get it to work. So far I managed to run it as a server using a command: > python tinyp2p.py haslo server 10.10.10.1 2233 It starts listening on a given port so I assume it works fine

Re: Problem of Readability of Python

2007-10-07 Thread John Nagle
Licheng Fang wrote: > Python is supposed to be readable, but after programming in Python for > a while I find my Python programs can be more obfuscated than their C/C > ++ counterparts sometimes. Part of the reason is that with > heterogeneous lists/tuples at hand, I tend to stuff many things into

Re: Override 'and' and 'or'

2007-10-07 Thread John Machin
On 8/10/2007 1:57 AM, Diez B. Roggisch wrote: > Kay Schluehr schrieb: >> You can see what "and" and "or" are actually doing: >> >> import dis >> dis.dis(lambda: x or y and z) >> >> 1 0 LOAD_GLOBAL 0 (x) >> 3 JUMP_IF_TRUE11 (to 17) >>

Re: Problem of Readability of Python

2007-10-07 Thread Paul McGuire
On Oct 7, 1:07 pm, Licheng Fang <[EMAIL PROTECTED]> wrote: > Python is supposed to be readable, but after programming in Python for > a while I find my Python programs can be more obfuscated than their C/C > ++ counterparts sometimes. Part of the reason is that with > heterogeneous lists/tuples at

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 10:31 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > MarkyMarc <[EMAIL PROTECTED]> wrote: > >... > > > > > > > And sys.path is /python/Test/bpack > > > > sys.path must be a LIST. Are you saying you set yours to NOT be a list, > > > but, e.g., a STRING?! (It's hard to tell, as you s

Re: Newbie packages Q

2007-10-07 Thread Alex Martelli
MarkyMarc <[EMAIL PROTECTED]> wrote: ... > > > > > And sys.path is /python/Test/bpack > > > > sys.path must be a LIST. Are you saying you set yours to NOT be a list, > > but, e.g., a STRING?! (It's hard to tell, as you show no quotes there). ... > > > I also tried to put /python/ and /pyth

Re: Problem of Readability of Python

2007-10-07 Thread Alex Martelli
Licheng Fang <[EMAIL PROTECTED]> wrote: ... > Python Tutorial says an empty class can be used to do this. But if > namespaces are implemented as dicts, wouldn't it incur much overhead > if one defines empty classes as such for some very frequently used > data structures of the program? Just mea

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 10:05 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > MarkyMarc <[EMAIL PROTECTED]> wrote: > >... > > > > > And sys.path is /python/Test/bpack > > sys.path must be a LIST. Are you saying you set yours to NOT be a list, > but, e.g., a STRING?! (It's hard to tell, as you show no quote

Re: Problem of Readability of Python

2007-10-07 Thread Brian Elmegaard
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Use dicts, not lists or tuples: > > a = dict(name='yadda', val=42) > print a['name'] > print a['val'] I guess you will then need a list or tuple to store the dicts? I might have made it with a list of class instances: class a: def __init__(s

Re: Newbie packages Q

2007-10-07 Thread Alex Martelli
MarkyMarc <[EMAIL PROTECTED]> wrote: ... > > > And sys.path is /python/Test/bpack sys.path must be a LIST. Are you saying you set yours to NOT be a list, but, e.g., a STRING?! (It's hard to tell, as you show no quotes there). > > The 'Test' package is *not* in your sys.path. > > I can say

Re: weakrefs and bound methods

2007-10-07 Thread Alex Martelli
Mathias Panzenboeck <[EMAIL PROTECTED]> wrote: > Marc 'BlackJack' Rintsch wrote: > > ``del b`` just deletes the name `b`. It does not delete the object. > > There's still the name `_` bound to it in the interactive interpreter. > > `_` stays bound to the last non-`None` result in the interpreter.

Re: weakrefs and bound methods

2007-10-07 Thread Alex Martelli
Mathias Panzenboeck <[EMAIL PROTECTED]> wrote: ... > I only inserted them so I can see if the objects are really freed. How can > I see that without a __del__ method? You can use weakref.ref instances with finalizer functions - see the long post I just made on this thread for a reasonably rich

Re: weakrefs and bound methods

2007-10-07 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: ... > Without __del__, what should I have done to test that my code was > deleting objects and not leaking memory? See module gc in the Python standard library. > What should I do when my objects need to perform some special processing > when they a

Re: Need help to find origin of a memory leakage

2007-10-07 Thread David Tremouilles
Finaly catch the memory leak I was fighting with Was a tricky one, but the solution was simple: I had to include the contents of the notebook tab in a frame. Otherwise the memory is not released when you remove the tab. Any idea why is it like that??? Could it be kind of pygtk bug? I attach

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 8:00 pm, Bruno Desthuilliers wrote: > > > And sys.path is /python/Test/bpack > > And you do wonder why you can't import ? Please reread with attention > the first and third points listed above (following the 'But anyway'). > The 'Test' package is *not* in your sys.path. I can say yes

Re: Problem of Readability of Python

2007-10-07 Thread Steven Bethard
George Sakkis wrote: > On Oct 7, 2:14 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: >> Licheng Fang wrote: >>> Python is supposed to be readable, but after programming in Python for >>> a while I find my Python programs can be more obfuscated than their C/C >>> ++ counterparts sometimes. Part of th

Re: Problem of Readability of Python

2007-10-07 Thread George Sakkis
On Oct 7, 2:14 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > Licheng Fang wrote: > > Python is supposed to be readable, but after programming in Python for > > a while I find my Python programs can be more obfuscated than their C/C > > ++ counterparts sometimes. Part of the reason is that with >

Re: Problem of Readability of Python

2007-10-07 Thread Bjoern Schliessmann
Licheng Fang wrote: > struct nameval { > char * name; >int val; > } a; > > a.name = ... > a.val = ... > > becomes cryptic > > a[0] = ... > a[1] = ... ?! (1) a = {} a["name"] = ... a["val"] = ... (2) NAME = 0 VAL = 1 a=[] a[NAME] = ... a[VAL] = ... > Python Tutorial says an empty cla

Re: Problem of Readability of Python

2007-10-07 Thread Bruno Desthuilliers
Licheng Fang a écrit : > Python is supposed to be readable, but after programming in Python for > a while I find my Python programs can be more obfuscated than their C/C > ++ counterparts sometimes. Part of the reason is that with > heterogeneous lists/tuples at hand, I tend to stuff many things in

Re: Problem of Readability of Python

2007-10-07 Thread Steven Bethard
Licheng Fang wrote: > Python is supposed to be readable, but after programming in Python for > a while I find my Python programs can be more obfuscated than their C/C > ++ counterparts sometimes. Part of the reason is that with > heterogeneous lists/tuples at hand, I tend to stuff many things into

Problem of Readability of Python

2007-10-07 Thread Licheng Fang
Python is supposed to be readable, but after programming in Python for a while I find my Python programs can be more obfuscated than their C/C ++ counterparts sometimes. Part of the reason is that with heterogeneous lists/tuples at hand, I tend to stuff many things into the list and *assume* a stru

Re: Newbie packages Q

2007-10-07 Thread Bruno Desthuilliers
MarkyMarc a écrit : > On Oct 7, 6:04 pm, Bruno Desthuilliers > But how do I get this to work? >> You failed to specify how your files are organized, and what is "not >> working". >> >> But anyway, if >> - atest.py is in /Test/apack, >> - both Test and apack have a __init__.py >> - is in the sys.pa

Re: supplying password to subprocess.call('rsync ...'), os.system('rsync ...')

2007-10-07 Thread Michael Torrie
timw.google wrote: > Hi > > I want to write a python script that runs rsync on a given directory > and host. I build the command line string, but when I try to run > subprocess.call(cmd), or p=subprocess.Popen(cmd, shell=True),or > os.system(cmd), I get prompted for my login password. I expected t

Re: Putting a line from a text file into a variable, then moving to next line

2007-10-07 Thread Tim Williams
On 07/10/2007, Tim Chase <[EMAIL PROTECTED]> wrote: > > I'm not really sure how readline() works. Is there a way to iterate > > through a file with multiple lines and then putting each line in a > > variable in a loop? > > You can use readlines() to get the whole line (including the > newline): > >

Re: Top Programming Languages of 2013

2007-10-07 Thread Wildemar Wildenburger
Byung-Hee HWANG wrote: > On Sun, 2007-10-07 at 17:54 +0200, Wildemar Wildenburger wrote: >> import friends >> import sex >> >> try: >> sex.have() >> except ErrectionError, PrematureError: >> pass >> finally: >> sex.brag(friends) > > Good! But. > I think a ki

Re: weakrefs and bound methods

2007-10-07 Thread Michele Simionato
On Oct 7, 1:14 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 07 Oct 2007 16:38:23 +, Michele Simionato wrote: > > On Oct 7, 12:26 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > >> Drop all those `__del__()` methods as they prevent the garbage > >> coll

Re: Pil image module, "mode" bug..

2007-10-07 Thread Michal Bozon
On Sun, 07 Oct 2007 09:02:09 -0700, Abandoned wrote: > On Oct 7, 4:47 pm, Michal Bozon <[EMAIL PROTECTED]> wrote: >> On Sun, 07 Oct 2007 06:03:06 -0700, Abandoned wrote: >> > Hi.. >> > I find the picture color with: >> > im=Image.open("/%s" %name) >> > color=im.mode #p=black & beyaz rgb=color L=

Re: How to create a file on users XP desktop

2007-10-07 Thread Tim Golden
Tim Chase wrote: >> You are assuming the system is not localized, that won't work if you >> distribute your applications internationally. In my system it is not >> "Desktop", it is "Escritorio", and I guess it will vary with every >> locale. Does someone know a way to find out what name does the de

Re: How to create a file on users XP desktop

2007-10-07 Thread Tim Golden
Tim Chase wrote: >> You are assuming the system is not localized, that won't work if you >> distribute your applications internationally. In my system it is not >> "Desktop", it is "Escritorio", and I guess it will vary with every >> locale. Does someone know a way to find out what name does the de

Re: weakrefs and bound methods

2007-10-07 Thread Steven Bethard
Mathias Panzenboeck wrote: > Marc 'BlackJack' Rintsch wrote: >> ``del b`` just deletes the name `b`. It does not delete the object. >> There's still the name `_` bound to it in the interactive interpreter. >> `_` stays bound to the last non-`None` result in the interpreter. > > Actually I have

Re: weakrefs and bound methods

2007-10-07 Thread Steven D'Aprano
On Sun, 07 Oct 2007 16:38:23 +, Michele Simionato wrote: > On Oct 7, 12:26 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > >> Drop all those `__del__()` methods as they prevent the garbage >> collector from collecting "cycles". > > I fully agree and I will add that __del__ methods

Re: newbie swig c++ to python

2007-10-07 Thread whatazor
Now it works, the problem was in the project configuration of the example, that put the directory in Addictional Dependencies while it must be in Addictional Library Directories bye w n 7 Ott, 18:35, whatazor <[EMAIL PROTECTED]> wrote: > Hi all, > I must wrap some c++ code in python with swig. I

Re: weakrefs and bound methods

2007-10-07 Thread Mathias Panzenboeck
Marc 'BlackJack' Rintsch wrote: > ``del b`` just deletes the name `b`. It does not delete the object. > There's still the name `_` bound to it in the interactive interpreter. > `_` stays bound to the last non-`None` result in the interpreter. > Actually I have the opposite problem. The referen

Re: weakrefs and bound methods

2007-10-07 Thread Mathias Panzenboeck
Marc 'BlackJack' Rintsch wrote: > On Sun, 07 Oct 2007 16:51:33 +0200, Mathias Panzenboeck wrote: > >> import weakref >> >> class Wrapper(object): >> def __init__(self,x): >> self.x = weakref.ref(x) >> >> def __call__(self,*args,**kwargs): >> x = self.x() >>

Re: How to create a file on users XP desktop

2007-10-07 Thread Tim Chase
> You are assuming the system is not localized, that won't work if you > distribute your applications internationally. In my system it is not > "Desktop", it is "Escritorio", and I guess it will vary with every > locale. Does someone know a way to find out what name does the desktop > have? I beli

Re: weakrefs and bound methods

2007-10-07 Thread Michele Simionato
On Oct 7, 12:26 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > Drop all those `__del__()` methods as they prevent the garbage collector > from collecting "cycles". I fully agree and I will add that __del__ methods are always a bad idea. Also notice that recently Raymond Hetting said in

newbie swig c++ to python

2007-10-07 Thread whatazor
Hi all, I must wrap some c++ code in python with swig. I try the swig examples for VC++ , but when I build the project it gives me that error: example fatal error LNK1181: cannot open input file 'C:\Programmi \Python25\libs.obj' Any idea? thank you w -- http://mail.python.org/mailman/listinfo/

Re: Top Programming Languages of 2013

2007-10-07 Thread Byung-Hee HWANG
On Sun, 2007-10-07 at 17:54 +0200, Wildemar Wildenburger wrote: > Kay Schluehr wrote: > > On Oct 7, 8:05 am, Dick Moores <[EMAIL PROTECTED]> wrote: > >> > >> > >> Dick Moores > > > > Despite my doubts that Ajax and .NET will be programming languages i

Re: Top Programming Languages of 2013

2007-10-07 Thread John Nagle
Alan Gauld wrote: > > "Dick Moores" <[EMAIL PROTECTED]> wrote >> >> > > Interesting, but I'm not sure what the criteria for "top" is. > Is it a measure of power, popularity, usage? > > Scary that HTML/CSS should be so high though given its not a pro

Re: weakrefs and bound methods

2007-10-07 Thread Marc 'BlackJack' Rintsch
On Sun, 07 Oct 2007 16:51:33 +0200, Mathias Panzenboeck wrote: > import weakref > > class Wrapper(object): > def __init__(self,x): > self.x = weakref.ref(x) > > def __call__(self,*args,**kwargs): > x = self.x() > if x is None: >

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread Michele Simionato
On Oct 7, 11:31 am, Istvan Albert <[EMAIL PROTECTED]> wrote: > IMO this is not as much a framework comparison rather than an > evaluation of the individual components that make up Pylons. More in general let's say that I am interested in the evaluation of WSGI-compatible components. > The framewo

Re: How to create a file on users XP desktop

2007-10-07 Thread [EMAIL PROTECTED]
On Oct 7, 1:24 am, Scott David Daniels <[EMAIL PROTECTED]> wrote: > goldtech wrote: > > ... I want the new file's location to be on the user's desktop in > > a Windows XP environment > > How about: > import os.path > handle = open(os.path.expanduser(r'~\DeskTop\somefile.txt'), 'w') >

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 6:04 pm, Bruno Desthuilliers wrote: > MarkyMarc a écrit : > (snip) > > > It was simply to make a point. But then lets say the to files looks > > like this: > > > *** > > atest.py: > > > def printA(): > > print "This is Atest from Apack" > > **

Re: tkinter question

2007-10-07 Thread Kevin Walzer
Kevin Walzer wrote: > Well, I guess it depends on your viewpoint. I find "pack" flexible > because it allows me to think in terms of top, bottom, right, and left > in terms of arranging UI elements--it's an elegant way to do it in my > view. I tend to use "grid" if I have, say, a window with se

Re: tkinter question

2007-10-07 Thread Kevin Walzer
Hendrik van Rooyen wrote: > "Kevin Walzer" <[EMAIL PROTECTED]> wrote: > >> I find "pack" to be more flexible than "grid," so I prefer it for >> complex layouts. "grid" is better for simple layouts. > > *does a double take* are you serious? - my experience is that > pack is only good for simple

Re: Top Programming Languages of 2013

2007-10-07 Thread [EMAIL PROTECTED]
On Oct 7, 11:00?am, [EMAIL PROTECTED] wrote: > On Oct 7, 11:54 am, Wildemar Wildenburger > > > > > > <[EMAIL PROTECTED]> wrote: > > Kay Schluehr wrote: > > > On Oct 7, 8:05 am, Dick Moores <[EMAIL PROTECTED]> wrote: > > >> > > > >> Dick Moores > > > >

Re: Newbie packages Q

2007-10-07 Thread Bruno Desthuilliers
MarkyMarc a écrit : (snip) > It was simply to make a point. But then lets say the to files looks > like this: > > *** > atest.py: > > def printA(): > print "This is Atest from Apack" > *** > btest.py: > from Test.apack import atest

Re: Pil image module, "mode" bug..

2007-10-07 Thread Abandoned
On Oct 7, 4:47 pm, Michal Bozon <[EMAIL PROTECTED]> wrote: > On Sun, 07 Oct 2007 06:03:06 -0700, Abandoned wrote: > > Hi.. > > I find the picture color with: > > im=Image.open("/%s" %name) > > color=im.mode #p=black & beyaz rgb=color L=grey > > > This usually work true but in these pictures: > >h

Re: Top Programming Languages of 2013

2007-10-07 Thread chris . monsanto
On Oct 7, 11:54 am, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > Kay Schluehr wrote: > > On Oct 7, 8:05 am, Dick Moores <[EMAIL PROTECTED]> wrote: > >> > > >> Dick Moores > > > Despite my doubts that Ajax and .NET will be programming languages in

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 5:49 pm, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > MarkyMarc wrote: > > *** > > atest.py: > > > def printA(): > > print "This is Atest from Apack" > > *** > > btest.py: > > from Test.apack import atest > > > def pri

Re: Override 'and' and 'or'

2007-10-07 Thread Diez B. Roggisch
Kay Schluehr schrieb: > On Oct 7, 4:48 pm, Dekker <[EMAIL PROTECTED]> wrote: >> On 7 Okt., 16:19, Steven D'Aprano <[EMAIL PROTECTED] >> >> cybersource.com.au> wrote: >>> On Sun, 07 Oct 2007 13:52:15 +, Dekker wrote: Is it possible to override 'and' and/or 'or'? >>> Not without hacking the

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Wildemar Wildenburger <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > >> While I agree that the word "free" implies "free of monetary cost" to >> many people societies, that is by no means set in stone (talk to native >> americans, blacks, jews, palestinians,

Re: Top Programming Languages of 2013

2007-10-07 Thread Wildemar Wildenburger
Kay Schluehr wrote: > On Oct 7, 8:05 am, Dick Moores <[EMAIL PROTECTED]> wrote: >> >> >> Dick Moores > > Despite my doubts that Ajax and .NET will be programming languages in > 2013 a more interesting question is: what could push Python forward > s.t.

Re: ANN: Pyrex 0.9.6

2007-10-07 Thread Diez B. Roggisch
Colin J. Williams schrieb: > Greg Ewing wrote: >> Pyrex 0.9.6 is now available: >> >>http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ >> >> There is a *lot* of new stuff in this version, too much >> to fit into this announcement. Read all about it here: >> >> >> http://www.cosc.canterbu

Re: Newbie packages Q

2007-10-07 Thread Wildemar Wildenburger
MarkyMarc wrote: > *** > atest.py: > > def printA(): > print "This is Atest from Apack" > *** > btest.py: > from Test.apack import atest > > def printB(): > print "This is Btest from Bpack" > > def printatest(): > p

Re: Top Programming Languages of 2013

2007-10-07 Thread Kay Schluehr
On Oct 7, 8:05 am, Dick Moores <[EMAIL PROTECTED]> wrote: > > > Dick Moores Despite my doubts that Ajax and .NET will be programming languages in 2013 a more interesting question is: what could push Python forward s.t. it eats such a large piece of th

Re: Override 'and' and 'or'

2007-10-07 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : > On Sun, 07 Oct 2007 16:24:35 +0200, Wildemar Wildenburger wrote: > >> Wildemar Wildenburger wrote: >>> [whate everyone else wrote :(] >>> >>> /W >> Dangit! 4th of 4. >> Gotta type quicker. > > > That's okay, in two weeks time there will be 139 messages in this thread,

Re: Override 'and' and 'or'

2007-10-07 Thread Kay Schluehr
On Oct 7, 4:48 pm, Dekker <[EMAIL PROTECTED]> wrote: > On 7 Okt., 16:19, Steven D'Aprano <[EMAIL PROTECTED] > > cybersource.com.au> wrote: > > On Sun, 07 Oct 2007 13:52:15 +, Dekker wrote: > > > Is it possible to override 'and' and/or 'or'? > > > Not without hacking the Python source code, in w

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 5:22 pm, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > MarkyMarc wrote: > > On Oct 7, 4:24 pm, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > >> MarkyMarc a écrit : > >> import is a statement. It's executed, like any other top-level code, > >> when the module is imported (or the

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread Istvan Albert
IMO this is not as much a framework comparison rather than an evaluation of the individual components that make up Pylons. The framework is the sum of all its parts. Programmers should not need to know that that a package named Beaker is used for sessions, Routes for url mapping, PasteDeploy for

Re: Override 'and' and 'or'

2007-10-07 Thread Wildemar Wildenburger
Dekker wrote: > Well... I have to live with the (binary) __and__, __or__ option and > the user has to write: > > SqlValueInt(4) & SqlValueInt(5) --> SqlOpAnd(SqlValueInt(4), > SqlValueInt(5)) > > Thanks for your input, but __nonzero__ is not of any help in this > case... I want to abuse the "magi

Re: Newbie packages Q

2007-10-07 Thread Wildemar Wildenburger
MarkyMarc wrote: > On Oct 7, 4:24 pm, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> MarkyMarc a écrit : >> import is a statement. It's executed, like any other top-level code, >> when the module is imported (or the script loaded into the interpreter >> if it's called directly). So if A.py impor

Re: Tkinter text widget

2007-10-07 Thread Simon Forman
On Oct 6, 11:18 pm, goldtech <[EMAIL PROTECTED]> wrote: > I thought the "DISABLED" made it so I could not edit it. But it also > makes it so I can not scroll down. If you make the window smaller than > the content then try to put a cursor in there to use up/down arrow you > can't. > > What I want i

Re: weakrefs and bound methods

2007-10-07 Thread Mathias Panzenboeck
When I change the class Wrapper to following, the class Foo works: class Wrapper(object): def __init__(self,x): self.func_name = x.func_name self.x = weakref.ref(x.im_self) def __call__(self,*args,**kwargs): x = self.x()

weakrefs and bound methods

2007-10-07 Thread Mathias Panzenboeck
Hi. I have a problem with weak refs and bound methods. The best explanation for the problem is a short bit of code. I have the three classes Wrapper, Foo and Bar: import weakref class Wrapper(object): def __init__(self,x): self.x = weakref.ref(x) def __call__(sel

Re: Override 'and' and 'or'

2007-10-07 Thread Dekker
On 7 Okt., 16:19, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 07 Oct 2007 13:52:15 +, Dekker wrote: > > Is it possible to override 'and' and/or 'or'? > > Not without hacking the Python source code, in which case what you've got > is no longer Python. > > Why do you w

Re: Override 'and' and 'or'

2007-10-07 Thread Steven D'Aprano
On Sun, 07 Oct 2007 16:24:35 +0200, Wildemar Wildenburger wrote: > Wildemar Wildenburger wrote: >> [whate everyone else wrote :(] >> >> /W > > Dangit! 4th of 4. > Gotta type quicker. That's okay, in two weeks time there will be 139 messages in this thread, it will have devolved into an argume

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 4:24 pm, Bruno Desthuilliers wrote: > MarkyMarc a écrit : > (snip) > > > And the atest and btest, shouldn't they be able to import each > > other?? > > import is a statement. It's executed, like any other top-level code, > when the module is imported (or the script loaded into the interp

Re: Override 'and' and 'or'

2007-10-07 Thread Wildemar Wildenburger
Wildemar Wildenburger wrote: > [whate everyone else wrote :(] > > /W Dangit! 4th of 4. Gotta type quicker. /W -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie packages Q

2007-10-07 Thread Bruno Desthuilliers
MarkyMarc a écrit : (snip) > And the atest and btest, shouldn't they be able to import each > other?? import is a statement. It's executed, like any other top-level code, when the module is imported (or the script loaded into the interpreter if it's called directly). So if A.py imports B.py and

Re: Override 'and' and 'or'

2007-10-07 Thread Wildemar Wildenburger
Dekker wrote: > Is it possible to override 'and' and/or 'or'? I cannot find a special > method for it... __and__ and __rand__ and __or__ and __ror__ are for > binary manipulation... any proposals? > > Have marvelous sunday, > Marco > I guess you're looking for __nonzero__() http://docs.python.or

  1   2   >