Re: Feature suggestion -- return if true

2011-04-12 Thread alex23
zildjohn01 wrote: > Regardless of James Mills's coding prowess[...] James is the sole dev of a very handy & elegant event framework: https://bitbucket.org/prologic/circuits/ Can you point out any equivalent achievements so we can compare? And make sure to carry that attitude of smug superiority

Re: Feature suggestion -- return if true

2011-04-12 Thread James Mills
On Wed, Apr 13, 2011 at 1:00 PM, Chris Angelico wrote: > def foo(param): >    resource=malloc(5) # Shtarker, zis is Python! We don't malloc here! >    if not resource: return 0 >    resource[param]=5 >    del resource >    return 1 In Python this can probably be done and perhaps is slightly m

Re: Python-list Digest, Vol 91, Issue 89

2011-04-12 Thread Aman Nijhawan
Sent from my iPhone On Apr 12, 2011, at 8:05 PM, python-list-requ...@python.org wrote: > Send Python-list mailing list submissions to >python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, visit >http://mail.python.org/mailman/listinfo/python-list > or, via email,

Re: Feature suggestion -- return if true

2011-04-12 Thread Chris Angelico
On Wed, Apr 13, 2011 at 12:42 PM, Ethan Furman wrote: > The indentation for return and raise is the next coded line.  List comps and > gen exps are basically uber-functions, and regardless of how you categorize > them when they finish it is easy to see where control goes to next because > of inden

Re: Feature suggestion -- return if true

2011-04-12 Thread Ethan Furman
Steven D'Aprano wrote: On Tue, 12 Apr 2011 16:48:31 -0700, Ethan Furman wrote: Westley Martínez wrote: On Tue, 2011-04-12 at 16:06 -0700, Ethan Furman wrote: --> def func(): --> var1 = something() --> var2 = something_else('this') --> return? var1.hobgle(var2) --> var3 = last_

Re: [Bug / Feature Request] IDLE Shell

2011-04-12 Thread James Mills
On Wed, Apr 13, 2011 at 11:50 AM, rantingrick wrote: > In the IDLE shell when pressing the key combos "Control+Up" and > "Control+Down" the insertion cursor should jump to the nearest prompt > (>>>) above or below it's current position respectively. > > Note: In the Editor Window of IDLE the curre

[Bug / Feature Request] IDLE Shell

2011-04-12 Thread rantingrick
Hello folks, In the IDLE shell when pressing the key combos "Control+Up" and "Control+Down" the insertion cursor should jump to the nearest prompt (>>>) above or below it's current position respectively. Note: In the Editor Window of IDLE the current behavior is for the insertion cursor to jump

Re: Can not uninstall activepython. Missing msi ?

2011-04-12 Thread Sridhar Ratnakumar
Looks like this is resolved for you, http://community.activestate.com/node/6558 On Tue, Apr 12, 2011 at 10:13 AM, goldtech wrote: > Hi, > > I want to uninstall Active Python 2.6.2.2 and upgrade. Certain things > are not working and it's probably time to upgrade anyway. When I try > to uninstall i

Re: [OT] Free software versus software idea patents

2011-04-12 Thread geremy condra
On Tue, Apr 12, 2011 at 4:56 PM, Steven D'Aprano wrote: > That would be a patent on a business process, which is allowed. In fact, > as I recall, at least one lawyer has made an attempt to patent a business > process relating to law. IBM tried patenting the business of patent trolling, which

Re: Feature suggestion -- return if true

2011-04-12 Thread Steven D'Aprano
On Tue, 12 Apr 2011 16:48:31 -0700, Ethan Furman wrote: > Westley Martínez wrote: >> On Tue, 2011-04-12 at 16:06 -0700, Ethan Furman wrote: >>> --> def func(): >>> --> var1 = something() >>> --> var2 = something_else('this') --> return? >>> var1.hobgle(var2) >>> --> var3 = last_res

Re: [OT] Free software versus software idea patents

