Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread alex23
On Saturday, 15 June 2013 02:09:20 UTC+10, Steven D'Aprano wrote: > To everyone else... I know that Nikos' posts are draining. Sometimes he > brings me to the brink of despair too. But if you aren't part of the > solution, you are part of the problem: writing short-tempered, insulting > posts a

Re: Debugging memory leaks

2013-06-14 Thread dieter
Chris Angelico writes: > ... > It's terrible advice in generality, because it encourages a sloppiness > of thinking: "Memory usage doesn't matter, we'll just instruct people > to reset everything now and then". "Memory usage" may matter. But if you loose 1 kb a day, your process can run 3 years

Re: Wrong website loaded when other requested

2013-06-14 Thread Nick the Gr33k
On 14/6/2013 9:45 μμ, Mark Lawrence wrote: On 14/06/2013 17:46, Mark Lawrence wrote: Sure, just give me your password. He actually offered to do just this!!! How stupid can you get? I'm so fed up with his behaviour that I've emailed the Greek Embassy in London pointing out what he's up to.

Re: Newbie: The philosophy behind list indexes

2013-06-14 Thread Peter Otten
Chris Rebert wrote: > On Jun 14, 2013 10:26 PM, wrote: >> What is the thinking behind stopping 'one short' when slicing or >> iterating through lists? > I find Dijkstra's explanation rather convincing: > http://www.cs.utexas.edu/~EWD/transcriptions/EWD08xx/EWD831.html This is the only case whe

Re: Don't feed the troll...

2013-06-14 Thread Denis McMahon
On Fri, 14 Jun 2013 12:32:56 +0300, Nick the Gr33k wrote: > I'mm not trolling man, i just have hard time understanding why numbers > acts as strings. It depends on the context. -- Denis McMahon, denismfmcma...@gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: A few questiosn about encoding

2013-06-14 Thread Denis McMahon
On Fri, 14 Jun 2013 16:58:20 +0300, Nick the Gr33k wrote: > On 14/6/2013 1:14 μμ, Cameron Simpson wrote: >> Normally a character in a b'...' item represents the byte value >> matching the character's Unicode ordinal value. > The only thing that i didn't understood is this line. > First please tel

Re: Memory usage steadily going up while pickling objects

