That doesn't even works because input() is the same as eval(raw_input()). So
you'll get a NameError exception.
I think you know that. Perhaps you mean raw_input() instead of input().
In that case the answer is yes, it can be more 'efficient' because the
if-then-else clause always breaks the whil
Τη Τρίτη, 4 Ιουνίου 2013 1:37:37 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε:
>It looks like your client is ignoring the charset header, and
>interpreting the bytes as Latin-1 when they are actually ISO-8859-7.
>py> s = 'Eυχή του Ιησού.mp3'
>py> print(s.encode('ISO-8859-7').decode('latin-1'))
Could you please install them because i need to work?
a) pip (so that i can successfully run 'pip install pymysql'
b) development tools
I wiped the while perl away (leaving intact 2.6) but i wiped out pip at the
proces to.
--
http://mail.python.org/mailman/listinfo/python-list
Τη Τρίτη, 4 Ιουνίου 2013 1:46:53 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε:
> Not so -- it actually shows correctly, provided you use the right
> encoding. Tell your browser to view the page as UTF-8, and the file name
> is displayed correctly.
I can't believe Chrome whcih by default uses ut
On Mon, 03 Jun 2013 21:35:13 -0700, rusi wrote:
> On Jun 4, 3:37 am, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote:
>> (Note: this post is sent using UTF-8. If anyone reading this sees
>> mojibake, please make sure your email or news client is set to use
>> UTF-8.)
>>
>> On Mon, 03 Jun 2
On Mon, 03 Jun 2013 18:37:24 -0700, Rick Johnson wrote:
> On Sunday, June 2, 2013 1:58:30 PM UTC-5, Steven D'Aprano wrote:
>> On Sun, 02 Jun 2013 10:04:00 -0700, Rick Johnson wrote:
>> > A "wise programmer" may think he's solved the problem by writing a
>> > function called "debugprint" that looks
On 06/03/2013 05:33 PM, Carlos Nepomuceno wrote:
> I did a httpd 'make install' on CentOS 6 and it worked fine. Needed a
> few tweaks that I don't remember though.
>
> If you don't have any previous experience with Apache httpd settings
> I wouldn't try that on a production server.
Precisely. Gi
On Jun 4, 3:37 am, Steven D'Aprano wrote:
> (Note: this post is sent using UTF-8. If anyone reading this sees
> mojibake, please make sure your email or news client is set to use UTF-8.)
>
> On Mon, 03 Jun 2013 05:54:30 -0700, rusi wrote:
> > On Jun 3, 2:12 pm, Νικόλαος Κούρας wrote:
> >> You are
On Tue, 04 Jun 2013 05:16:13 +0200, Vito De Tullio wrote:
> Rick Johnson wrote:
>
>> Take your
>> standard yes/no/cancel dialog, i would expect it to return
>> True|False|None respectively,
>
> you clearly mean True / False / FileNotFound.
>
> ( http://thedailywtf.com/Articles/What_Is_Truth_0x3
On Monday, June 3, 2013 10:16:13 PM UTC-5, Vito De Tullio wrote:
> Rick Johnson wrote:
> > Take your
> > standard yes/no/cancel dialog, i would expect it to return
> > True|False|None respectively,
> you clearly mean True / False / FileNotFound.
No, i clearly meant what i said :-). FileDialogs onl
Is there a more efficient way of doing this? Any help is gratly appreciated.
import random
def partdeux():
print('''A man lunges at you with a knife!
Do you DUCK or PARRY?''')
option1=('duck')
option2=('parry')
optionsindex=[option1, option2]
randomizer=random.choice(optionsin
Rick Johnson wrote:
> Take your
> standard yes/no/cancel dialog, i would expect it to return
> True|False|None respectively,
you clearly mean True / False / FileNotFound.
( http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx )
--
ZeD
--
http://mail.python.org/mailman/listinfo/python-lis
Sorry. Should have been more clear.
This is a hosting account server. I am not in the sudoers file.
Was able to get PIL v1.1.7 to create a tiff file. Problem solved.
Thanks.
On Monday, June 3, 2013 12:41:17 PM UTC-4, Irmen de Jong wrote:
> On 3-6-2013 18:23, consult...@gmail.com wrote:
>
> >
On Tue, 04 Jun 2013 07:52:17 +0800, usman mjoda wrote:
> Good day everyone, I need assistance for python codes of aes 128 bits
> key that can be run on SAGE Application. Thanks
google pycrypto
--
Denis McMahon, denismfmcma...@gmail.com
--
http://mail.python.org/mailman/listinfo/python-list
On Sunday, June 2, 2013 1:58:30 PM UTC-5, Steven D'Aprano wrote:
> On Sun, 02 Jun 2013 10:04:00 -0700, Rick Johnson wrote:
Oh Steven, you've really outdone yourself this time with the
theatrics. I hope you scored some "cool points" with your
minions. Heck, you almost had me convinced until i slapp
Good day everyone, I need assistance for python codes of aes 128 bits key
that can be run on SAGE Application. Thanks
Sent from my Windows Phone
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Jun 3, 2013 at 4:18 PM, Carlos Nepomuceno <
carlosnepomuc...@outlook.com> wrote:
>
> > Date: Mon, 3 Jun 2013 15:41:41 -0700
> > Subject: Re: How to get an integer from a sequence of bytes
> > From: drsali...@gmail.com
> > To: python-list@python.org
> [...]
> Date: Mon, 3 Jun 2013 17:23:16 -0600
> From: torr...@gmail.com
> To: python-list@python.org
> Subject: Re: Apache and suexec issue that wont let me run my python script
>
> On 06/03/2013 04:13 PM, Carlos Nepomuceno wrote:
>> '/var/log/httpd' is the default
Thank you! :)
> To: python-list@python.org
> From: breamore...@yahoo.co.uk
[...]
>> What still doesn't work in Python 3?
>
> http://python3wos.appspot.com/
>
>>
>> Is Python 2.7.5 last (final, never to be updated) revision or will it still
>> be supported?
On 06/03/2013 04:13 PM, Carlos Nepomuceno wrote:
> '/var/log/httpd' is the default place for the Red Hat and CentOS installation
> of httpd.
>
> '/usr/local/apache/logs' is the default directory of the Apache httpd
> installation.
>
> httpd has probably been upgraded by 'make install'.
Oh wow.
> Date: Mon, 3 Jun 2013 15:41:41 -0700
> Subject: Re: How to get an integer from a sequence of bytes
> From: drsali...@gmail.com
> To: python-list@python.org
[...]
> Today though, it would be difficult to sell a conventional (Von
> Neumann) computer that didn'
On 03/06/2013 23:37, Carlos Nepomuceno wrote:
From: na...@animats.com
Subject: Re: [RELEASED] Python 2.7.5
Date: Mon, 3 Jun 2013 12:20:43 -0700
[...]
3.x is a different language, with different libraries, and lots of
things that still don't work. Many o
On Mon, 03 Jun 2013 02:32:42 -0700, Νικόλαος Κούρας wrote:
> Here is the whole code of files.py in case someone wants to comment on
> somethign about how to properly encode/decode the filanames, which seems
> to be the problem.
>
> http://pastebin.com/qXasy5iU
Second line in the file says:
imp
On Tue, Jun 4, 2013 at 8:37 AM, Carlos Nepomuceno
wrote:
>
>> From: na...@animats.com
>> Subject: Re: [RELEASED] Python 2.7.5
>> Date: Mon, 3 Jun 2013 12:20:43 -0700
> [...]
>> 3.x is a different language, with different libraries, and lots of
>> things tha
On Mon, 03 Jun 2013 02:12:31 -0700, Νικόλαος Κούρας wrote:
> Τη Δευτέρα, 3 Ιουνίου 2013 9:46:46 π.μ. UTC+3, ο χρήστης Steven D'Aprano
> έγραψε:
>
>> If I am right, the solution is to fix the file names to ensure that
>> they are all valid UTF-8 names. If you view the directory containing
>> these
(Note: this post is sent using UTF-8. If anyone reading this sees
mojibake, please make sure your email or news client is set to use UTF-8.)
On Mon, 03 Jun 2013 05:54:30 -0700, rusi wrote:
> On Jun 3, 2:12 pm, Νικόλαος Κούρας wrote:
>> You are right Steven, i just renames the file 'Euxi tou I
> From: na...@animats.com
> Subject: Re: [RELEASED] Python 2.7.5
> Date: Mon, 3 Jun 2013 12:20:43 -0700
[...]
> 3.x is a different language, with different libraries, and lots of
> things that still don't work. Many old applications will never
> be converted
On Mon, Jun 3, 2013 at 7:31 AM, Grant Edwards wrote:
> That's a common assumption, but historically, a "byte" was merely the
> smallest addressable unit of memory. The size of a "byte" on widely
> used used CPUs ranged from 4 bits to 60 bits.
>
> Quoting from http://en.wikipedia.org/wiki/Byte
>
>
> Date: Mon, 3 Jun 2013 09:06:46 +1000
> From: c...@zip.com.au
> To: c...@rebertia.com
[...]
> http://hg.python.org/cpython/raw-file/tip/Lib/string.py
What's the 'tip' tag?
--
http://mail.python.org/mailman/listinfo/pyt
On 2013-06-03, Dave Angel wrote:
> On 06/03/2013 10:31 AM, Grant Edwards wrote:
>> On 2013-06-03, Dennis Lee Bieber wrote:
>>> On Sun, 02 Jun 2013 21:25:45 +0200, Mok-Kong Shen
>>> declaimed the following in
>>> gmane.comp.python.general:
>>>
>>>
b'7' is the byte with the character 7 in a c
> From: a...@sci.fi
> Subject: Re: Apache and suexec issue that wont let me run my python script
> Date: Mon, 3 Jun 2013 18:20:00 +0300
> To: python-list@python.org
>
> Νικόλαος Κούρας writes:
>
>> [code]
>> root@nikos [/home/nikos/www/cgi-bin]# chmod g+w /
On 06/03/2013 10:31 AM, Grant Edwards wrote:
On 2013-06-03, Dennis Lee Bieber wrote:
On Sun, 02 Jun 2013 21:25:45 +0200, Mok-Kong Shen
declaimed the following in
gmane.comp.python.general:
b'7' is the byte with the character 7 in a certain code, so that's
ok. In other PLs one assigns an int
On Tue, Jun 4, 2013 at 6:31 AM, Steven D'Aprano
wrote:
> ... quite frankly I have no sympathy for
> the view that CPU cycles are so precious that we mustn't waste them. If
> that were the case, Python is the wrong language.
CPU cycles *are* valuable still, though. The efficiency of your code
dete
On Mon, 03 Jun 2013 15:09:48 -0400, Jason Swails wrote:
> But unlike RR, who suggests some elaborate interpreter-wide, ambiguous
> ignore-rule to squash out all of these functions, I'm simply suggesting
> that sometimes it's worth commenting-out debug print calls instead of
> 'just leaving them th
THRINAXODON SECRETLY STALKS THE ATHEISTS OF REDVILLE. NOW, THRINAXODON
PUNCHES RABBIT HOLE IN HIS FACE. HE SLAUGHTERED DAVID IAIN GREIG, WITH
A ROUNDHOUSE KICK. HE BEAT HARRIS TO DEATH, AND SENT FIRE TO DR.
NYIKOS. NOW, RICHARD DAWKINS SETS OUT WITH FIRE, TO HUNT THRINAXODON.
THRINAOXDON USES WATER
On 5/15/2013 9:19 PM, Benjamin Peterson wrote:
> It is my greatest pleasure to announce the release of Python 2.7.5.
>
> 2.7.5 is the latest maintenance release in the Python 2.7 series.
Thanks very much. It's important that Python 2.x be maintained.
3.x is a different language, with di
ack, sorry for the double-post.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Jun 3, 2013 at 1:12 PM, Ian Kelly wrote:
> On Sun, Jun 2, 2013 at 6:16 PM, Jason Swails
> wrote:
> > I'm actually with RR in terms of eliminating the overhead involved with
> > 'dead' function calls, since there are instances when optimizing in
> Python
> > is desirable. I actually rece
On Mon, Jun 3, 2013 at 1:12 PM, Ian Kelly wrote:
> On Sun, Jun 2, 2013 at 6:16 PM, Jason Swails
> wrote:
> > I'm actually with RR in terms of eliminating the overhead involved with
> > 'dead' function calls, since there are instances when optimizing in
> Python
> > is desirable. I actually rece
On 06/03/2013 09:01 AM, nagia.rets...@gmail.com wrote:
> Maybe you should tell us how you find out yours.
Chris and others have told you how they go about solving their problems.
Quite a few times. In fact repeating themselves even. I think we've
run out of different ways to saying it now.
It'
On May 31, 2013 6:27 PM, "Chris Angelico" wrote:
> Yeah. I know that particular one because I have l aliased to ls -CF
> (aka --columns --classify), mainly because it came that way as a
> commented-out entry in my first Debian. Have since become quite
> accustomed to it; to me, 'l' means 'look' (I
On Sun, Jun 2, 2013 at 6:16 PM, Jason Swails wrote:
> I'm actually with RR in terms of eliminating the overhead involved with
> 'dead' function calls, since there are instances when optimizing in Python
> is desirable. I actually recently adjusted one of my own scripts to
> eliminate branching an
On 3-6-2013 18:23, consult...@gmail.com wrote:
> It is great that Pillow wants to be "setuptools compatible" but without a
> suitable compiled library for x86_64 GNU/Linux, I am stuck between a rock and
> a hard place.
>
> Any suggestions?
>
Try your distribution's package repository.
$ sudo
It is great that Pillow wants to be "setuptools compatible" but without a
suitable compiled library for x86_64 GNU/Linux, I am stuck between a rock and a
hard place.
Any suggestions?
--
http://mail.python.org/mailman/listinfo/python-list
Νικόλαος Κούρας writes:
> [code]
> root@nikos [/home/nikos/www/cgi-bin]# chmod g+w /var/log/httpd/suexec.log
> root@nikos [/home/nikos/www/cgi-bin]# ls -l /var/log/httpd/suexec.log
> -rw-rw-r-- 1 root root 0 Jun 1 02:52 /var/log/httpd/suexec.log
> [/code]
>
>
> and still iam receiving the same er
Τη Δευτέρα, 3 Ιουνίου 2013 5:35:46 μ.μ. UTC+3, ο χρήστης Walter Hurry έγραψε:
> On Sun, 02 Jun 2013 14:41:45 +1000, Chris Angelico wrote:
>
>
>
> > Nikos just
>
> > needs to learn the skill of figuring out where his problems really are.
>
> >
>
> Between the keyboard and the chair, obv.
May
> Date: Sun, 2 Jun 2013 13:43:24 -0700
> Subject: Re: [Python-Dev] New FreeBSD 10.0-CURRENT buildbot
> From: drsali...@gmail.com
> To: carlosnepomuc...@outlook.com
> CC: python-...@python.org
>
>
> On Sun, Jun 2, 2013 at 12:51 PM, Carlos Nepomuceno
> mail
On Sun, 02 Jun 2013 14:41:45 +1000, Chris Angelico wrote:
> Nikos just
> needs to learn the skill of figuring out where his problems really are.
>
Between the keyboard and the chair, obv.
--
http://mail.python.org/mailman/listinfo/python-list
On 2013-06-03, Dennis Lee Bieber wrote:
> On Sun, 02 Jun 2013 21:25:45 +0200, Mok-Kong Shen
> declaimed the following in
> gmane.comp.python.general:
>
>
>> b'7' is the byte with the character 7 in a certain code, so that's
>> ok. In other PLs one assigns an int to a byte, with that int in either
Τη Δευτέρα, 3 Ιουνίου 2013 3:54:30 μ.μ. UTC+3, ο χρήστης rusi έγραψε:
> Is that how you renamed your file?
> In any case thats what I see!
> [Dont whether to say: Its greek to me or its not greek to me!!]
Now! that weird again.
I rename sit using proper Greek letters but as it appears to you it a
On 2013-06-03 08:55, Steven D'Aprano wrote:
The sys module defines two hooks that are used in the interactive
interpreter:
* sys.displayhook(value) gets called with the result of evaluating the
line when you press ENTER;
* sys.excepthook(type, value, traceback) gets called with the details of
t
On 6/3/2013 3:55 AM, Steven D'Aprano wrote:
The sys module defines two hooks that are used in the interactive
interpreter:
* sys.displayhook(value) gets called with the result of evaluating the
line when you press ENTER;
* sys.excepthook(type, value, traceback) gets called with the details of
t
On 06/03/2013 04:49 AM, Mark Lawrence wrote:
On 03/06/2013 04:10, Dan Sommers wrote:
On Sun, 02 Jun 2013 20:16:21 -0400, Jason Swails wrote:
... If you don't believe me, you've never hit a bug that 'magically'
disappears when you add a debugging print statement ;-).
Ah, yes. The Heisenbug.
On Jun 3, 2:12 pm, Νικόλαος Κούρας wrote:
> You are right Steven, i just renames the file 'Euxi tou Ihsou.mp3' => 'Eõ÷Þ
> ôïõ Éçóïý.mp3' and…
Is that how you renamed your file?
In any case thats what I see!!
[Dont whether to say: Its greek to me or its not greek to me!!]
--
http://mail.python.
I would appreciate any help or comment.
The idea is
to create a server in python that serves maps on the internet. The maps have to
be in MBTiles format, which is a SQLite database that store all the map tiles
in a single file. Taking this as an example
http://a.tiles.mapbox.com/v3/mapbox.geograph
On 3 June 2013 04:18, Chris Angelico wrote:
> On Mon, Jun 3, 2013 at 12:30 PM, alex23 wrote:
>> On Jun 1, 10:24 am, Chris Angelico wrote:
>>> Hmm. What other MUD commands have obvious Unix equivalents?
>>>
>>> say --> echo
>>> emote --> python -c
>>> attack --> sudo rm -f
>>
>> who --> who
>> te
On 2013-06-03 05:20, Dan Sommers wrote:
On Sun, 02 Jun 2013 23:23:42 -0400, Jason Swails wrote:
... (And yes, a good portion of our code is -still- in Fortran -- but
at least it's F90+ :).
I am a huge proponent of using the right tool for the job. There is
nothing wrong with some well-place
Here is the whole code of files.py in case someone wants to comment on
somethign about how to properly encode/decode the filanames, which seems to be
the problem.
http://pastebin.com/qXasy5iU
--
http://mail.python.org/mailman/listinfo/python-list
Τη Δευτέρα, 3 Ιουνίου 2013 9:46:46 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε:
> If I am right, the solution is to fix the file names to ensure that they
> are all valid UTF-8 names. If you view the directory containing these
> files in a file browser that supports UTF-8, do you see any file n
On Mon, Jun 3, 2013 at 7:00 PM, Mark Lawrence wrote:
> On 03/06/2013 07:11, Νικόλαος Κούρας wrote:
>>
>> Thankls Michael,
>>
>> are these two behave the same in your opinion?
>>
>> sys.stdout = os.fdopen(1, 'w', encoding='utf-8')
>>
>> which is what i have now
>> opposed to this one
>>
>> import o
On 3 Jun 2013 09:04, "Steven D'Aprano"
wrote:
>
> The sys module defines two hooks that are used in the interactive
> interpreter:
>
> * sys.displayhook(value) gets called with the result of evaluating the
> line when you press ENTER;
>
> * sys.excepthook(type, value, traceback) gets called with t
On 03/06/2013 07:11, Νικόλαος Κούρας wrote:
Thankls Michael,
are these two behave the same in your opinion?
sys.stdout = os.fdopen(1, 'w', encoding='utf-8')
which is what i have now
opposed to this one
import ocdecs
sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
Which one should
On 03/06/2013 04:10, Dan Sommers wrote:
On Sun, 02 Jun 2013 20:16:21 -0400, Jason Swails wrote:
... If you don't believe me, you've never hit a bug that 'magically'
disappears when you add a debugging print statement ;-).
Ah, yes. The Heisenbug. ;-)
We used to run into those back in the da
On Mon, 03 Jun 2013 17:17:12 +1000, Chris Angelico wrote:
> On Mon, Jun 3, 2013 at 3:49 PM, Michael Torrie
> wrote:
>> On 06/02/2013 12:18 PM, Rick Johnson wrote:
>>> On Sunday, June 2, 2013 12:49:02 PM UTC-5, Dan Sommers wrote:
On Mon, 03 Jun 2013 03:20:52 +1000, Chris Angelico wrote:
>
The sys module defines two hooks that are used in the interactive
interpreter:
* sys.displayhook(value) gets called with the result of evaluating the
line when you press ENTER;
* sys.excepthook(type, value, traceback) gets called with the details of
the exception when your line raises an excep
On Mon, Jun 3, 2013 at 4:46 PM, Steven D'Aprano
wrote:
> Then, when
> you try to read the file names in UTF-8, you hit an illegal byte, half of
> a surrogate pair perhaps, and everything blows up.
Minor quibble: Surrogates are an artifact of UTF-16, so they're 16-bit
values like 0xD808 or 0xDF45.
On Mon, Jun 3, 2013 at 3:49 PM, Michael Torrie wrote:
> On 06/02/2013 12:18 PM, Rick Johnson wrote:
>> On Sunday, June 2, 2013 12:49:02 PM UTC-5, Dan Sommers wrote:
>>> On Mon, 03 Jun 2013 03:20:52 +1000, Chris Angelico wrote:
On Mon, Jun 3, 2013 at 3:04 AM, Rick Johnson
>>> [...] Or use the
On Mon, Jun 3, 2013 at 12:34 AM, Dan Sommers wrote:
> On Mon, 03 Jun 2013 13:37:27 +1000, Tim Delaney wrote:
>
>> With the increase in use of higher-level languages, these days
>> Heisenbugs most often appear with multithreaded code that doesn't
>> properly protect critical sections, but as you sa
68 matches
Mail list logo