2011-04-12 Thread Steven D'Aprano
On Tue, 12 Apr 2011 13:43:00 -0400, Terry Reedy wrote: > Anyone here who does not understand how absurd software patents can get > should contemplate the following (based on a real patent from about 20 > years ago, when CDroms were new. > > A Methods for Ensuring that the Correct CDROM is in the

Re: [OT] Free software versus software idea patents

2011-04-12 Thread Steven D'Aprano
On Tue, 12 Apr 2011 13:37:08 -0600, Ian Kelly wrote: > There is at least one method of measuring it without resorting to sales > figures: logging user-agent data from web browsers. Is it perfectly > accurate? Of course not. But there are a number of different > organizations that do this, sampl

Re: Feature suggestion -- return if true

2011-04-12 Thread Ethan Furman
Westley Martínez wrote: On Tue, 2011-04-12 at 16:06 -0700, Ethan Furman wrote: --> def func(): --> var1 = something() --> var2 = something_else('this') --> return? var1.hobgle(var2) --> var3 = last_resort(var1) --> return var3.wiglat(var2) The question mark makes the progra

Re: Feature suggestion -- return if true

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 16:06 -0700, Ethan Furman wrote: > James Mills wrote: > > Are we done with this discussion yet ? :) > > *sigh* It was a slow day yesterday and I have > > a funny feeling it's going to be the same today! > > > > Regardless of anyone's subjective opinions as to what > > was cle

Re: Feature suggestion -- return if true

2011-04-12 Thread James Mills
On Wed, Apr 13, 2011 at 9:06 AM, Ethan Furman wrote: > I think I see your point -- the OP said: > -->    _temp = expr > -->    if _temp: return _temp > > which is where you're getting > -->    return _temp or None > > However, most everyone ('cept you, it seems! ;) understood that there would > be

Re: Free software versus software idea patents

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 11:13 -0700, geremy condra wrote: > On Tue, Apr 12, 2011 at 10:48 AM, CM wrote: > >> I don't even know one person who has Win7 installed, running, and likes > >> it... > >> not even one. > > > > Hi, m harris, nice to meet you. Now you do. > > > > To the online community:

Re: Feature suggestion -- return if true

2011-04-12 Thread Ethan Furman
James Mills wrote: Are we done with this discussion yet ? :) *sigh* It was a slow day yesterday and I have a funny feeling it's going to be the same today! Regardless of anyone's subjective opinions as to what was clear - I still stand by what I said. I think I see your point -- the OP said: -

Re: Feature suggestion -- return if true

2011-04-12 Thread Chris Angelico
On Wed, Apr 13, 2011 at 8:45 AM, Westley Martínez wrote: >> I don't think that this is equivalent. The OP's original idea doesn't >> involve a loop, but this does - how could that be equivalent? > > Not OP's idea, Angelico's. I didn't actually advocate a loop, but that method could work too. It a

Re: OT] Free software versus software idea patents

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 15:38 +0100, wisecrac...@tesco.net wrote: > Hi Westley... > > > The pre-builts from Best Buy that get reloaded, reloaded with what? I > > live in California, the center of software development. I only know one > > person who uses Linux, and they only use it for work (he doe

Re: Testing changes to Python code on the fly: reload() + alternatives?

2011-04-12 Thread Terry Reedy
On 4/12/2011 3:26 PM, Keith wrote: 1) Is it possible to reload a class using the reload() method? Yes, but instances of the old version will remain instances of the old version, which will not go away until all its instances and other references go away. So reload is deceptive, which is why

Re: Feature suggestion -- return if true

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 07:58 -0700, scattered wrote: > On Apr 12, 10:05 am, Westley Martínez wrote: > > On Tue, 2011-04-12 at 12:44 +1000, Chris Angelico wrote: > > > On Tue, Apr 12, 2011 at 12:20 PM, James Mills > > > wrote: > > > > On Tue, Apr 12, 2011 at 12:18 PM, Jason Swails > > > > wrote:

Re: Feature suggestion -- return if true