2013-06-14 Thread Peter Otten
Giorgos Tzampanakis wrote: > I have a program that saves lots (about 800k) objects into a shelve > database (I'm using sqlite3dbm for this since all the default python dbm > packages seem to be unreliable and effectively unusable, but this is > another discussion). > > The process takes about 10-

Re: Version Control Software

2013-06-14 Thread Chris Angelico
On Sat, Jun 15, 2013 at 3:39 PM, Tim Delaney wrote: > I can absolutely confirm how much ClearCase slows things down. I completely > refused to use dynamic views for several reasons - #1 being that if you lost > your network connection you couldn't work at all... And that right there is why modern

Re: Newbie: The philosophy behind list indexes

2013-06-14 Thread Chris Angelico
On Sat, Jun 15, 2013 at 3:21 PM, wrote: > What is the thinking behind stopping 'one short' when slicing or iterating > through lists? > > By example; > a=[0,1,2,3,4,5,6] a > [0, 1, 2, 3, 4, 5, 6] a[2:5] > [2, 3, 4] > > To my mind, it makes more sense to go to 5. I'm sure there's a

Re: Version Control Software

2013-06-14 Thread Tim Delaney
On 15 June 2013 06:55, Dave Angel wrote: > On 06/14/2013 10:24 AM, Grant Edwards wrote: > >> On 2013-06-14, Roy Smith wrote: >> >> All that being said, it is, as Anssi points out, a horrible, bloated, >>> overpriced, complicated mess which requires teams of specially >>> trained ClearCase admin

Re: Newbie: The philosophy behind list indexes

2013-06-14 Thread Chris Rebert
On Jun 14, 2013 10:26 PM, wrote: > I bet this is asked quite frequently, however after quite a few hours searching I haven't found an answer. > > What is the thinking behind stopping 'one short' when slicing or iterating through lists? > > By example; > > >>> a=[0,1,2,3,4,5,6] > >>> a > [0, 1, 2,

Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread Larry Hudson
On 06/14/2013 09:56 AM, Nick the Gr33k wrote: On 14/6/2013 7:31 μμ, Steven D'Aprano wrote: On Fri, 14 Jun 2013 16:07:56 +0300, Nick the Gr33k wrote: Returning True is the same thing as returning a variable's truthy value? NO! 'True' and 'False' are the two values of the boolean type. The

Newbie: The philosophy behind list indexes

2013-06-14 Thread ian . l . cameron
I bet this is asked quite frequently, however after quite a few hours searching I haven't found an answer. What is the thinking behind stopping 'one short' when slicing or iterating through lists? By example; >>> a=[0,1,2,3,4,5,6] >>> a [0, 1, 2, 3, 4, 5, 6] >>> a[2:5] [2, 3, 4] To my mind,

NANs [was Re: Eval of expr with 'or' and 'and' within]

2013-06-14 Thread Steven D'Aprano
On Sat, 15 Jun 2013 12:03:08 +1000, Cameron Simpson wrote: > | ... even taking that into account! *wink* | > | Everyone is aware that there is more than one NAN, right? > > I was not. Interesting. > > | If my > | calculations are correct, there are 9007199254740992 distinct float > | NANs in Pyt

Re: Debugging memory leaks

2013-06-14 Thread rusi
On Jun 15, 5:16 am, Ben Finney wrote: > rusi writes: > > On Jun 14, 1:15 am, Giorgos Tzampanakis > > wrote: > > > Am I the only one who thinks this is terrible advice? > > > I would expect a typical desktop app to run for a couple of hours -- > > maybe a couple of days. > > Is a web browser a “t

Re: Don't feed the troll...

2013-06-14 Thread Cameron Simpson
On 15Jun2013 10:42, Ben Finney wrote: | "D'Arcy J.M. Cain" writes: | Even for those who do participate by email, though, your approach is | broken: | > My answer is simple. Get a proper email system that filters out | > duplicates. | | The message sent to the individual typically arrives earlie

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Chris Angelico
On Sat, Jun 15, 2013 at 12:03 PM, Cameron Simpson wrote: > On 15Jun2013 01:34, Steven D'Aprano > wrote: > | Everyone is aware that there is more than one NAN, right? > > I was not. Interesting. > > | If my > | calculations are correct, there are 9007199254740992 distinct float NANs > | in Python

Re: how to use two threads to produce even and odd numbers?

2013-06-14 Thread Steven D'Aprano
On Fri, 14 Jun 2013 04:50:05 -0700, Zoe Wendy wrote: > I am going to compile a small python program in order to use Queue to > produce a random with a thread. For example, using one thread to print > odd number, while another thread to print even number. > > Here is my codes, please offer me som

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Cameron Simpson
On 15Jun2013 01:34, Steven D'Aprano wrote: | On Sat, 15 Jun 2013 00:09:31 +0100, Nobody wrote: | | > On Sat, 15 Jun 2013 03:56:28 +1000, Chris Angelico wrote: | >> With a few random oddities: | > bool(float("nan")) | >> True | >> I somehow expected NaN to be false. Maybe that's just my expec

Re: Memory usage steadily going up while pickling objects

2013-06-14 Thread Dave Angel
On 06/14/2013 07:04 PM, Giorgos Tzampanakis wrote: I have a program that saves lots (about 800k) objects into a shelve database (I'm using sqlite3dbm for this since all the default python dbm packages seem to be unreliable and effectively unusable, but this is another discussion). The process ta

Re: Debugging memory leaks

2013-06-14 Thread Steven D'Aprano
On Fri, 14 Jun 2013 22:57:24 +, Giorgos Tzampanakis wrote: > On 2013-06-14, Steven D'Aprano wrote: > >> On Thu, 13 Jun 2013 20:15:42 +, Giorgos Tzampanakis wrote: >> Therefore: if the leak seems to be small, it may be much more advicable to restart your process periodically (dur

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Steven D'Aprano
On Sat, 15 Jun 2013 00:09:31 +0100, Nobody wrote: > On Sat, 15 Jun 2013 03:56:28 +1000, Chris Angelico wrote: > >> With a few random oddities: >> > bool(float("nan")) >> True >> >> I somehow expected NaN to be false. Maybe that's just my expectations >> that are wrong, though. > > In gener

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Cameron Simpson
On 14Jun2013 12:50, Nikos as SuperHost Support wrote: | I started another thread because the last one was !@#$'ed up by | irrelevant replies and was difficult to jeep track. | | >>> name="abcd" | >>> month="efgh" | >>> year="ijkl" | | >>> print(name or month or year) | abcd | | Can understand t

Re: Don't feed the troll...

2013-06-14 Thread Ben Finney
"D'Arcy J.M. Cain" writes: > The answer is to always make sure that you include the previous poster > in the reply as a Cc or To. Dragging the discussion from one forum (comp.lang.python) to another (every person's individual email) is obnoxious. Please don't. > I have suggested this before but

Re: A few questiosn about encoding

2013-06-14 Thread Cameron Simpson
On 14Jun2013 16:58, Nikos as SuperHost Support wrote: | On 14/6/2013 1:14 μμ, Cameron Simpson wrote: | >Normally a character in a b'...' item represents the byte value | >matching the character's Unicode ordinal value. | | The only thing that i didn't understood is this line. | First please tell

Re: RFD: rename comp.lang.python to comp.support.superhost

2013-06-14 Thread Ben Finney
Gene Heskett writes: > One old (78) farts take on this endless thread is that its a sign that > those who had it made in Greece Please refrain from nationalistic slurs, it is not acceptable in this community. -- \ “If you don't know what your program is supposed to do, you'd | `\

Re: A few questiosn about encoding

2013-06-14 Thread Cameron Simpson
On 14Jun2013 15:59, Nikos as SuperHost Support wrote: | So, a numeral = a string representation of a number. Is this correct? No, a numeral is an individual digit from the string representation of a number. So: 65 requires two numerals: '6' and '5'. -- Cameron Simpson In life, you should alway

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread MRAB
On 15/06/2013 00:06, Nobody wrote: On Fri, 14 Jun 2013 16:49:11 +, Steven D'Aprano wrote: Unlike Javascript though, Python's idea of truthy and falsey is actually quite consistent: Beyond that, if a user-defined type implements a __nonzero__() method then it determines whether an instance

Re: problem uploading docs to pypi

2013-06-14 Thread MRAB
On 14/06/2013 23:53, Irmen de Jong wrote: Hi, I'm experiencing some trouble when trying to upload the documentation for one of my projects on Pypi. I'm getting a Bad Gateway http error message. Anyone else experiencing this? Is this an intermittent issue or is there a problem with Pypi? Downl

Re: Debugging memory leaks

2013-06-14 Thread Ben Finney
rusi writes: > On Jun 14, 1:15 am, Giorgos Tzampanakis > wrote: > > Am I the only one who thinks this is terrible advice? > > I would expect a typical desktop app to run for a couple of hours -- > maybe a couple of days. Is a web browser a “typical desktop app”? A filesystem browser? An instant

Re: Debugging memory leaks

2013-06-14 Thread Chris Angelico
On Fri, Jun 14, 2013 at 11:53 PM, rusi wrote: > On Jun 14, 1:15 am, Giorgos Tzampanakis > wrote: >> Am I the only one who thinks this is terrible advice? > > I would expect a typical desktop app to run for a couple of hours -- > maybe a couple of days. > Living with a small (enough) leak there ma

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Chris Angelico
On Sat, Jun 15, 2013 at 5:33 AM, Grant Edwards wrote: > On 2013-06-14, Chris Angelico wrote: >> On Sat, Jun 15, 2013 at 3:49 AM, MRAB wrote: >>> The general rule is that an object is true-ish unless it's false-ish >>> (there are fewer false-ish objects than true-ish objects, e.g. zero vs >>> non

Re: A few questiosn about encoding

2013-06-14 Thread Walter Hurry
On Sat, 15 Jun 2013 03:03:02 +1000, Chris Angelico wrote: > Why do you sell web hosting services when you > have no clue how to provide them? > And why do you continue responding to this timewaster? Please, please just killfile him and let's all move on. -- http://mail.python.org/mailman/listin

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Nobody
On Sat, 15 Jun 2013 03:56:28 +1000, Chris Angelico wrote: > With a few random oddities: > bool(float("nan")) > True > > I somehow expected NaN to be false. Maybe that's just my expectations > that are wrong, though. In general, you should expect the behaviour of NaN to be the opposite of w

Memory usage steadily going up while pickling objects

2013-06-14 Thread Giorgos Tzampanakis
I have a program that saves lots (about 800k) objects into a shelve database (I'm using sqlite3dbm for this since all the default python dbm packages seem to be unreliable and effectively unusable, but this is another discussion). The process takes about 10-15 minutes. During that time I see memor

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Nobody
On Fri, 14 Jun 2013 16:49:11 +, Steven D'Aprano wrote: > Unlike Javascript though, Python's idea of truthy and falsey is actually > quite consistent: Beyond that, if a user-defined type implements a __nonzero__() method then it determines whether an instance is true or false. If it implement

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Nobody
On Fri, 14 Jun 2013 19:30:27 +, Grant Edwards wrote: > 2. Returning one the objects that result from the evaluation of the > operands instead of returning True or False. > > This is what seems to be confusing him. This is much less common > than short-circuit evaluation. FWIW,

Re: Debugging memory leaks

2013-06-14 Thread Giorgos Tzampanakis
On 2013-06-14, Steven D'Aprano wrote: > On Thu, 13 Jun 2013 20:15:42 +, Giorgos Tzampanakis wrote: > >>> Therefore: if the leak seems to be small, it may be much more advicable >>> to restart your process periodically (during times where a restart does >>> not hurt much) rather than try to fin

problem uploading docs to pypi

2013-06-14 Thread Irmen de Jong
Hi, I'm experiencing some trouble when trying to upload the documentation for one of my projects on Pypi. I'm getting a Bad Gateway http error message. Anyone else experiencing this? Is this an intermittent issue or is there a problem with Pypi? Downloading documentation (from pythonhosted.org)

Re: Don't feed the troll...

2013-06-14 Thread Guy Scree
Your best bet would be to keep an eye on www.edx.org for the next offerring of Introduction to Computer Science and Programming 6.00x (probably starts in Sept). It's a no-cost way to take a Python course. On Fri, 14 Jun 2013 12:32:56 +0300, Nick the Gr33k wrote: >On 14/6/2013 12:06 ??, Heiko Wun

Re: Version Control Software

2013-06-14 Thread Dave Angel
On 06/14/2013 10:24 AM, Grant Edwards wrote: On 2013-06-14, Roy Smith wrote: All that being said, it is, as Anssi points out, a horrible, bloated, overpriced, complicated mess which requires teams of specially trained ClearCase admins to run. In other words, it's exactly the sort of thing big

Re: Don't feed the troll... (was: Re: A few questiosn about encoding)

2013-06-14 Thread Grant Edwards
On 2013-06-14, Chris Angelico wrote: > On Sat, Jun 15, 2013 at 3:13 AM, D'Arcy J.M. Cain wrote: >> The answer is to always make sure that you include the previous poster >> in the reply as a Cc or To. I filter out any email that has the string >> "supp...@superhost.gr" in a header so I would als

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Grant Edwards
On 2013-06-14, Nick the Gr33k wrote: > On 14/6/2013 7:47 , Benjamin Kaplan wrote: > In an "and" clause, >> python returns the first false value or the last value, because that >> will evaluate to the correct Boolean value. In an "or" clause, python >> returns the first true value or the last

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Grant Edwards
On 2013-06-14, Chris Angelico wrote: > On Sat, Jun 15, 2013 at 3:49 AM, MRAB wrote: >> The general rule is that an object is true-ish unless it's false-ish >> (there are fewer false-ish objects than true-ish objects, e.g. zero vs >> non-zero int). > > With a few random oddities: > bool(float

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Grant Edwards
On 2013-06-14, Nobody wrote: > On Fri, 14 Jun 2013 18:16:05 +0300, Nick the Gr33k wrote: > >> My question is why the expr (name and month and year) result in the >> value of the last variable whic is variable year? > > For much the same reason that an OR expression returns the first true > value.

Re: Listing modules from all installed packages

2013-06-14 Thread Julien Phalip
On Saturday, June 8, 2013 11:22:16 PM UTC-7, Carlos Nepomuceno wrote: > Just realized that you've asked for installed packages. Perhaps the following > will do the trick. I don't know why the 'lib-tk' isn't included. Why not? > > toplevel_packages = ['%s\\%s'%(ml.path,name)for ml,name,ispkg in >

Re: Don't feed the troll

2013-06-14 Thread D'Arcy J.M. Cain
On Fri, 14 Jun 2013 14:00:17 -0500 Tim Chase wrote: > I set that up for Xah posts and my life was far better. Has he disappeared or is my filtering just really successful? > I've since switched to Claws for my mail and miss that kill-thread > functionality. :-/ Heh. Exactly what I am using. -

Re: Problem creating a regular expression to parse open-iscsi, iscsiadm output (help?)

2013-06-14 Thread rice . stew
On Thursday, June 13, 2013 5:07:33 PM UTC-4, Kevin LaTona wrote: > On Jun 13, 2013, at 7:42 AM, Kevin LaTona wrote: > > > With the following code tweaks in Python 2.7.2, I find it works with > > VERBOSE for me, but not without. > > > > > > Sorry had a small bleep while writing that last lin

Re: Having a hard time to 'get' bing api search results

2013-06-14 Thread Andreas Perstinger
On 14.06.2013 20:19, Yves S. Garret wrote: This is the error that I'm getting right now. import json from pprint import pprint path = '/home/azureuser/temp.json' with open(path) as data_file: ... data = json.load(data_file) ... Traceback (most recent call last): File "", line 2, in Fil

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Jussi Piitulainen
Nick the Gr33k writes: > Why return first or last value? > > because that will evaluate to the correct Boolean value That value will either behave exactly the same as the Boolean value you call correct, or else it will be more useful. That is, most of the time it doesn't matter, and when it

Re: Problem creating a regular expression to parse open-iscsi, iscsiadm output (help?)

2013-06-14 Thread rice . stew
On Thursday, June 13, 2013 3:17:28 AM UTC-4, Andreas Perstinger wrote: > On 13.06.2013 02:59, rice.cr...@gmail.com wrote: > > > I am parsing the output of an open-iscsi command that contains > > > severalblocks of data for each data set. Each block has the format: > > [SNIP] > > for your exam

Re: Don't feed the troll

2013-06-14 Thread Tim Chase
On 2013-06-14 13:56, D'Arcy J.M. Cain wrote: > > I prefer to simply mail the list. You should be able to mute > > entire threads, and he doesn't start more than a couple a day > > usually. > > But then I have to deal with each thread. I don't want to deal with > them at all. At least Thunderbird

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Joshua Landau
On 14 June 2013 19:37, rusi wrote: > 2. The recent responses from Robert Kern are in my view the ideal. In > summary it runs thus: > Stupid question no. 6457 from Nikos: ... > Robert : Look this up > Nikos: I dont understand > Robert: explains > Nikos: I DONTU NDERSTND > Robert: explains (repea

Re: Wrong website loaded when other requested

2013-06-14 Thread Mark Lawrence
On 14/06/2013 17:46, Mark Lawrence wrote: Sure, just give me your password. He actually offered to do just this!!! How stupid can you get? I'm so fed up with his behaviour that I've emailed the Greek Embassy in London pointing out what he's up to. I've requested that someone looks at his

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread rusi
On Jun 14, 11:03 pm, Antoon Pardon wrote: > Op 14-06-13 18:09, Steven D'Aprano schreef: > > > > > > > > > > > On Fri, 14 Jun 2013 11:14:16 +0100, Robert Kern wrote: > > >> On 2013-06-14 10:50, Nick the Gr33k wrote: > > [snip question] > >>> This is all iw ant to know. > > >> This is all you need t

Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread Jussi Piitulainen
Nick the Gr33k writes: > >>> (a or b or c) > 'abcd' > > This for me, should evaluate to True but instead it has been > evaluated to the first variable's value, which is a truthy value of > course since its not an empty string, but shouldn't it return True > instead? In your own programs, write

Re: Having a hard time to 'get' bing api search results

2013-06-14 Thread Yves S. Garret
On Fri, Jun 14, 2013 at 2:04 PM, Kevin LaTona wrote: > > > Sounds like you are missing a closing } json bracket > > > Try a different json validator site to prove your json doc is working. > > > If it's the same doc you sent me last night it worked for me > > so maybe it got messed up moving it

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Antoon Pardon
Op 14-06-13 18:09, Steven D'Aprano schreef: On Fri, 14 Jun 2013 11:14:16 +0100, Robert Kern wrote: On 2013-06-14 10:50, Nick the Gr33k wrote: [snip question] This is all iw ant to know. This is all you need to read: http://docs.python.org/2/reference/expressions.html#boolean- operatio

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Chris Angelico
On Sat, Jun 15, 2013 at 3:49 AM, MRAB wrote: > The general rule is that an object is true-ish unless it's false-ish > (there are fewer false-ish objects than true-ish objects, e.g. zero vs > non-zero int). With a few random oddities: >>> bool(float("nan")) True I somehow expected NaN to be fals

Re: Don't feed the troll

2013-06-14 Thread D'Arcy J.M. Cain
On Sat, 15 Jun 2013 03:31:12 +1000 Chris Angelico wrote: > On Sat, Jun 15, 2013 at 3:13 AM, D'Arcy J.M. Cain > wrote: > > I have suggested this before but the push back I get is that then > > people would get two copies of the email, one to them and one to the > > list. My answer is simple. Get

Eliminate login and registration forms, instant user engagement.

2013-06-14 Thread pdxwebdev
https://www.youtube.com/watch?v=g_IlX62gAwY A demonstration of Yada Project's powerful ability to eliminate login and registration forms. Enabling "central sign on" from a mobile device. In addition, if you had any friends at the time of registration, your friends will be already added and read

Re: Eliminate login and registration forms, instant user engagement.

2013-06-14 Thread pdxwebdev
On Friday, June 14, 2013 10:48:07 AM UTC-7, pdxw...@gmail.com wrote: > https://www.youtube.com/watch?v=g_IlX62gAwY > > > > A demonstration of Yada Project's powerful ability to eliminate login and > registration forms. Enabling "central sign on" from a mobile device. > > > > In addition, if

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread MRAB
On 14/06/2013 18:28, Michael Torrie wrote: On 06/14/2013 10:49 AM, Steven D'Aprano wrote: Correct. In Python, all boolean expressions are duck-typed: they aren't restricted to True and False, but to any "true-ish" and "false-ish" value, or as the Javascript people call them, truthy and falsey va

Re: Don't feed the troll... (was: Re: A few questiosn about encoding)

2013-06-14 Thread Chris Angelico
On Sat, Jun 15, 2013 at 3:13 AM, D'Arcy J.M. Cain wrote: > The answer is to always make sure that you include the previous poster > in the reply as a Cc or To. I filter out any email that has the string > "supp...@superhost.gr" in a header so I would also filter out the > replies if people would

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Michael Torrie
On 06/14/2013 10:49 AM, Steven D'Aprano wrote: > Correct. In Python, all boolean expressions are duck-typed: they aren't > restricted to True and False, but to any "true-ish" and "false-ish" > value, or as the Javascript people call them, truthy and falsey values. > > There are a couple of anoma

Re: My son wants me to teach him Python

2013-06-14 Thread Chris Angelico
On Sat, Jun 15, 2013 at 2:01 AM, Neil Cerutti wrote: > My favorite current challenge for an IDE designer is > concatenating text files. This is a one-liner, even with cmd.exe, > but I don't even know how to do it in Explorer. I'd have to use X > number of text editing sessions. Good point! Or, mo

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Robert Kern
On 2013-06-14 18:01, Nick the Gr33k wrote: On 14/6/2013 7:47 μμ, Benjamin Kaplan wrote: In an "and" clause, python returns the first false value or the last value, because that will evaluate to the correct Boolean value. In an "or" clause, python returns the first true value or the last value.

Re: Don't feed the troll... (was: Re: A few questiosn about encoding)

2013-06-14 Thread D'Arcy J.M. Cain
On Fri, 14 Jun 2013 11:06:55 +0200 Heiko Wundram wrote: > Come on now, this is _so_ obviously trolling, it's not even remotely > funny anymore. Why doesn't killfiling work with the mailing list > version of the python list? :-( A big problem, other than Mr. Support's shenanigans with his email a

Re: PyGresql 4.1.1 for python2.7

2013-06-14 Thread j . mapping
On Sunday, February 3, 2013 4:14:34 AM UTC-7, alexandra wrote: > Using dependency walker revealed that the following are missing from > libpq: > > PQescapeLiteral > > PQescapeIdentifier > > These are only defined in postgresql 9. > > Documentation states that PyGresql 4.1.1

Re: My son wants me to teach him Python

2013-06-14 Thread Chris Angelico
On Fri, Jun 14, 2013 at 10:02 PM, Anssi Saari wrote: > Chris Angelico writes: > >> I have tab completion. Beat that, GUI. > > Decent GUIs *have* tab completion. Bad GUIs don't. > > Oh wait. Is a GUI with tab completion a GUI at all or more of a weird > ass hybrid? What about a CLI that pops up a

Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread Chris Angelico
On Sat, Jun 15, 2013 at 2:56 AM, Nick the Gr33k wrote: > What i'm trying to say that both these exprs are Boolean Expressions > therefore should return Boolean values not variable's values, even if they > are truthy. Okay, now we get to the nub of the matter. In some languages, what you say is t

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Nick the Gr33k
On 14/6/2013 7:47 μμ, Benjamin Kaplan wrote: In an "and" clause, python returns the first false value or the last value, because that will evaluate to the correct Boolean value. In an "or" clause, python returns the first true value or the last value. When Python finally got a Boolean type, no o

Re: My son wants me to teach him Python

2013-06-14 Thread Jason Swails
On Fri, Jun 14, 2013 at 3:21 AM, Chris Angelico wrote: > On Fri, Jun 14, 2013 at 4:13 PM, Steven D'Aprano > wrote: > > Here's another Pepsi Challenge for you: > > > > There is a certain directory on your system containing 50 text files, and > > 50 non-text files. You know the location of the dir

Re: A few questiosn about encoding

2013-06-14 Thread Chris Angelico
On Sat, Jun 15, 2013 at 1:26 AM, Nick the Gr33k wrote: > Well, my biggest successes up until now where to build 3 websites utilizing > database saves and retrievals > > in PHP > in Perl > and later in Python > > with absolute ignorance of > > Apache Configuration: > CGI: > Linux: > > with just bas

Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread Nick the Gr33k
On 14/6/2013 7:31 μμ, Steven D'Aprano wrote: On Fri, 14 Jun 2013 16:07:56 +0300, Nick the Gr33k wrote: Thanks for explaining this but i cannot follow its logic at all. My mind is stuck trying to interpret it as an English sentence: if ('Parker' and 'May' and '2001') if ('Parker' or 'May' or '

Re: Future standard GUI library

2013-06-14 Thread Chris Angelico
On Sat, Jun 15, 2013 at 1:18 AM, Wolfgang Keller wrote: > Server-roundtrips required for simple user interaction are an absolute > non-starter for productivity applications. No matter whether in a LAN > or WAN. If you want a responsive application you have to de-centralise > as much as possible.

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Steven D'Aprano
On Fri, 14 Jun 2013 10:29:25 -0600, Michael Torrie wrote: > On 06/14/2013 03:50 AM, Nick the Gr33k wrote: >> >>> print(name or month or year) >> abcd >> >>> print(name and month and year) >> ijkl > > Interesting. I'd have thought a boolean expression would return True or > False, not a string.

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Benjamin Kaplan
On Jun 14, 2013 9:34 AM, "Michael Torrie" wrote: > > On 06/14/2013 03:50 AM, Nick the Gr33k wrote: > > >>> print(name or month or year) > > abcd > > >>> print(name and month and year) > > ijkl > > Interesting. I'd have thought a boolean expression would return True or > False, not a string. Le

Re: Wrong website loaded when other requested

2013-06-14 Thread Mark Lawrence
On 14/06/2013 17:22, Nick the Gr33k wrote: On 14/6/2013 7:15 μμ, Steven D'Aprano wrote: On Fri, 14 Jun 2013 18:37:50 +0300, Nick the Gr33k wrote: please take an overall look at my httpd.conf at http://pastebin.com/Pb3VbNC9 in case you want to examine somehting else. Thank you very much. PLE

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Nobody
On Fri, 14 Jun 2013 18:16:05 +0300, Nick the Gr33k wrote: > My question is why the expr (name and month and year) result in the > value of the last variable whic is variable year? For much the same reason that an OR expression returns the first true value. "or" and "and" only evaluate as many a

Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread Steven D'Aprano
On Fri, 14 Jun 2013 16:07:56 +0300, Nick the Gr33k wrote: > Thanks for explaining this but i cannot follow its logic at all. My mind > is stuck trying to interpret it as an English sentence: > > if ('Parker' and 'May' and '2001') > > if ('Parker' or 'May' or '2001') > > i just don't get it and

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Michael Torrie
On 06/14/2013 03:50 AM, Nick the Gr33k wrote: > >>> print(name or month or year) > abcd > >>> print(name and month and year) > ijkl Interesting. I'd have thought a boolean expression would return True or False, not a string. Learn something new every day. -- http://mail.python.org/mailman/

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread rusi
On Jun 14, 9:09 pm, Steven D'Aprano wrote: > On Fri, 14 Jun 2013 11:14:16 +0100, Robert Kern wrote: > > On 2013-06-14 10:50, Nick the Gr33k wrote: > [snip question] > >> This is all iw ant to know. > > > This is all you need to read: > > >    http://docs.python.org/2/reference/expressions.html#boo

Re: Wrong website loaded when other requested

2013-06-14 Thread Nick the Gr33k
On 14/6/2013 7:15 μμ, Steven D'Aprano wrote: On Fri, 14 Jun 2013 18:37:50 +0300, Nick the Gr33k wrote: please take an overall look at my httpd.conf at http://pastebin.com/Pb3VbNC9 in case you want to examine somehting else. Thank you very much. PLEASE SUGGEST SOMETHING! Don't shout, it's r

Pip install failing with HTTP 304 (Not Modified)

2013-06-14 Thread jcdyer78
We have a jenkins server that has recently had a number of erratically failing builds (of python projects) when trying to pip install requirements. The errors look like: + /var/lib/jenkins/jobs/ee/workspace/virtualenv/bin/pip install --environment=/var/lib/jenkins/jobs/ee/workspace/virtual

Re: Wrong website loaded when other requested

2013-06-14 Thread Steven D'Aprano
On Fri, 14 Jun 2013 18:37:50 +0300, Nick the Gr33k wrote: >> please take an overall look at my httpd.conf at >> http://pastebin.com/Pb3VbNC9 in case you want to examine somehting >> else. >> >> Thank you very much. >> > PLEASE SUGGEST SOMETHING! Don't shout, it's rude. We're not your servants. T

Re: Don't feed the troll...

2013-06-14 Thread Mark Lawrence
On 14/06/2013 13:58, Heiko Wundram wrote: Am 14.06.2013 14:45, schrieb Nick the Gr33k: we are all benefit out of this. Let's nominate you for a nobel prize, saviour of python-list! The Nobel prize is unsuited in a situation like this, maybe the ACM Turing Award? -- "Steve is going for th

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Steven D'Aprano
On Fri, 14 Jun 2013 11:14:16 +0100, Robert Kern wrote: > On 2013-06-14 10:50, Nick the Gr33k wrote: [snip question] >> This is all iw ant to know. > > This is all you need to read: > >http://docs.python.org/2/reference/expressions.html#boolean- operations Thank you Robert for contributing

Re: My son wants me to teach him Python

2013-06-14 Thread Neil Cerutti
On 2013-06-14, Steven D'Aprano wrote: > On Thu, 13 Jun 2013 20:33:40 -0700, Rick Johnson wrote: > >> On Thursday, June 13, 2013 3:18:57 PM UTC-5, Joshua Landau wrote: >> >>> [...] >>> GUI is boring. I don't give a damn about that. If I had it my way, I'd >>> never write any interfaces again (alth

Re: Don't feed the troll...

2013-06-14 Thread Neil Cerutti
On 2013-06-14, Antoon Pardon wrote: > Now there is nothing wrong in being ignorant. The question is > how do you proceed from there. The answer is not by starting a > project that is far above your ability and pestering the > experts in the hope they will spoon feed you. A major issue is this: th

Re: Wrong website loaded when other requested

2013-06-14 Thread rusi
On Jun 14, 8:37 pm, Nick the Gr33k wrote: > > PLEASE SUGGEST SOMETHING! A lollipop maybe? -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrong website loaded when other requested

2013-06-14 Thread Nick the Gr33k
On 13/6/2013 9:04 μμ, Νικόλαος Κούρας wrote: Τη Πέμπτη, 13 Ιουνίου 2013 7:52:27 μ.μ. UTC+3, ο χρήστης Νικόλαος Κούρας έγραψε: On 13/6/2013 6:35 μμ, Joel Goldstick wrote: [Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173] FileNotFoundError: [Errno 2] \\u0394\\u03b5\\u03bd \\u03c5\\

Re: A few questiosn about encoding

2013-06-14 Thread Nick the Gr33k
On 14/6/2013 6:21 μμ, Joel Goldstick wrote: let's cut to the chase and start with telling us what you DO know Nick. That would take less typing Well, my biggest successes up until now where to build 3 websites utilizing database saves and retrievals in PHP in Perl and later in Python with abs

Re: My son wants me to teach him Python

2013-06-14 Thread Alister
On Fri, 14 Jun 2013 05:41:20 -0500, Tim Chase wrote: > On 2013-06-14 17:21, Chris Angelico wrote: >> On Fri, Jun 14, 2013 at 4:13 PM, Steven D'Aprano >> wrote: >> > Here's another Pepsi Challenge for you: >> > >> > There is a certain directory on your system containing 50 text files, >> > and 50

Re: A few questiosn about encoding

2013-06-14 Thread Joel Goldstick
let's cut to the chase and start with telling us what you DO know Nick. That would take less typing On Fri, Jun 14, 2013 at 9:58 AM, Nick the Gr33k wrote: > On 14/6/2013 1:14 μμ, Cameron Simpson wrote: > >> Normally a character in a b'...' item represents the byte value >> matching the character

Re: Future standard GUI library

2013-06-14 Thread Wolfgang Keller
> I share your passion for empowering a human operator to complete and > submit a form as quickly as possible. I therefore agree that one > should be able to complete a form using the keyboard only. This is not just about "forms", it's about using the entire application without having to use the m

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Nick the Gr33k
On 14/6/2013 5:49 μμ, Grant Edwards wrote: On 2013-06-14, Nick the Gr33k wrote: I started another thread no kidding. because the last one was !@#$'ed up by irrelevant replies and was difficult to jeep track. name="abcd" month="efgh" year="ijkl" print(name or month or year) abcd Can

Re: nimsg -- the Network Instant MeSsenGer

2013-06-14 Thread Hunter D
If you have any suggestions for features, bugs that you want to report, or just comments on the program in general, feel free to reply here. -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a Super Simple WWW Link, Copy, & Paste into Spreadsheet Program

2013-06-14 Thread Michael Herman
Hi there - Yes, as others have said, this is not an easy project. That said, it can be down. I'd use a combination of DataNitro, to connect with Excel, and Scrapy, to easily scrap and crawl the sites. I'm adept at both and would be happy to help you with this. Email me at mich...@mherman.org for h

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread Grant Edwards
On 2013-06-14, Nick the Gr33k wrote: > I started another thread no kidding. > because the last one was !@#$'ed up by irrelevant replies and was > difficult to jeep track. > > >>> name="abcd" > >>> month="efgh" > >>> year="ijkl" > > >>> print(name or month or year) > abcd > > Can understand that

  1   2   >