Στις 9/10/2013 7:53 πμ, ο/η Ian Kelly έγραψε:
On Tue, Oct 8, 2013 at 8:18 AM, Νίκος Αλεξόπουλος wrote:
Also i have set:
ookie['ID']['expires'] = 60*60*24*365 #this cookie will expire in
a year
The Expires attribute takes a date. If you're passing an interval in
seconds then you sho
On Tue, 08 Oct 2013 21:28:25 -0400, Terry Reedy wrote:
> On 10/8/2013 6:30 PM, Steven D'Aprano wrote:
>> On Tue, 08 Oct 2013 15:14:33 +, Neil Cerutti wrote:
>>
>>> In any case, "\ud800\udc01" isn't a valid unicode string.
>>
>> I don't think this is correct. Can you show me where the standard
On 09/10/2013 07:09, bab mis wrote:
To repeat what I've said recently on the tutor mailing list, sorry but
if you want us to do your work you'll have to send a suitably sized
cheque to the PSF, where the size refers to the amount written in words
and numbers and not the physical dimensions.
On 10/8/2013 10:36 PM, Christian Gollwitzer wrote:
> Dear John,
>
> Am 09.10.13 07:28, schrieb John Nagle:
>> This is the basic transformation of 3D graphics. Take
>> a 3D point, make it 4D by adding a 1 on the end, multiply
>> by a transformation matrix to get a new 4-element vector,
>> disc
--
https://mail.python.org/mailman/listinfo/python-list
On 10/09/2013 01:00 AM, Oscar Benjamin wrote:
> On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote:
>
> > Another question is: where is the place in which this transformation
> > occurs? Is it at the parser level, before the dictionary attribute is
> > gave as argument to the metaclass?
Dear John,
Am 09.10.13 07:28, schrieb John Nagle:
This is the basic transformation of 3D graphics. Take
a 3D point, make it 4D by adding a 1 on the end, multiply
by a transformation matrix to get a new 4-element vector,
discard the last element.
Is there some way to do that in numpy wi
This is the basic transformation of 3D graphics. Take
a 3D point, make it 4D by adding a 1 on the end, multiply
by a transformation matrix to get a new 4-element vector,
discard the last element.
Is there some way to do that in numpy without
adding the extra element and then discarding it?
On Tue, 08 Oct 2013 23:27:51 +0100, Rob Day wrote:
> print("imploring epsilon decamp graveyard's") # Chosen by fair random
> sampling, guaranteed to be random
>
> Comments don't count as code, right? ;)
"cat cat cat cat..."
That's the trouble with random, you can never quite tell.
--
Steven
On Tue, Oct 8, 2013 at 8:18 AM, Νίκος Αλεξόπουλος wrote:
> Also i have set:
> ookie['ID']['expires'] = 60*60*24*365 #this cookie will expire in
> a year
The Expires attribute takes a date. If you're passing an interval in
seconds then you should use the Max-Age attribute instead.
That
In article ,
Chris Angelico wrote:
> On Wed, Oct 9, 2013 at 12:38 PM, Roy Smith wrote:
> > If you're willing to accept a sub-optimal random number generator:
> >
> > # Python-2, sorry
> > import os
> > print list(set(open('/usr/share/dict/words')))[os.getpid():][:4]
>
> So that steps by your p
On Wed, Oct 9, 2013 at 12:38 PM, Roy Smith wrote:
> If you're willing to accept a sub-optimal random number generator:
>
> # Python-2, sorry
> import os
> print list(set(open('/usr/share/dict/words')))[os.getpid():][:4]
So that steps by your pid? That's going to drastically reduce the
entropy in
On Monday, October 7, 2013 8:17:21 PM UTC-10, Chris Angelico wrote:
> > print(*__import__("random").sample(open("/usr/share/dict/words").read().spli
> > t("\n"),4))
In article <68365e43-498f-4ad2-bac3-6a0293815...@googlegroups.com>,
sprucebond...@gmail.com wrote:
> import random as r
> print(*
Hello everyone,
For those of you who didn't know, if you are interested in a Redis-backed
time and/or fifo-queue with priorities, retries, etc., to be used with
Python, one exists and is mature: it's called RPQueue, and it seeks to
simplify your life of task execution. The recent changelog entries
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 different things until you isolate the
problem. There ar
On 10/8/2013 6:30 PM, Steven D'Aprano wrote:
On Tue, 08 Oct 2013 15:14:33 +, Neil Cerutti wrote:
In any case, "\ud800\udc01" isn't a valid unicode string.
I don't think this is correct. Can you show me where the standard says
that Unicode strings[1] may not contain surrogates? I think tha
On Tue, 08 Oct 2013 13:47:14 -0400, Joel Goldstick wrote:
> Yes! there is a very simple and comprehensive way to learn about your
> visitors. Use Google Analytics. Its free, you only need a google
> account to open an analytics account.
http://images.wikia.com/darkheresy/images/0/0c/Its_a_trap.
On 08Oct2013 01:20, markot...@gmail.com wrote:
> I cant just subclassing doesent work. It seem the init method of the source
> class also calls out another class. And the problem is, i can subclass the
> other class to with the required function but the end result is that it
> doesent work, sin
On 10/8/13 6:52 PM, Νίκος Αλεξόπουλος wrote:
Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε:
On Tue, 08 Oct 2013 19:04:37 +0300, Νίκος Αλεξόπουλος wrote:
Can you help me with this particuler problem please?
Unfortunately I can't, because I am unable to reproduce the problem you
describe.
On Tue, 08 Oct 2013 15:05:26 +0100, wrote:
Parent class is at the link.
Please quote some context when you reply. What link?
Then again, I'm not about to click on some random link someone posts to a
newsgroup. Apart from being one of the classic ways to get a virus onto
my computer, it
On Oct 8, 2013 2:26 PM, "Steven D'Aprano" <
steve+comp.lang.pyt...@pearwood.info> wrote:
>
> On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote:
>
> > Another question is: where is the place in which this transformation
> > occurs? Is it at the parser level, before the dictionary attribute is
>
Στις 8/10/2013 10:29 μμ, ο/η Denis McMahon έγραψε:
On Tue, 08 Oct 2013 19:04:37 +0300, Νίκος Αλεξόπουλος wrote:
Can you help me with this particuler problem please?
Unfortunately I can't, because I am unable to reproduce the problem you
describe.
When I load my test page in the browser, then
On 08Oct2013 10:59, Skip Montanaro wrote:
| > Aiui apache log format uses space as delimiter, encapsulates strings in
| > '"' characters, and uses '-' as an empty field.
|
| Specifying the field delimiter as a space, you might be able to use
| the csv module to read these. I haven't done any Apac
On Tue, 08 Oct 2013 15:14:33 +, Neil Cerutti wrote:
> In any case, "\ud800\udc01" isn't a valid unicode string.
I don't think this is correct. Can you show me where the standard says
that Unicode strings[1] may not contain surrogates? I think that is a
critical point, and the FAQ conflates
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"),4))
print("imploring epsilon decamp graveyard's")
# Chose
On Tue, 08 Oct 2013 18:00:58 +0100, MRAB wrote:
> The only time you should get a surrogate pair in a Unicode string is in
> a narrow build, which doesn't exist in Python 3.3 and later.
Incorrect.
py> sys.version
'3.3.0rc3 (default, Sep 27 2012, 18:44:58) \n[GCC 4.1.2 20080704 (Red Hat
4.1.2-52)
On 10/8/2013 5:47 PM, Terry Reedy wrote:
On 10/8/2013 9:52 AM, Steven D'Aprano wrote:
But reading the previous entry in the FAQs:
http://www.unicode.org/faq/utf_bom.html#utf8-4
I interpret this as meaning that I should be able to encode valid pairs
of surrogates.
It says you should be able
On 10/8/2013 9:52 AM, Steven D'Aprano wrote:
I think this is a bug in Python's UTF-8 handling, but I'm not sure.
If I've read the Unicode FAQs correctly, you cannot encode *lone*
surrogate code points into UTF-8:
http://www.unicode.org/faq/utf_bom.html#utf8-5
Sure enough, using Python 3.3:
py
On Wed, Oct 9, 2013 at 12:11 AM, Steven D'Aprano
wrote:
> On Tue, 08 Oct 2013 18:16:01 +0530, Ravi Sahni wrote:
>
>>> So in that sense, computers are Turing Machines. Anything a physical
>>> computing device can compute, a Turing Machine could too. The converse
>>> is not true though: a Turing Mac
On 8/10/2013 10:28, kjaku...@gmail.com wrote:
> I have to define a function add(c1, c2), where c1 and c2 are capital letters;
> the return value should be the sum (obtained by converting the letters to
> numbers, adding mod 26, then converting back to a capital letter).
>
> All I have so far is
markot...@gmail.com writes:
> Well english isnt my native language, and there are things i just dont
> know how to explain in any language.
I sympathise with attempting to explain things in a foreign language.
Sorry that you have that difficulty here.
But the rest of Steven's advice is sound: yo
On Wed, Oct 9, 2013 at 7:27 AM, wrote:
> On Tuesday, October 8, 2013 5:47:56 AM UTC-10, rand...@fastmail.us wrote:
>> Importing random as r doesn't actually save anything, since " as r" is
>> the same five characters you saved from the one use of it.
>
> I realize, it just looks nicer than the or
On Tuesday, October 8, 2013 5:47:56 AM UTC-10, rand...@fastmail.us wrote:
> Importing random as r doesn't actually save anything, since " as r" is
> the same five characters you saved from the one use of it.
I realize, it just looks nicer than the original __import__, and since it
doesn't add any
On Tue, 08 Oct 2013 19:04:37 +0300, Νίκος Αλεξόπουλος wrote:
> Can you help me with this particuler problem please?
Unfortunately I can't, because I am unable to reproduce the problem you
describe.
When I load my test page in the browser, then replace it with something
else by entering an addr
On Tue, Oct 8, 2013 at 12:04 PM, Νίκος Αλεξόπουλος
wrote:
> Στις 8/10/2013 6:55 μμ, ο/η Denis McMahon έγραψε:
>
>> On Tue, 08 Oct 2013 13:04:34 +0300, Νίκος Αλεξόπουλος wrote:
>>
>>> I use this code to retrive or set a cookie to the visitor's browser if
>>> present and identify him bu it.
>>
>>
Br
>>> sys.version
'3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)]'
>>> '\ud800'.encode('utf-8')
Traceback (most recent call last):
File "", line 1, in
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud800' in position
0:
surrogates not allowed
On 10/07/2013 11:17 PM, 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"),4))
Second challenge: Use it for generating all your p
On Tue, Oct 8, 2013 at 1:30 PM, Νίκος Αλεξόπουλος wrote:
> Is there any better way to identif a previous visitor? i tried cookies which
> failed for me for the reason i opened this thread and host like follows:
>
> # try to locate the visitor
> cur.execute('''SELECT
>> I don't have an infinite stack to implement
>> lambda calculus, but...
>
> And then
>
>> But this is not a useful formalism. Any particular Program implements
>> a DFA, even as it runs on a TM. The issue of whether than TM is
>> finite or not can be dismissed because a simple calculation can
>
On 10/08/2013 09:07 AM, Tim Chase wrote:
On 2013-10-08 15:36, Denis McMahon wrote:
On Tue, 08 Oct 2013 08:33:48 -0400, Roy Smith wrote:
In the old days, it used to be /usr/dict/words. Port Python to
v6, and save another 6 characters :-)
Doesn't matter where it is, a link to it exists at "/w"
Is there any better way to identif a previous visitor? i tried cookies
which failed for me for the reason i opened this thread and host like
follows:
# try to locate the visitor
cur.execute('''SELECT * FROM visitors WHERE counterID = %s and host =
%s''', (cID, host) )
On 08.10.2013 17:25, Antoon Pardon wrote:
Op 08-10-13 16:24, Andreas Perstinger schreef:
Looking at the docs, I've found there is also "message_from_binary_file"
which works for me with your code.
http://docs.python.org/3/library/email.parser.html#email.message_from_binary_file
I can't try t
On 08/10/2013 16:23, Pete Forman wrote:
Steven D'Aprano writes:
I think this is a bug in Python's UTF-8 handling, but I'm not sure.
[snip]
py> s = '\ud800\udc01'
py> s.encode('utf-8')
Traceback (most recent call last):
File "", line 1, in
UnicodeEncodeError: 'utf-8' codec can't encode cha
On 10/8/13 7:15 AM, Marco Buttu wrote:
Also, as Terry mentions, no one has ever assigned the two names you
show,
Sincerely, I can not now if someone has assigned (or will assegne) in
such way...
If you explain more about what you are building, and where this crops up
as a problem, we can
On 2013-10-08 17: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"),4))
>
> Second challenge: Use it for generating all
On 2013-10-08 15:36, Denis McMahon wrote:
> On Tue, 08 Oct 2013 08:33:48 -0400, Roy Smith wrote:
> > In the old days, it used to be /usr/dict/words. Port Python to
> > v6, and save another 6 characters :-)
>
> Doesn't matter where it is, a link to it exists at "/w" now ;)
You prodigal...wasting
On 08/10/2013 15:28, kjaku...@gmail.com wrote:
I have to define a function add(c1, c2), where c1 and c2 are capital letters;
the return value should be the sum (obtained by converting the letters to
numbers, adding mod 26, then converting back to a capital letter).
I'd say the requirement is
Στις 8/10/2013 6:55 μμ, ο/η Denis McMahon έγραψε:
On Tue, 08 Oct 2013 13:04:34 +0300, Νίκος Αλεξόπουλος wrote:
I use this code to retrive or set a cookie to the visitor's browser if
present and identify him bu it.
You are aware that using cookies to track a user who doesn't want to be
tracked
On Tue, 08 Oct 2013 13:04:34 +0300, Νίκος Αλεξόπουλος wrote:
> I use this code to retrive or set a cookie to the visitor's browser if
> present and identify him bu it.
You are aware that using cookies to track a user who doesn't want to be
tracked won't work, because he'll just tell his browser
> Aiui apache log format uses space as delimiter, encapsulates strings in
> '"' characters, and uses '-' as an empty field.
Specifying the field delimiter as a space, you might be able to use
the csv module to read these. I haven't done any Apache log file work
since long before the csv module was
On Tue, Oct 8, 2013, at 11:44, kjaku...@gmail.com wrote:
> def add(c1, c2):
> ans = ''
This only makes sense if your answer is going to be multiple characters.
> for i in c1 + c2:
This line concatenates the strings together.
> ans += chrord(i)-65))%26) + 65)
The way you are
On 2013-10-08, Neil Cerutti wrote:
> In any case, "\ud800\udc01" isn't a valid unicode string. In a
> perfect world it would automatically get converted to
> '\u00010001' without intervention.
This last paragraph is erroneous. I must have had a typo in my
testing.
--
Neil Cerutti
--
https://ma
On Mon, 07 Oct 2013 23:33:31 -0700, Sam Giraffe wrote:
> 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:
Aiui apache log format uses space as delimiter, encapsulates strings in
'"' charac
On Tue, Oct 8, 2013, at 2:45, sprucebond...@gmail.com wrote:
> On Monday, October 7, 2013 8:17:21 PM UTC-10, Chris Angelico wrote:
> > print(*__import__("random").sample(open("/usr/share/dict/words").read().split("\n"),4))
> > # 87
>
> import random as r
> print(*r.sample(open("/usr/share/dict/wo
On Tuesday, October 8, 2013 11:36:51 AM UTC-4, rand...@fastmail.us wrote:
>
>
>
> Your description says capital letters, but 'a' is a lowercase letter.
>
>
>
> Does "mod 26" means A is 1, or is it 0? i.e., is A+A = B or is it A?
>
>
>
> What should your function do if the letter isn't a ca
On Tue, 08 Oct 2013 08:33:48 -0400, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
>> On Tue, Oct 8, 2013 at 5:48 PM, wrote:
>> > And if we were actually trying then that filename should just be
>> > "/w".
>> > Would get rid of another 19 chars.
>>
>> I'm working this on the assum
On Tue, Oct 8, 2013, at 10:28, kjaku...@gmail.com wrote:
> I have to define a function add(c1, c2), where c1 and c2 are capital
> letters; the return value should be the sum (obtained by converting the
> letters to numbers, adding mod 26, then converting back to a capital
> letter).
>
> All I hav
Op 08-10-13 16:24, Andreas Perstinger schreef:
On 08.10.2013 14:20, Antoon Pardon wrote:
As I don't know what encoding these messages will be in, I thought it
would be prudent to read stdin as binary data.
Using python 3.3 on a debian box I have the following code.
#!/usr/bin/python3
import s
Steven D'Aprano writes:
> I think this is a bug in Python's UTF-8 handling, but I'm not sure.
[snip]
> py> s = '\ud800\udc01'
> py> s.encode('utf-8')
> Traceback (most recent call last):
> File "", line 1, in
> UnicodeEncodeError: 'utf-8' codec can't encode character '\ud800' in
> position 0:
On 2013-10-08, Steven D'Aprano wrote:
> py> c = '\N{LINEAR B SYLLABLE B038 E}'
> py> surr_pair = c.encode('utf-16be')
> py> print(surr_pair)
> b'\xd8\x00\xdc\x01'
>
> and then use those same values as the code points, I ought to be able to
> encode to UTF-8, as if it were the same \N{LINEAR B SYL
You wrote this:
def add(c1, c2):
ord(c1) - ord('a') + 1
ord(c2) - ord('a') + 1
First of all, this looks like homework. People will help you with
concepts here, but most frown on just providing answers. With that in
mind look at this:
>>> ord('A')
65
>>> ord('a')
97
>>>
In your assignm
I rembembered a bit too late, are there any good tutorials for Pillow?
ImageTk.PhotoImage() keeps giving me error that there isnt such a method.
--
https://mail.python.org/mailman/listinfo/python-list
teisipäev, 8. oktoober 2013 17:26.33 UTC+3 kirjutas Steven D'Aprano:
> On Tue, 08 Oct 2013 07:15:46 -0700, markotaht wrote:
>
>
>
> > First helpful advice i have gotten from this forum
>
>
>
> If you insist on dropping cryptic comments with bad spelling, incoherent
>
> sentences, and a comp
>From what I gather he was viewing files uploaded to the ftp folder and found
>this warning.html file contained within... So my take on it is, someone just
>uploaded it and this guy is freaking out making a buffoon out of himself.
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, October 8, 2013 10:47:39 AM UTC-4, Robert Day wrote:
> On 08/10/13 15:28, kjaku...@gmail.com wrote:
>
> Can you give some expected outputs? For example, add('A', 'B') should
>
> presumably return 'C', and add('M', 'B') should presumably return 'O',
>
> but what about add('A', 'A')
I don't think you are allowed to use the word dumbass to describe anyone or
anything buddy.
On Tuesday, October 1, 2013 9:42:31 AM UTC-4, Ferrous Cranus wrote:
> Στις 1/10/2013 4:27 μμ, ο/η Chris “Kwpolska” Warrick έγραψε:
>
> > On Tue, Oct 1, 2013 at 3:15 PM, Νίκος wrote:
>
> >> Στις 1/10/2
On 08/10/13 15:28, kjaku...@gmail.com wrote:
I have to define a function add(c1, c2), where c1 and c2 are capital letters;
the return value should be the sum (obtained by converting the letters to
numbers, adding mod 26, then converting back to a capital letter).
Can you give some expected out
Στις 8/10/2013 2:08 μμ, ο/η Ian Kelly έγραψε:
This question is really about HTTP, not Python, so you'd have better
luck asking elsewhere. The most likely possibility is that the domain
doesn't match. For example, the cookie is set for the domain
www.foo.com, and the other webpage is linking to
On 08.10.2013 14:20, Antoon Pardon wrote:
As I don't know what encoding these messages will be in, I thought it
would be prudent to read stdin as binary data.
Using python 3.3 on a debian box I have the following code.
#!/usr/bin/python3
import sys
from email import message_from_file
sys.stdi
On Tue, 08 Oct 2013 07:15:46 -0700, markotaht wrote:
> First helpful advice i have gotten from this forum
If you insist on dropping cryptic comments with bad spelling, incoherent
sentences, and a complete lack of any context, it might be the last
advice you get too.
Please help us to help you.
I have to define a function add(c1, c2), where c1 and c2 are capital letters;
the return value should be the sum (obtained by converting the letters to
numbers, adding mod 26, then converting back to a capital letter).
All I have so far is:
def add(c1, c2):
ord(c1) - ord('a') + 1
ord(c
On 08/10/13 14:11, Steven D'Aprano wrote:
On Tue, 08 Oct 2013 18:16:01 +0530, Ravi Sahni wrote:
Presently Sir, I wish to ask single question: What you mean "wave our
hands"??
It is an idiom very common in Australia. (It may not be well known in the
rest of the English-speaking world.) It mea
Στις 8/10/2013 2:08 μμ, ο/η Ian Kelly έγραψε:
On Tue, Oct 8, 2013 at 4:04 AM, Νίκος Αλεξόπουλος wrote:
I use this code to retrive or set a cookie to the visitor's browser if
present and identify him bu it.
All work well except the situation where the user visits my webpage by
clicking a backli
First helpful advice i have gotten from this forum
--
https://mail.python.org/mailman/listinfo/python-list
Parent class is at the link.
--
https://mail.python.org/mailman/listinfo/python-list
On 2013-10-08, Mark Lawrence wrote:
> On 08/10/2013 06:34, Chandru Rajendran wrote:
>> Hi all,
>>
>> Please give me an idea about Multiprocessing and Multithreading.
>>
>> Thanks & Regards,
>>
>> Chandru
>>
>
> I'll assume that you're a newbie so I'll keep it simple.
> Multiprocessing is about mo
I think this is a bug in Python's UTF-8 handling, but I'm not sure.
If I've read the Unicode FAQs correctly, you cannot encode *lone*
surrogate code points into UTF-8:
http://www.unicode.org/faq/utf_bom.html#utf8-5
Sure enough, using Python 3.3:
py> surr = '\udc80'
py> surr.encode('utf-8')
Tra
On Tuesday, October 8, 2013 6:31:21 PM UTC+5:30, Ravi Sahni wrote:
> On Tue, Oct 8, 2013 at 11:14 AM, rusi wrote:
> > To explain at length will be too long and OT (off-topic) for this list.
> > I'll just give you a link and you tell me what you make of it:
> > http://sloan.stanford.edu/mousesite/S
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.
Yes, you are correct. It s
On Tue, 08 Oct 2013 18:16:01 +0530, Ravi Sahni wrote:
>> So in that sense, computers are Turing Machines. Anything a physical
>> computing device can compute, a Turing Machine could too. The converse
>> is not true though: a Turing Machine with infinite tape can compute
>> things where a real phys
On Tue, Oct 8, 2013 at 11:14 AM, rusi wrote:
> To explain at length will be too long and OT (off-topic) for this list.
> I'll just give you a link and you tell me what you make of it:
> http://sloan.stanford.edu/mousesite/Secondary/Whorfframe2.html
I am trying to read link. Very new idea: Buildi
On 2013-10-08, Sam Giraffe wrote:
>
> 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 - - [2
On Tue, Oct 8, 2013 at 1:20 PM, Steven D'Aprano wrote:
> On Tue, 08 Oct 2013 10:46:50 +0530, Ravi Sahni wrote:
>
>> On Tue, Oct 8, 2013 at 8:47 AM, rusi wrote:
>>> I can only say how ironic it sounds to someone who is familiar with the
>>> history of our field: Turing was not a computer scientist
In article ,
Chris Angelico wrote:
> On Tue, Oct 8, 2013 at 5:48 PM, wrote:
> > And if we were actually trying then that filename should just be "/w".
> > Would get rid of another 19 chars.
>
> I'm working this on the assumption that the dictionary file already
> exists (that's where it is o
I want to do some postprocessing on messages from a particular mailbox.
So I use getmail which will fetch the messages and feed them to stdin
of my program.
As I don't know what encoding these messages will be in, I thought it
would be prudent to read stdin as binary data.
Using python 3.3 on a
On 10/08/2013 01:07 PM, Ned Batchelder wrote:
On 10/8/13 6:13 AM, Marco Buttu wrote:
>>> class Foo:
... _Foo__a = 100
... __a = 33
...
>>> Foo._Foo__a
33
...
You also get a "problem" if you do this:
>>> class Foo:
... a = 100
... a = 33
...
>>> Foo.a
On Tue, Oct 8, 2013 at 4:04 AM, Νίκος Αλεξόπουλος wrote:
> I use this code to retrive or set a cookie to the visitor's browser if
> present and identify him bu it.
>
> All work well except the situation where the user visits my webpage by
> clicking a backlink on another wbpage.
>
> Then for some
On 10/8/13 6:13 AM, 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. Should be raising an exception (in order to
inform the user the t
On 10/08/2013 12:36 PM, Terry Reedy wrote:
On 10/8/2013 6:13 AM, 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.
No one qualified
On 10/8/2013 6:13 AM, 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.
No one qualified to use such names would do such a thing , so
On 8/10/2013 04:20, markot...@gmail.com wrote:
> I cant just subclassing doesent work.
I can't parse that "sentence."
> It seem the init method of the source class also calls out another
class. And the problem is, i can subclass the other class to with the required
function but the end result i
On 08.10.2013 08:33, Sam Giraffe wrote:
#this is a single line
string = '192.168.122.3 - - [29/Sep/2013:03:52:33 -0700] "GET / HTTP/1.0"
302 276 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"'
#trying to break up the pattern match for easy to read code
pattern = re.compile(r'(?P\d{1,3}\.\d{1,3
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. Should be raising an exception (in order to inform
the user the transformation of the name __a have been
# initialize cookie and retrieve cookie from clients browser
cookie = cookies.SimpleCookie( os.environ.get('HTTP_COOKIE') )
if cookie.get('ID') is not None:
cookieID = cookie['ID'].value
else:
cookieID = random.randrange(0, )
cookie['ID'] = cookieID
cookie['ID'
Alain Ketterlin writes:
> Antoon Pardon writes:
>
> > Op 07-10-13 19:15, Alain Ketterlin schreef:
>
> [...]
> >> That's fine. My point was: you can't at the same time have full
> >> dynamicity *and* procedural optimizations (like tail call opt).
> >> Everybody should be clear about the trade-off.
Op 07-10-13 23:27, random...@fastmail.us schreef:
> On Sat, Oct 5, 2013, at 3:39, Antoon Pardon wrote:
>> What does this mean?
>>
>> Does it mean that a naive implementation would arbitrarily mess up
>> stack traces and he wasn't interested in investigating more
>> sophisticated implementations?
>>
Νίκος Αλεξόπουλος writes:
> Error is: ProgrammingError(ProgrammingError(1064, "You have an error
> in your SQL syntax; check the manual that corresponds to your MySQL
> server version for the right syntax to use near 'WHERE counterID = 1
> and cookieID = '3815'' at line 3"),)
This is an error fr
Στις 8/10/2013 12:15 μμ, ο/η Νίκος Αλεξόπουλος έγραψε:
Hello, i'am trying to insert a new record or update an existing one in
case counterID(stands for the page's URL) and cookieID(random number) is
the same:
try:
# if first time for webpage; create new record( primary key is
autom
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 code
operations, even if written
Hello, i'am trying to insert a new record or update an existing one in
case counterID(stands for the page's URL) and cookieID(random number) is
the same:
try:
# if first time for webpage; create new record( primary key is
automatic, hit is defaulted ), if page exists then update reco
1 - 100 of 119 matches
Mail list logo