2011-04-12 Thread James Mills
On Wed, Apr 13, 2011 at 6:26 AM, Chris Rebert wrote: > Paraphrasing liberally from his review of Far Cry 2: > "Letting the [programmer] create their own [language constructs is] > always done at the expense of proper [orthogonality, elegance, and > coherence]. Maybe sometimes I don't want to creat

Re: download web pages that are updated by ajax

2011-04-12 Thread Jabba Laci
> I've heard you can drive a web browser using Selenium > (http://code.google.com/p/selenium/ ), have it visit the webpage and > run the JavaScript on it, and then grab the final result. Hi, Thanks for the info. I tried selenium, you can get the source with the get_html_source() function but it r

Re: Copy-on-write when forking a python process

2011-04-12 Thread jac
Heiko, Thank you for pointing out POSH. I have used some of python's other shared memory facilities, but was completely unaware of POSH, it seems nice. Also, I agree that shared memory would solve the use-case I outlined above, but it is not hard to imagine a slightly different case where the chil

Re: [OT] Free software versus software idea patents

2011-04-12 Thread Ian Kelly
On Tue, Apr 12, 2011 at 2:51 PM, Dan Stromberg wrote: > This data is of course skewed a bit toward computers that people are > using web browsers on. Right, Linux servers are most likely underrepresented. At best the data indicates what the population at large is using on their desktops. > Also

Re: [OT] Free software versus software idea patents

2011-04-12 Thread Dan Stromberg
On Tue, Apr 12, 2011 at 12:37 PM, Ian Kelly wrote: > On Tue, Apr 12, 2011 at 3:22 AM, harrismh777 wrote: >> It is not measured in any way, and it is almost impossible to determine >> therefore in any accurate fashion. There >> really are no data... what we need here is a census of sorts. > > The

Re: Feature suggestion -- return if true

2011-04-12 Thread Chris Rebert
On Tue, Apr 12, 2011 at 11:00 AM, Teemu Likonen wrote: > * 2011-04-12T10:27:55+10:00 * James Mills wrote: >> On Tue, Apr 12, 2011 at 9:17 AM, zildjohn01 wrote: >>> This is an idea I've had bouncing around in my head for a long time >>> now. I propose the following syntax: >> >> Maybe this is more

Re: drawing polygons in Google Earth using wxpython

2011-04-12 Thread zoolbool
On Mar 20, 10:20 pm, "!!AhmedLegend!!" wrote: > ...i am working on my graduation project and i need to draw some > polygons in Google Earth map automatically using python so any one was > subjected to something like that or have a solution plz respond > ASAP ...given that i was able to open Google

Re: Feature suggestion -- return if true

2011-04-12 Thread Neil Cerutti
On 2011-04-12, Neil Cerutti wrote: > On 2011-04-12, Ian Kelly wrote: >> Flow-control macros were suggested as part of PEP 343, but >> they were rejected by Guido based on this rant: >> >> http://blogs.msdn.com/b/oldnewthing/archive/2005/01/06/347666.aspx > > Flow control macros don't seem to crea

Re: Feature suggestion -- return if true

2011-04-12 Thread Neil Cerutti
On 2011-04-12, Ian Kelly wrote: > Flow-control macros were suggested as part of PEP 343, but they > were rejected by Guido based on this rant: > > http://blogs.msdn.com/b/oldnewthing/archive/2005/01/06/347666.aspx Flow control macros don't seem to create problems that exceptions didn't already cr

Re: Help with regex needed

2011-04-12 Thread D'Arcy J.M. Cain
On Tue, 12 Apr 2011 22:11:55 +0300 Yuri Slobodyanyuk wrote: > Thanks for the insight, while this code will run once a week and > optimization isn't really a must here, it is > still a good idea not to leave half-baked code behind me, especially given > that it will be running on this server for

Re: Free software versus software idea patents

2011-04-12 Thread Terry Reedy
On 4/12/2011 2:44 PM, Dan Stromberg wrote: On Tue, Apr 12, 2011 at 10:32 AM, Terry Reedy wrote: On 4/11/2011 4:36 AM, rusi wrote: http://www.cse.uconn.edu/~dqg/papers/cie05.pdf may be of interest (and also other papers of Peter Wegner questioning the universality of Turing machines lambda ca

