Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 08/10/2013 23:52, Νίκος Αλεξόπουλος wrote: Is there something i can try to isolate the problem and make it work? As you are the problem why not try solitary confinement? :) -- Roses are red, Violets are blue, Most poems rhyme, But this one doesn't. Mark Lawrence -- https://mail.python.

Pygame with python 3.3.2

2013-10-09 Thread markotaht
>From pygame tutorials i copied this example: import pygame class spritesheet(object): def __init__(self, filename): try: self.sheet = pygame.image.load(filename).convert() except pygame.error, message: print('Unable to load spritesheet image:', filenam

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Ben Finney
Νίκος Αλεξόπουλος writes: > When a user hits my link on another website, for exmaple they are on > ypsilandio.gr and they hit the link of superhost.gr then a new entry > with a new cookie is appearing into my visitors table! > > Where is the old cookie that was saved in my browser so it will get

Re: Pygame with python 3.3.2

2013-10-09 Thread Mark Lawrence
On 09/10/2013 08:03, markot...@gmail.com wrote: From pygame tutorials i copied this example: import pygame class spritesheet(object): def __init__(self, filename): try: self.sheet = pygame.image.load(filename).convert() except pygame.error, message:

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Νίκος Αλεξόπουλος
Στις 9/10/2013 4:33 πμ, ο/η Steven D'Aprano έγραψε: On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: Is there something i can try to isolate the problem and make it work? Of course there is. That is part of the job of the developer: hard work trying dozens, maybe hundreds of diffe

Re: Encoding of surrogate code points to UTF-8

2013-10-09 Thread wxjmfauth
Le mercredi 9 octobre 2013 08:20:05 UTC+2, Steven D'Aprano a écrit : > > > > http://www.unicode.org/versions/Unicode6.2.0/ch02.pdf#G13708 "All three > > > encoding forms can be used to represent the full range of encoded > > > characters in the Unicode Standard; ... Each of the three Unicode >

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 09/10/2013 09:24, Νίκος Αλεξόπουλος wrote: You have been told repeatedly that your questions have nothing to do with Python, e.g. Ben Finney just over an hour ago "None of this has to do with Python. Please do not ask this Python doscussion forum to educate you on how HTTP operates." Plea

Re: Can ay one help me on pysvn , i want to capture the log and status of checkout call .....

2013-10-09 Thread bab mis
On Wednesday, October 9, 2013 11:39:04 AM UTC+5:30, bab mis wrote: > Here is the code i am trying: 2 from pysvn import wc_status_kind 3 import pysvn 4 import os, os.path 6 import re 7 8 def createSVNClient(): 9 """Create a pysvn client, and setup

Re: Encoding of surrogate code points to UTF-8

2013-10-09 Thread Ned Batchelder
On 10/9/13 4:22 AM, wxjmfa...@gmail.com wrote: Le mercredi 9 octobre 2013 08:20:05 UTC+2, Steven D'Aprano a écrit : http://www.unicode.org/versions/Unicode6.2.0/ch02.pdf#G13708 "All three encoding forms can be used to represent the full range of encoded characters in the Unicode Standard; ...

ePIPE exception received when other end can't send an RST - how come?

2013-10-09 Thread jkn
Hello there I am experimenting with a simple python script which establishes a TCP connection, over GPRS, to a server. It then periodically sends a small block of data (60 bytes or so) to the server. I then disconnect the GPRS antenna on this client machine (I am actually investigating the

Re: Encoding of surrogate code points to UTF-8

2013-10-09 Thread Neil Cerutti
On 2013-10-09, Ned Batchelder wrote: > On 10/9/13 4:22 AM, wxjmfa...@gmail.com wrote: >> and what Unicode.org does not say is that these coding schemes >> (like any coding scheme) should be used in an exclusive way. > > Can you clarify what you mean by "in an exclusive way"? Ned, pay no attention

Re: Can ay one help me on pysvn , i want to capture the log and status of checkout call .....

2013-10-09 Thread Joel Goldstick
On Wed, Oct 9, 2013 at 5:53 AM, bab mis wrote: > On Wednesday, October 9, 2013 11:39:04 AM UTC+5:30, bab mis wrote: >> > > Here is the code i am trying: > > > > 2 from pysvn import wc_status_kind > 3 import pysvn > 4 > import os, os.path > 6 import re > 7 > 8 d

Good Python Book

2013-10-09 Thread Schneider
Hi List, I'm looking for a good advanced python book. Most books I looked at up to now are on beginners level. I don't need a reference (that's online) or a book explaining how to use the interpreter or how to use list comprehensions on the one side and skipping topics like decorators, metacla

öpcaö variable refrenced before assignment

2013-10-09 Thread markotaht
fail4 = "palgad.txt" f4 = open(fail4, "r") def koguarv_ridu failis(f): for i, l in enumerate(f): pass return i+1 def palgad(f4): palgad = 0 while True: f4r = f4.readline() if f4r == "": break palgad += int(f4r[f4r.find(";")+1:]) ret

Re: öpcaö variable refrenced before assignment

2013-10-09 Thread Chris Angelico
On Thu, Oct 10, 2013 at 1:20 AM, wrote: > def koguarv_ridu failis(f): > for i, l in enumerate(f): > pass > return i+1 This will throw the exception you're seeing (by the way, it helps a LOT to actually copy and paste the full error, including the traceback - fortunately I can wor

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: > Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: >> Have you checked the cookie jar in the browser to see what value the >> cookie has? Is that the value you think it should have? Note that >> checking the cookie jar is a browser to

UnicodeEncodeError: SOLVED

2013-10-09 Thread Walter Hurry
Many thanks to those prepared to forgive my transgression in the 'Goodbye' thread. I mentioned there that I was puzzled by a UnicodeEncodeError, and said I would rise it as a separate thread. However, via this link, I was able to resolve the issue myself: http://stackoverflow.com/questions/3224

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 11:24:35 +0300, Νίκος Αλεξόπουλος wrote: > Please someone esle try to reproduce the problem by just using cgi and > not mod_wsgi. I have no intention of reconfiguring my web server just to prove that your code isn't working. We already know that your code isn't working. --

Re: öpcaö variable refrenced before assignment

2013-10-09 Thread Jussi Piitulainen
markot...@gmail.com writes: > fail4 = "palgad.txt" > > f4 = open(fail4, "r") > > def koguarv_ridu failis(f): > for i, l in enumerate(f): > pass > return i+1 > > def palgad(f4): > palgad = 0 > while True: > f4r = f4.readline() > if f4r == "": >

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Νίκος Αλεξόπουλος
Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε: On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: Have you checked the cookie jar in the browser to see what value the cookie has? Is that the value you think it should have? Note

datetime.timedelta.replace?

2013-10-09 Thread Skip Montanaro
Datetime objects have a replace method, but timedelta objects don't. If I take the diff of two datetimes and want to zero out the microseconds field, is there some way to do it more cleanly than this? delta = dt1 - dt2 zero_delta = datetime.timedelta(days=delta.days, seconds=delta.seconds) I gues

Re: öpcaö variable refrenced before assignment

2013-10-09 Thread markotaht
So i got it working, by saving palgad in a variable, before printing it and i count the lines into a global variable. Ty -- https://mail.python.org/mailman/listinfo/python-list

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Joel Goldstick
On Wed, Oct 9, 2013 at 11:00 AM, Νίκος Αλεξόπουλος wrote: > Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε: > >> On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: >> >>> Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: >> >> Have you checked the cookie jar in the browser to see

Re: öpcaö variable refrenced before assignment

2013-10-09 Thread Mark Lawrence
On 09/10/2013 16:15, markot...@gmail.com wrote: So i got it working, by saving palgad in a variable, before printing it and i count the lines into a global variable. Ty You are hereby placed in detention for one hour this evening. You will spend the whole hour writing repeatedly "I must rem

Receive packet using socket

2013-10-09 Thread tspiegelman
Hey all, I am trying to use socket to send / receive a packet (want to recreate some functionality of hping3 and port it to windows and mac as a tcp ping). I am having some problems with the recv functionality of socket. Below is the script I am using. I get an ack from the server (used wire

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 09/10/2013 16:00, Νίκος Αλεξόπουλος wrote: ok so then tell me where i should ask this. Google, bing, duckduckgo, ask, yahoo ... -- Roses are red, Violets are blue, Most poems rhyme, But this one doesn't. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

super in Python 3 and variadic arguments

2013-10-09 Thread Marco Buttu
Given this class: >>> class A: ... def afoo(*args): ... print(args) in Python 3 we can write the following class: >>> class B(A): ... def bfoo(*args): ... super(B, args[0]).afoo(*args[1:]) ... >>> B().bfoo(1, 2, 3) (<__main__.B object at 0x7f5b3bde48d0>, 1, 2, 3) witho

RE: Code golf challenge: XKCD 936 passwords

2013-10-09 Thread Nick Cash
>> # Python-2, sorry >> import os >> print list(set(open('/usr/share/dict/words')))[os.getpid():][:4] > So that steps by your pid? Not really. It seems to rely on list(set(...)) kinda randomizing order... which is definitely not safe without hash randomization. But this brings up an interest

Re: Receive packet using socket

2013-10-09 Thread tspiegelman
BTW what I am trying to accomplish is easily done in hping3 using this command: hping3 mtalk.google.com -S -p 5228 I just want those same kind of results using python so I can make an exe out of it. On Wednesday, October 9, 2013 11:37:39 AM UTC-4, tspie...@amplify.com wrote: > Hey all, > >

Re: Applying 4x4 transformation to 3-element vector with numpy

2013-10-09 Thread Nobody
On Tue, 08 Oct 2013 23:10:16 -0700, John Nagle wrote: > I only need affine transformations. This is just moving > the coordinate system of a point, not perspective rendering. I have to do > this for a lot of points, and I'm hoping numpy has some way to do this > without generating extra garba

Re: super in Python 3 and variadic arguments

2013-10-09 Thread Ned Batchelder
On 10/9/13 11:44 AM, Marco Buttu wrote: Given this class: >>> class A: ... def afoo(*args): ... print(args) in Python 3 we can write the following class: >>> class B(A): ... def bfoo(*args): ... super(B, args[0]).afoo(*args[1:]) ... >>> B().bfoo(1, 2, 3) (<__main__.B ob

Re: Receive packet using socket

2013-10-09 Thread Nobody
On Wed, 09 Oct 2013 08:37:39 -0700, tspiegelman wrote: > I am trying to use socket to send / receive a packet (want to recreate > some functionality of hping3 and port it to windows and mac as a tcp > ping). I am having some problems with the recv functionality of socket. > Below is the script I

Re: Re for Apache log file format

2013-10-09 Thread Piet van Oostrum
Sam Giraffe writes: > Hi, > > I am trying to split up the re pattern for Apache log file format and seem to > be having some > trouble in getting Python to understand multi-line pattern: > > #!/usr/bin/python > > import re > > #this is a single line > string = '192.168.122.3 - - [29/Sep/2013:03:

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 18:00:28 +0300, Νίκος Αλεξόπουλος wrote: > Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε: >> On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: >> >>> Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: >> Have you checked the cookie jar in the browser to see w

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 18:00:28 +0300, Νίκος Αλεξόπουλος wrote: > Στις 9/10/2013 5:43 μμ, ο/η Denis McMahon έγραψε: >> On Wed, 09 Oct 2013 01:52:44 +0300, Νίκος Αλεξόπουλος wrote: >> >>> Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε: >> Have you checked the cookie jar in the browser to see w

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 09/10/2013 19:06, Denis McMahon wrote: Find the relevant forums and ask in them. Why am I thinking of this http://en.wikipedia.org/wiki/There%27s_a_Hole_in_My_Bucket ? -- Roses are red, Violets are blue, Most poems rhyme, But this one doesn't. Mark Lawrence -- https://mail.python.org/

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Piet van Oostrum
Νίκος Αλεξόπουλος writes: > > # initialize cookie and retrieve cookie from clients browser > cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] ) > > if cookie.get('ID') is not None: > cookieID = cookie['ID'].value > else: > cookieID = random.randrange(0, ) > cookie['I

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Tim Chase
On 2013-10-09 19:28, Mark Lawrence wrote: > On 09/10/2013 19:06, Denis McMahon wrote: >> Find the relevant forums and ask in them. > > Why am I thinking of this > http://en.wikipedia.org/wiki/There%27s_a_Hole_in_My_Bucket ? There's a bug in my program, dear newsgroup, dear newsgroup, There's a b

PROPOSAL: PyCons in Africa

2013-10-09 Thread D.M. Procida
[reposted; the previous one didn't seem to make it out!] I have a written a first draft outlining a proposal for a PyCon in a sub-Saharan African nation where there has never been one. There's an email list for people interested in becoming involved in t

Re: class-private names and the Zen of Python

2013-10-09 Thread Charles Hixson
On 10/08/2013 06:24 AM, Steven D'Aprano wrote: On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote: In the following case: >>> class Foo: ... _Foo__a = 100 ... __a = 33 ... >>> Foo._Foo__a 33 I think this behavior, for a user who does not know the convention, could be a surprise

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 09/10/2013 20:26, Tim Chase wrote: On 2013-10-09 19:28, Mark Lawrence wrote: On 09/10/2013 19:06, Denis McMahon wrote: Find the relevant forums and ask in them. Why am I thinking of this http://en.wikipedia.org/wiki/There%27s_a_Hole_in_My_Bucket ? There's a bug in my program, dear newsgr

Re: Code golf challenge: XKCD 936 passwords

2013-10-09 Thread random832
On Tue, Oct 8, 2013, at 18:27, Rob Day wrote: > On 08/10/13 07:17, Chris Angelico wrote: > > Who's up for some fun? Implement an XKCD-936-compliant password > > generator in Python 3, in less code than this: > > > > print(*__import__("random").sample(open("/usr/share/dict/words").read().split("\n")

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Νίκος Αλεξόπουλος
Στις 9/10/2013 9:36 μμ, ο/η Piet van Oostrum έγραψε: Νίκος Αλεξόπουλος writes: # initialize cookie and retrieve cookie from clients browser cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] ) if cookie.get('ID') is not None: cookieID = cookie['ID'].value else: cookieID

Can anyone help on conflicts between Python 2.5 and 2.7

2013-10-09 Thread Errol Anderson
I maintain a Delphi program, AAA, that runs Python 2.5 scripts using the PythonForDelphi (P4D)interface. I can install both Python 2.5 and Python 2.7 on my computer and AAA is unaffected. However one user of AAA uses another program, BBB, that requires Python 2.7. When they run AAA, an error

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Joel Goldstick
> > Expire is not the issue here, as i have it is working with no problem. > when i print the cookie expiration time is calculated properly. > Something else is going worng. > Indeed! > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com --

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 09/10/2013 23:03, Joel Goldstick wrote: Expire is not the issue here, as i have it is working with no problem. when i print the cookie expiration time is calculated properly. Something else is going worng. Indeed! Well explained here http://en.wikipedia.org/wiki/User_error -- Roses

Re: Tail recursion to while iteration in 2 easy steps

2013-10-09 Thread Charles Hixson
On 10/08/2013 02:22 AM, Steven D'Aprano wrote: On Mon, 07 Oct 2013 20:27:13 -0700, Mark Janssen wrote: But even putting that aside, even if somebody wrote such a description, it would be reductionism gone mad. What possible light on the problem would be shined by a long, long list of machine co

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Steven D'Aprano
On Wed, 09 Oct 2013 18:06:05 +, Denis McMahon wrote: > Find the relevant forums and ask in them. In fairness to Nikos, that may not be an easy thing to do. I for one have *no idea* where to find an appropriate forum to learn about these sorts of web basics. comp.protocol.http doesn't exist

Python's and and Pythons or

2013-10-09 Thread Peter Cacioppi
I really like the logic that Pythons "or" is not only short-circuit but non-typed. So I can say y = override or default and y won't necc be True or False. If override boolean evaluates to True (which, for most classes, means not None) than y will be equal to override. Otherwise it will be equ

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Chris Angelico
On Thu, Oct 10, 2013 at 10:48 AM, Steven D'Aprano wrote: > So, for the benefit of anyone, not just Nikos, who wants to learn about > how browsers connect to web sites and how to run a web server, does > anyone have any recommendation for tutorials, mailing lists, web forums > or books which are su

Re: Code golf challenge: XKCD 936 passwords

2013-10-09 Thread Roy Smith
In article , Nick Cash wrote: > >> # Python-2, sorry > >> import os > >> print list(set(open('/usr/share/dict/words')))[os.getpid():][:4] > > > So that steps by your pid? > > Not really. It seems to rely on list(set(...)) kinda randomizing order... > which is definitely not safe without hash

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Denis McMahon
On Wed, 09 Oct 2013 23:48:12 +, Steven D'Aprano wrote: > On Wed, 09 Oct 2013 18:06:05 +, Denis McMahon wrote: > >> Find the relevant forums and ask in them. > > In fairness to Nikos, that may not be an easy thing to do. I for one > have *no idea* where to find an appropriate forum to lea

Re: Python's and and Pythons or

2013-10-09 Thread Steven D'Aprano
On Wed, 09 Oct 2013 16:54:03 -0700, Peter Cacioppi wrote: > I really like the logic that Pythons "or" is not only short-circuit but > non-typed. > > So I can say > > y = override or default > > and y won't necc be True or False. If override boolean evaluates to True > (which, for most classes,

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Ben Finney
Steven D'Aprano writes: > So, for the benefit of anyone, not just Nikos, who wants to learn > about how browsers connect to web sites and how to run a web server, > does anyone have any recommendation for tutorials, mailing lists, web > forums or books which are suitable? Preferably things you ha

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Roy Smith
In article <5255eb3c$0$29984$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > So, for the benefit of anyone, not just Nikos, who wants to learn about > how browsers connect to web sites and how to run a web server, does > anyone have any recommendation for tutorials, mailing lists

Re: Python's and and Pythons or

2013-10-09 Thread Chris Angelico
On Thu, Oct 10, 2013 at 11:36 AM, Steven D'Aprano wrote: > Other languages (Ruby, PHP, Javascript, etc.) also have > truthy and falsey values, but in my opinion none of them have got it > right. Python has a unifying model of truthiness: objects which represent > "something" ought to be truthy, th

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Steven D'Aprano
On Thu, 10 Oct 2013 00:31:06 +, Denis McMahon wrote: > On Wed, 09 Oct 2013 23:48:12 +, Steven D'Aprano wrote: > >> On Wed, 09 Oct 2013 18:06:05 +, Denis McMahon wrote: >> >>> Find the relevant forums and ask in them. >> >> In fairness to Nikos, that may not be an easy thing to do. I

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Chris Angelico
On Thu, Oct 10, 2013 at 12:10 PM, Steven D'Aprano wrote: > On Thu, 10 Oct 2013 00:31:06 +, Denis McMahon wrote: > >> On Wed, 09 Oct 2013 23:48:12 +, Steven D'Aprano wrote: >> >>> On Wed, 09 Oct 2013 18:06:05 +, Denis McMahon wrote: >>> Find the relevant forums and ask in them. >>>

Re: Can anyone help on conflicts between Python 2.5 and 2.7

2013-10-09 Thread Steven D'Aprano
Hi Errol, Happy to help, but first I have a brief note about house-keeping... this group is both a mailing list and a newsgroup on Usenet. A text newsgroup, so I'm afraid that HTML posts are frowned upon, because a large number of people reading this will see your message something like this:

Re: UnicodeEncodeError: SOLVED

2013-10-09 Thread Steven D'Aprano
On Wed, 09 Oct 2013 14:41:53 +, Walter Hurry wrote: > Many thanks to those prepared to forgive my transgression in the > 'Goodbye' thread. I mentioned there that I was puzzled by a > UnicodeEncodeError, and said I would rise it as a separate thread. > > However, via this link, I was able to r

Re: Can anyone help on conflicts between Python 2.5 and 2.7

2013-10-09 Thread Terry Reedy
On 10/9/2013 9:31 PM, Steven D'Aprano wrote: I'm not a Windows guru, so I might be off-mark here (I'm sure somebody will correct me) but as I understand it, the "default Python" under Windows is the one that was installed most recently. It is an option in the installer. So, assuming you have

I am never going to complain about Python again

2013-10-09 Thread Steven D'Aprano
Just came across this little Javascript gem: ",,," == Array((null,'cool',false,NaN,4)); => evaluates as true http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array I swear, I am never going to complain about Python again. -- Steven -- https://mail.python.org/mailman/listinfo/pyth

Re: I am never going to complain about Python again

2013-10-09 Thread Chris Angelico
On Thu, Oct 10, 2013 at 3:36 PM, Steven D'Aprano wrote: > Just came across this little Javascript gem: > > ",,," == Array((null,'cool',false,NaN,4)); > > => evaluates as true > > http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array > > I swear, I am never going to complain about Python

Re: Can anyone help on conflicts between Python 2.5 and 2.7

2013-10-09 Thread Mark Lawrence
On 10/10/2013 04:32, Terry Reedy wrote: On 10/9/2013 9:31 PM, Steven D'Aprano wrote: I'm not a Windows guru, so I might be off-mark here (I'm sure somebody will correct me) but as I understand it, the "default Python" under Windows is the one that was installed most recently. It is an option

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 10/10/2013 02:28, Chris Angelico wrote: Half an hour spent reading there will pay good dividends. That's been sadly lacking in all of these threads. With responses coming back faster than a ball on the centre court at Wimbledon, it's hardly surprising that progress has been conspicious

Re: I am never going to complain about Python again

2013-10-09 Thread Chris Rebert
On Wed, Oct 9, 2013 at 9:36 PM, Steven D'Aprano wrote: > Just came across this little Javascript gem: > > ",,," == Array((null,'cool',false,NaN,4)); > > => evaluates as true > > http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array > > I swear, I am never going to complain about Python a

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread rusi
On Thursday, October 10, 2013 6:40:19 AM UTC+5:30, Steven D'Aprano wrote: > > I have no objection to encouraging people to read the fine manual, and I > don't intend to be Nikos' (or anyone else's) unpaid full-time help desk > and troubleshooter. But I do think it is simply unfair to treat him m

Re: I am never going to complain about Python again

2013-10-09 Thread Mark Lawrence
On 10/10/2013 05:36, Steven D'Aprano wrote: Just came across this little Javascript gem: ",,," == Array((null,'cool',false,NaN,4)); => evaluates as true http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array I swear, I am never going to complain about Python again. Isn't that what

Re: I am never going to complain about Python again

2013-10-09 Thread Cameron Simpson
On 10Oct2013 15:50, Chris Angelico wrote: > On Thu, Oct 10, 2013 at 3:36 PM, Steven D'Aprano wrote: > > Just came across this little Javascript gem: > > > > ",,," == Array((null,'cool',false,NaN,4)); > > > > => evaluates as true > > > > http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Ar

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Mark Lawrence
On 10/10/2013 06:36, rusi wrote: On Thursday, October 10, 2013 6:40:19 AM UTC+5:30, Steven D'Aprano wrote: I have no objection to encouraging people to read the fine manual, and I don't intend to be Nikos' (or anyone else's) unpaid full-time help desk and troubleshooter. But I do think it is si

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread Ben Finney
rusi writes: > On Thursday, October 10, 2013 6:40:19 AM UTC+5:30, Steven D'Aprano wrote: > > If *anyone else* asked for help on these sorts of network and > > browser questions, we'd give them more constructive pointers than > > just "google it". Someone who has so consistently demonstrated thei

Re: Python's and and Pythons or

2013-10-09 Thread Peter Cacioppi
On Wednesday, October 9, 2013 4:54:03 PM UTC-7, Peter Cacioppi wrote: > I really like the logic that Pythons "or" is not only short-circuit but > non-typed. > > > > So I can say > > > > y = override or default > > > > and y won't necc be True or False. If override boolean evaluates to Tru

Re: I am never going to complain about Python again

2013-10-09 Thread Christian Gollwitzer
Am 10.10.13 06:36, schrieb Steven D'Aprano: Just came across this little Javascript gem: ",,," == Array((null,'cool',false,NaN,4)); => evaluates as true http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array I swear, I am never going to complain about Python again. More of this fun

Re: Python's and and Pythons or

2013-10-09 Thread Chris Angelico
On Thu, Oct 10, 2013 at 5:12 PM, Peter Cacioppi wrote: > I'm trying to think of a good example usage of echo-argument and. Maybe > something like > > possible = foo and foo.allowsit() > if (possible is None) : >print "foo not provided" > if (possible is False) : >print "foo doesn't allow