Re: [OT] Free software versus software idea patents

2011-04-12 Thread Ian Kelly
On Tue, Apr 12, 2011 at 3:22 AM, harrismh777 wrote: >    This is very difficult... and I'm not dodging the ball here... its just > the truth. The 'market share' data are bogus. Reason? ... because the free > software 'market' is not a market. This is just word-play. It has no bearing on the accu

Re: Signal on qt

2011-04-12 Thread Rafael Durán Castañeda
I don't know what are you trying with this for, but I think you may be connecting signal to a combo_test and after that changing combo_test, losing connection, but I'm not really sure. Anyway, this is a python list for PyQt (I think you are using it) you should ask in PyQt list. 2011/4/12 luca72

Testing changes to Python code on the fly: reload() + alternatives?

2011-04-12 Thread Keith
Hi all, I have a couple of questions that I was hoping people might be able to provide suggestions on. 1) Is it possible to reload a class using the reload() method? For instance, suppose you have the following files: my_module/ __init__.py MyClass.py #init.py from MyClass import MyClass

Re: Feature suggestion -- return if true

2011-04-12 Thread Terry Reedy
On 4/12/2011 2:25 PM, zildjohn01 wrote: Wow. Two dozen replies, the majority of which are arguing over whether the end of my snippet is reachable. I thought the behavior of if statements was well-established by this point. Regardless of James Mills's coding prowess, I suppose I should follow his

Re: Help with regex needed

2011-04-12 Thread Yuri Slobodyanyuk
Thanks for the insight, while this code will run once a week and optimization isn't really a must here, it is still a good idea not to leave half-baked code behind me, especially given that it will be running on this server for the next 13 years ;) I have one doubt though . Doesn't using the lis

Re: Feature suggestion -- return if true

2011-04-12 Thread Paul Rudin
Teemu Likonen writes: > I'm a simple Lisp guy who wonders if it is be possible to add some kind > of macros to the language... As a (now somewhat lapsed) long-time lisp programmer I sympathise with the sentiment, but suspect that it's not going to gain serious traction in python circles. -- htt

Re: OOP only in modules

2011-04-12 Thread Andrea Crotti
newpyth writes: > Hi Andrea, > excuse my beeing criptic (you wrote: "I have some troubles > understanding what you mean") but I coudn't to go on too long. > Now I can conclude my speech... > When I was younger I transformed a big Clipper program in > simil-C in order to apply cflow... and I succe

Re: Free software versus software idea patents

2011-04-12 Thread Dan Stromberg
On Tue, Apr 12, 2011 at 10:32 AM, Terry Reedy wrote: > On 4/11/2011 4:36 AM, rusi wrote: > >> http://www.cse.uconn.edu/~dqg/papers/cie05.pdf >> >> may be of interest (and also other papers of Peter Wegner questioning >> the universality of Turing machines lambda calculus etc) > > Thank you for tha

Re: download web pages that are updated by ajax

2011-04-12 Thread Chris Rebert
On Tue, Apr 12, 2011 at 7:47 AM, Jabba Laci wrote: > Hi, > > I want to download a web page that is updated by AJAX. The page > requires no human interaction, it is updated automatically: > http://www.ncbi.nlm.nih.gov/nuccore/CP002059.1 > > If I download it with wget, I get a file of size 97 KB. Th

Re: Feature suggestion -- return if true

2011-04-12 Thread Ian Kelly
On Tue, Apr 12, 2011 at 12:25 PM, Ian Kelly wrote: > On Tue, Apr 12, 2011 at 12:00 PM, Teemu Likonen wrote: >> I'm a simple Lisp guy who wonders if it is be possible to add some kind >> of macros to the language. Then features like this could be added by >> anybody. Lisp people do this all the ti

Re: Feature suggestion -- return if true

2011-04-12 Thread zildjohn01
Wow. Two dozen replies, the majority of which are arguing over whether the end of my snippet is reachable. I thought the behavior of if statements was well-established by this point. Regardless of James Mills's coding prowess, I suppose I should follow his advice and repost this to the python-idea

Re: Feature suggestion -- return if true

2011-04-12 Thread Ian Kelly
On Tue, Apr 12, 2011 at 12:00 PM, Teemu Likonen wrote: > I'm a simple Lisp guy who wonders if it is be possible to add some kind > of macros to the language. Then features like this could be added by > anybody. Lisp people do this all the time and there is no need for > feature requests or any dis

Re: Free software versus software idea patents

2011-04-12 Thread geremy condra
On Tue, Apr 12, 2011 at 10:48 AM, CM wrote: >>  I don't  even know one person who has Win7 installed, running, and likes >>it... >> not even one. > > Hi, m harris, nice to meet you.  Now you do. > > To the online community:  Is there a name for trolling for A by > advocating for not-A in a way th

Re: [even more OT than before] Arithmetic [was Free software versus software idea patents]

2011-04-12 Thread geremy condra
On Tue, Apr 12, 2011 at 4:34 AM, Steven D'Aprano wrote: > On Mon, 11 Apr 2011 15:55:37 -0700, geremy condra wrote: > > >>> Ah, I didn't know that! How wonderful! But in any case, Presburger >>> arithmetic is much weaker than even Peano arithmetic. >>> >>> http://en.wikipedia.org/wiki/Presburger_ar

Re: Feature suggestion -- return if true

2011-04-12 Thread Teemu Likonen
* 2011-04-12T10:27:55+10:00 * James Mills wrote: > On Tue, Apr 12, 2011 at 9:17 AM, zildjohn01 wrote: >> This is an idea I've had bouncing around in my head for a long time >> now. I propose the following syntax: > > Maybe this is more appropriare for the python-ideas list ? > >>    return? expr

Re: Dump interpreter history?

2011-04-12 Thread Terry Reedy
On 4/12/2011 12:12 PM, Aahz wrote: In article, Terry Reedy wrote: Idle will save the contents of the shell window, including opening slash line and prompts. The problem is that normally you *don't* want the prompts. I believe IPython handles that. I have already had in mind that IDLE sho

Re: Free software versus software idea patents

2011-04-12 Thread CM
>  I don't even know one person who has Win7 installed, running, and likes >it... > not even one.   Hi, m harris, nice to meet you. Now you do. To the online community: Is there a name for trolling for A by advocating for not-A in a way that discredits your point of view an case so that A now

Re: [OT] Free software versus software idea patents

2011-04-12 Thread Terry Reedy
On 4/12/2011 4:15 AM, harrismh777 wrote: Anyone here who does not understand how absurd software patents can get should contemplate the following (based on a real patent from about 20 years ago, when CDroms were new. A Methods for Ensuring that the Correct CDROM is in the CDROM drive. While

Re: Free software versus software idea patents

2011-04-12 Thread Terry Reedy
On 4/11/2011 4:36 AM, rusi wrote: http://www.cse.uconn.edu/~dqg/papers/cie05.pdf may be of interest (and also other papers of Peter Wegner questioning the universality of Turing machines lambda calculus etc) Thank you for that reference. In summary, it says that while Turing machine are univ

Re: OOP only in modules

2011-04-12 Thread Adam Tauno Williams
On Tue, 2011-04-12 at 08:33 -0700, newpyth wrote: > """ call tree w/o classes and objects: > E() #~15 called from #~35 > +-- F() #~1816 > |+-- raw_input('Addressed to ') # called from 19 > +-- G()

Re: 3.2: email.message.get_payload() delivers str, but send_message expect bytes

2011-04-12 Thread Axel Rau
On 08.04.11 13:43, Axel Rau wrote: > line 167, in sub > return _compile(pattern, flags).sub(repl, string, count) > TypeError: sequence item 1: expected bytes, str found I just filed issue 11837. Axel -- http://mail.python.org/mailman/listinfo/python-list

Can not uninstall activepython. Missing msi ?

2011-04-12 Thread goldtech
Hi, I want to uninstall Active Python 2.6.2.2 and upgrade. Certain things are not working and it's probably time to upgrade anyway. When I try to uninstall it says "missing msi". Before I delete all the folders and clean the registry out is there something I can try to have a normal or more grace

Re: [OT] Free software versus software idea patents

2011-04-12 Thread geremy condra
On Tue, Apr 12, 2011 at 1:15 AM, harrismh777 wrote: > geremy condra wrote: >>> >>>    Software is another sort of animal entirely. Because software is not >>> just >>> >  based on mathematics--- IT IS mathematics. > >> I am extremely skeptical of this argument. > >     ... as are a great number of

Re: argparse and default for FileType

2011-04-12 Thread Paolo Elvati
> Open up a bug report on the Python bug tracker and assign it to the user > "bethard", who is the author of argparse. He's usually pretty responsive. Thank you for the answer, I will. Paolo -- http://mail.python.org/mailman/listinfo/python-list

Re: Dump interpreter history?

2011-04-12 Thread Aahz
In article , Terry Reedy wrote: >On 4/11/2011 11:54 AM, Aahz wrote: >> In article, >> Ken D'Ambrosio wrote: >>> >>> Hey, all. A co-worker asked me a question, and I've got no idea how (or >>> if) it can be done. Bottom line: he'd like to save off the text from an >>> interpreter session, his t

Re: threading.Semaphore (quite long)

2011-04-12 Thread Aahz
In article , Thomas Rachel wrote: > >I want to implement an alternative concept to worker threads processing >a job queue. The alternative consists of threads being the jobs >themselves and thus running only this one job. The job threads are >started after a Semaphore's acquire() "giving the

Re: Free software versus software idea patents (was: Python benefits over Cobra)

2011-04-12 Thread sturlamolden
On 7 apr, 09:39, Steven D'Aprano wrote: > It's astonishing how anti-Mono FUD just won't die. (Something can be > true, and still FUD. "Oh no, people might *choke* on a peanut, or have an > allergic reaction, we must label every piece of food May Contain Nuts > just in case, because you never know

Re: OOP only in modules

2011-04-12 Thread newpyth
Hi Andrea, excuse my beeing criptic (you wrote: "I have some troubles understanding what you mean") but I coudn't to go on too long. Now I can conclude my speech... When I was younger I transformed a big Clipper program in simil-C in order to apply cflow... and I succeeded... but Clipper wasn't OO!

Re: Feature suggestion -- return if true

2011-04-12 Thread Mel
Paul Rubin wrote: > zildjohn01 writes: >> _temp = expr >> if _temp: return _temp > > I'm trying to figure out a context where you'd even want that, and I'm > thinking that maybe it's some version of a repeat-until loop? Python > doesn't have repeat-until and it's been proposed a few tim

Re: OT] Free software versus software idea patents

2011-04-12 Thread wisecracker
Hi Westley... > The pre-builts from Best Buy that get reloaded, reloaded with what? I > live in California, the center of software development. I only know one > person who uses Linux, and they only use it for work (he doesn't even > live in CA anymore). I have say your delusions about the use

Re: Feature suggestion -- return if true

2011-04-12 Thread scattered
On Apr 12, 10:05 am, Westley Martínez wrote: > On Tue, 2011-04-12 at 12:44 +1000, Chris Angelico wrote: > > On Tue, Apr 12, 2011 at 12:20 PM, James Mills > > wrote: > > > On Tue, Apr 12, 2011 at 12:18 PM, Jason Swails > > > wrote: > > >> This is only true if n < 5.  Otherwise, the first returns

download web pages that are updated by ajax

2011-04-12 Thread Jabba Laci
Hi, I want to download a web page that is updated by AJAX. The page requires no human interaction, it is updated automatically: http://www.ncbi.nlm.nih.gov/nuccore/CP002059.1 If I download it with wget, I get a file of size 97 KB. The source is full of AJAX calls, i.e. the content of the page is

Re: Feature suggestion -- return if true

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 12:44 +1000, Chris Angelico wrote: > On Tue, Apr 12, 2011 at 12:20 PM, James Mills > wrote: > > On Tue, Apr 12, 2011 at 12:18 PM, Jason Swails > > wrote: > >> This is only true if n < 5. Otherwise, the first returns None and the > >> second returns False. > > > > Which is

Re: dict.setdefault()

2011-04-12 Thread Westley Martínez
On Mon, 2011-04-11 at 19:58 -0700, rantingrick wrote: > > > >>> dict.update(D, cobblerexistingkeys=False) Fix'd Much yummier now. -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature suggestion -- return if true

2011-04-12 Thread Colin J. Williams
On 12-Apr-11 06:55 AM, scattered wrote: On Apr 12, 2:21 am, James Mills wrote: On Tue, Apr 12, 2011 at 4:08 PM, Nobody wrote: It should be abundantly clear that this only returns if the expression is considered true, otherwise it continues on to the following statements. Uggh come on guys.

Re: [OT] Free software versus software idea patents

2011-04-12 Thread Westley Martínez
On Tue, 2011-04-12 at 04:22 -0500, harrismh777 wrote: > Ian Kelly wrote: > >> > The desktop > >> > is all that is left... and that is dying... rapidly. Their lockin is > >> > well > >> > entrenched (like Borg implants ) but the number of mom& pops ( like my > >> > entire extended family, for

Re: Feature suggestion -- return if true

2011-04-12 Thread Grant Edwards
On 2011-04-12, James Mills wrote: > On Tue, Apr 12, 2011 at 4:08 PM, Nobody wrote: >> It should be abundantly clear that this only returns if the expression is >> considered true, otherwise it continues on to the following statements. > > Uggh come on guys. We've been over this. > You cannot make

Re: Feature suggestion -- return if true

2011-04-12 Thread Grant Edwards
On 2011-04-12, James Mills wrote: > On Tue, Apr 12, 2011 at 12:44 PM, Chris Angelico wrote: >> That's still not equivalent. "return expr or None" will always >> terminate the function. The OP's request was for something which would >> terminate the function if and only if expr is non-false. > > T

Re: Feature suggestion -- return if true

2011-04-12 Thread Grant Edwards
On 2011-04-12, James Mills wrote: > On Tue, Apr 12, 2011 at 12:18 PM, Grant Edwards > wrote: >> You stated that >> >> ??return? >> >> was equivalent to >> >> ??return or None > > This is _not_ what I said. > > Quoting from my earlier post: > > """ >>return? expr > > This syntax does not fi

Re: Feature suggestion -- return if true

2011-04-12 Thread John Roth
On Apr 12, 12:58 am, Paul Rubin wrote: > zildjohn01 writes: > >     _temp = expr > >     if _temp: return _temp > > I'm trying to figure out a context where you'd even want that, and I'm > thinking that maybe it's some version of a repeat-until loop?  Python > doesn't have repeat-until and it's b

Re: Help with regex needed

2011-04-12 Thread D'Arcy J.M. Cain
On Tue, 12 Apr 2011 15:06:25 +0300 Yuri Slobodyanyuk wrote: > Thanks everybody , and especially Chris - i used split and it took me 15 > mins to make it work :) That's great. One thing though... > for nnn in hhh: > if nnn.split()[2] == str(time_tuple[1]).strip(' \t\n\r') and > nnn.split()

Re: Help with regex needed

2011-04-12 Thread Yuri Slobodyanyuk
Thanks everybody , and especially Chris - i used split and it took me 15 mins to make it work :) The final version looks like: from datetime import datetime, date, time today_day = datetime.now() time_tuple= today_day.timetuple() hhh = open("file_with_data.data",'r') for nnn in hhh: if nnn.sp

Re: [even more OT than before] Arithmetic [was Free software versus software idea patents]

2011-04-12 Thread Steven D'Aprano
On Mon, 11 Apr 2011 15:55:37 -0700, geremy condra wrote: >> Ah, I didn't know that! How wonderful! But in any case, Presburger >> arithmetic is much weaker than even Peano arithmetic. >> >> http://en.wikipedia.org/wiki/Presburger_arithmetic >> >> So, let me re-phrase my statement... in any realis

Off to Europython?

2011-04-12 Thread Tom Christie
For anyone who's off to EuroPython this year and already has their ticket - please take a quick look at my talk proposal "Introducing Django REST framework" and consider giving it your vote. Here: http://goo.gl/cntAj The biggest take away from the talk will be why I think it's hugely important

Re: Feature suggestion -- return if true

2011-04-12 Thread scattered
On Apr 12, 2:21 am, James Mills wrote: > On Tue, Apr 12, 2011 at 4:08 PM, Nobody wrote: > > It should be abundantly clear that this only returns if the expression is > > considered true, otherwise it continues on to the following statements. > > Uggh come on guys. We've been over this. > You cann

Re: Feature suggestion -- return if true

2011-04-12 Thread Steven D'Aprano
On Tue, 12 Apr 2011 16:21:43 +1000, James Mills wrote: > On Tue, Apr 12, 2011 at 4:08 PM, Nobody wrote: >> It should be abundantly clear that this only returns if the expression >> is considered true, otherwise it continues on to the following >> statements. > > Uggh come on guys. We've been ove

Signal on qt

2011-04-12 Thread luca72
hello i have this: def mytest(self): for a in xrange(self.tableWidget.rowCount()): self.combo_test = QtGui.QComboBox() self.connect(self.combo_test, QtCore.SIGNAL("currentIndexChanged(int)"), self.metto_test) self.combo_test.addItems(self.lista_def)

full reload of fastcgi

2011-04-12 Thread Robin Becker
A recent problem with a fastcgi script leads me to ask if there's any well defined way to fully reload a python fastcgi process. I know that people do tricks like unloading/reloading all modules, but it seems there's no obvious way to get python to restart itself. I believe that the server is ap

Re: [OT] Free software versus software idea patents

2011-04-12 Thread harrismh777
Ian Kelly wrote: > The desktop > is all that is left... and that is dying... rapidly. Their lockin is well > entrenched (like Borg implants ) but the number of mom& pops ( like my > entire extended family, for instance) who are moving to Ubuntu (themselves) > is astounding! It will not be l

Help with pygtk About Dialog

2011-04-12 Thread pradeepbpin
How can I use a png/jpeg/gif image file to set the logo in gtk.AboutDiaog box of pyGTK ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Free software versus software idea patents

2011-04-12 Thread harrismh777
rusi wrote: From http://www.cse.uconn.edu/~dqg/papers/cie05.pdf may be of interest (and also other papers of Peter Wegner questioning the universality of Turing machines lambda calculus etc) This is very interesting indeed. see: http://en.wikipedia.org/wiki/

Re: [OT] Free software versus software idea patents

2011-04-12 Thread harrismh777
geremy condra wrote: Software is another sort of animal entirely. Because software is not just > based on mathematics--- IT IS mathematics. I am extremely skeptical of this argument. ... as are a great number of other people; corporations, lawyers, venture capitalists, SPAM SPAM S

Hello Friends

2011-04-12 Thread Ashraf Ali
The most sexiest collection of bollywood. just visit www.hottesthitsbollywood.blogspot.com www.bollywoodhotactresspicz.blogspot.com www.bollywoodhotphotoz.blogspot.com www.bollywoodhotactresswallpapers.blogspot.com www.bollywoodhotwallpaperz.blogspot.com www.onlineshoppingpk.blogspot.com www.bollyw

Re: Free software versus software idea patents

2011-04-12 Thread harrismh777
wisecrac...@tesco.net wrote: Do I have your permission to quote your reply intact in threads where the patent, etc, issues arise, and they often do on other sites. TIA... Feel free, the more folks we have dialoging about this issue, the better for everyone who values freedom. -- http://m

Re: Feature suggestion -- return if true

2011-04-12 Thread Paul Rubin
zildjohn01 writes: > _temp = expr > if _temp: return _temp I'm trying to figure out a context where you'd even want that, and I'm thinking that maybe it's some version of a repeat-until loop? Python doesn't have repeat-until and it's been proposed a few times. -- http://mail.python.org/