Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-04 Thread Chris Angelico
On Wed, Jun 5, 2013 at 2:19 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: On Jun 4, 11:00 am, Chris Angelico ros...@gmail.com wrote: You know, if you want a language with strict type declarations and extreme run-time efficiency, there are some around. I don't like declaring types

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
Τη Τρίτη, 4 Ιουνίου 2013 6:07:19 μ.μ. UTC+3, ο χρήστης Michael Torrie έγραψε: On 06/04/2013 08:18 AM, Νικόλαος Κούρας wrote: No, brackets are all there. Just tried: # Compute a set of current fullpaths fullpaths = set() path = /home/nikos/www/data/apps/ for root,

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread Νικόλαος Κούρας
All these popel i host thei websiets are friend fo mine and their webpages all of them run witohut any problem. Only my perosnal webpage, which utilizes python has these kind of issues, the other pages re joomlas and dreamweavers. Please as you see i have been trying anyhting i thought of and

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread Chris Angelico
On Wed, Jun 5, 2013 at 3:02 AM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: I'm willing to let someone with full root access to my webhost to see thigns from the inside. Does someone want to take o allok or at elast tell me what else i need to try, that hasn't been tried out yet? You need

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread Νικόλαος Κούρας
Τη Τρίτη, 4 Ιουνίου 2013 8:09:18 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: On Wed, Jun 5, 2013 at 3:02 AM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: I'm willing to let someone with full root access to my webhost to see thigns from the inside. Does someone want to take o allok

Re: Beginner question

2013-06-04 Thread Mitya Sirenef
On 06/04/2013 07:53 AM, Carlos Nepomuceno wrote: On 4 Jun 2013 12:28, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: [...] What's going on? Is there a way to make dict() to resolve the variables? Well yes. dict(**{a:0,b:1}) The dict() constructor makes a dictionary from keyword

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
What on eart is this damn error: Michael tried to explain to me about surrogates but dont think i understand it. Encoding giving me trouble years now. [Tue Jun 04 20:19:53 2013] [error] [client 46.12.95.59] Original exception was: [Tue Jun 04 20:19:53 2013] [error] [client 46.12.95.59]

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-04 Thread Ned Batchelder
On 6/4/2013 12:19 PM, Rick Johnson wrote: On Jun 4, 11:00 am, Chris Angelico ros...@gmail.com wrote: You know, if you want a language with strict type declarations and extreme run-time efficiency, there are some around. I don't like declaring types everywhere, i hate it. I prefer duck typed

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-04 Thread Jason Swails
On Tue, Jun 4, 2013 at 11:44 AM, Rick Johnson rantingrickjohn...@gmail.comwrote: This implicit conversion seems like a good idea at first, and i was caught up in the hype myself for some time: Hey, i can save a few keystrokes, AWESOME!. However, i can tell you with certainty that this

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-04 Thread Ian Kelly
On Tue, Jun 4, 2013 at 9:44 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: It is my firm belief that truth testing a value that is not a Boolean should raise an exception. If you want to convert a type to Boolean then pass it to the bool function: lst = [1,2,3] if bool(lst):

Re: create new python file

2013-06-04 Thread Gary Herron
On 06/04/2013 09:07 AM, kakararunachalserv...@gmail.com wrote: Hi, Can anyone please tell me how to dynamically create a new python file within a program??? What do you mean by a python file? If you mean a text file containing python code, then create it like any other text file. For

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Chris “Kwpolska” Warrick
On Tue, Jun 4, 2013 at 7:23 PM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: What on eart is this damn error: Michael tried to explain to me about surrogates but dont think i understand it. Encoding giving me trouble years now. [Tue Jun 04 20:19:53 2013] [error] [client 46.12.95.59]

Re: create new python file

2013-06-04 Thread kakararunachalservice
On Tuesday, June 4, 2013 11:14:32 PM UTC+5:30, Gary Herron wrote: On 06/04/2013 09:07 AM, kakararunachalserv...@gmail.com wrote: Hi, Can anyone please tell me how to dynamically create a new python file within a program??? What do you mean by a python file? If you mean a text

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Lele Gaifax
Νικόλαος Κούρας nikos.gr...@gmail.com writes: root@nikos [~]# [Tue Jun 04 19:50:16 2013] [error] [client 46.12.95.59] File files.py, line 72 [Tue Jun 04 19:50:16 2013] [error] [client 46.12.95.59] data = cur.fetchone()#URL is unique, so should only be one [Tue Jun 04 19:50:16

Re: create new python file

2013-06-04 Thread rusi
On Jun 4, 11:09 pm, kakararunachalserv...@gmail.com wrote: Thank you so much! Why didn't i thought about that. So, can i program within just by the print statement? Or do i have to do something else. I'm sorry, i just learning python. Thanks again! If you are just learning python, you

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
Τη Τρίτη, 4 Ιουνίου 2013 8:53:38 μ.μ. UTC+3, ο χρήστης Chris Kwpolska Warrick έγραψε: On Tue, Jun 4, 2013 at 7:23 PM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: What on eart is this damn error: Michael tried to explain to me about surrogates but dont think i understand it.

RE: Source code as text/plain

2013-06-04 Thread Carlos Nepomuceno
Thank you! Date: Tue, 4 Jun 2013 17:51:08 +0200 From: andiper...@gmail.com To: python-list@python.org Subject: Re: Source code as text/plain On 04.06.2013 00:34, Carlos Nepomuceno wrote: Date: Mon, 3 Jun 2013 09:06:46 +1000 From:

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
Τη Τρίτη, 4 Ιουνίου 2013 9:18:29 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε: Νικόλαος Κούρας nikos.gr...@gmail.com writes: from collections import Counter stmt = cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, ) chars_count = Counter(stmt) print(Number of '(': %d %

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Chris “Kwpolska” Warrick
On Tue, Jun 4, 2013 at 8:27 PM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: 2. No idea wht is flask or pyramid or wsgi http://lmgtfy.com/?q=flask+python http://lmgtfy.com/?q=pyramid+python http://lmgtfy.com/?q=wsgi+python 3. Files are located in '/home/nikos/www/data/apps' and they appear in

Re: create new python file

2013-06-04 Thread kakararunachalservice
On Tuesday, June 4, 2013 11:51:46 PM UTC+5:30, rusi wrote: On Jun 4, 11:09 pm, kakararunachalserv...@gmail.com wrote: Thank you so much! Why didn't i thought about that. So, can i program within just by the print statement? Or do i have to do something else. I'm sorry, i just learning

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
Τη Τρίτη, 4 Ιουνίου 2013 9:45:05 μ.μ. UTC+3, ο χρήστης Chris Kwpolska Warrick έγραψε: On Tue, Jun 4, 2013 at 8:27 PM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: 2. No idea wht is flask or pyramid or wsgi http://lmgtfy.com/?q=flask+python http://lmgtfy.com/?q=pyramid+python

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Lele Gaifax
Νικόλαος Κούρας nikos.gr...@gmail.com writes: Τη Τρίτη, 4 Ιουνίου 2013 9:18:29 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε: Νικόλαος Κούρας nikos.gr...@gmail.com writes: from collections import Counter stmt = cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, )

Re: Beginner question

2013-06-04 Thread Joshua Landau
On 4 June 2013 04:39, eschneide...@comcast.net wrote: 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')

Re: How to get an integer from a sequence of bytes

2013-06-04 Thread Joshua Landau
On 4 June 2013 14:39, Grant Edwards invalid@invalid.invalid wrote: On 2013-06-03, Dan Stromberg drsali...@gmail.com wrote: Today though, it would be difficult to sell a conventional (Von Neumann) computer that didn't have 8 bit bytes. There are tons (as in millions of units per month) of CPUs

RE: create new python file

2013-06-04 Thread Carlos Nepomuceno
Date: Tue, 4 Jun 2013 11:54:52 -0700 Subject: Re: create new python file From: kakararunachalserv...@gmail.com [...] So, can i program within just by the print statement? Or do i have to do something else. it is completely indecipherable (to me at least) what you are

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc5' in position 61: surrogates not allowed This indicates that i'am reading the filenames in a different encoding than what they actually are? What is i try to use bytes for path specifications, and have Python decode them in

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
Lele the output of: stmt = cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, ) chars_count = Counter(stmt) print(Number of '(': %d % chars_count['(']) print(Number of ')': %d % chars_count[')']) is: Number of '(': 2 Number of ')': 1 What do you make out of this please? --

Re: create new python file

2013-06-04 Thread Tobiah
So, can i program within just by the print statement? Or do i have to do something else. it is completely indecipherable (to me at least) what you are saying, leave aside any issues with python. He said, Oh, so writing python statements into a text file is as simple as printing them,

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Fábio Santos
On 4 Jun 2013 21:18, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Lele the output of: stmt = cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, ) chars_count = Counter(stmt) print(Number of '(': %d % chars_count['(']) print(Number of ')': %d % chars_count[')']) is:

Re: [RELEASED] Python 2.7.5

2013-06-04 Thread Joshua Landau
On 4 June 2013 00:12, Mark Lawrence breamore...@yahoo.co.uk wrote: On 03/06/2013 23:37, Carlos Nepomuceno wrote: What still doesn't work in Python 3? http://python3wos.appspot.com/ Don't take this list too seriously - some of those do have fully working and stable Python 3 packages that just

Re: [RELEASED] Python 2.7.5

2013-06-04 Thread Fábio Santos
On 4 Jun 2013 21:47, Joshua Landau joshua.landau...@gmail.com wrote: On 4 June 2013 00:12, Mark Lawrence breamore...@yahoo.co.uk wrote: On 03/06/2013 23:37, Carlos Nepomuceno wrote: What still doesn't work in Python 3? http://python3wos.appspot.com/ Don't take this list too seriously -

Problems with serial port interface

2013-06-04 Thread lionelgreenstreet
Hi, i'm programming in python for the first time: i want to create a serial port reader. I'm using python3.3 and pyQT4; i'm using also pyserial. Below a snippet of the code: class CReader(QThread): def start(self, ser, priority = QThread.InheritPriority): self.ser = ser

How to increment date by week?

2013-06-04 Thread PieGuy
Starting on any day/date, I would like to create a one year list, by week (start date could be any day of week). Having a numerical week index in front of date, ie 1-52, would be a bonus. ie, 1. 6/4/2013 2. 6/11/2013 3. 6/18/2013etc to # 52. And to save that

Re: How to increment date by week?

2013-06-04 Thread Joshua Landau
On 4 June 2013 22:31, PieGuy r90...@gmail.com wrote: Starting on any day/date, I would like to create a one year list, by week (start date could be any day of week). Having a numerical week index in front of date, ie 1-52, would be a bonus. ie, 1. 6/4/2013 2. 6/11/2013

Re: How to get an integer from a sequence of bytes

2013-06-04 Thread Chris Angelico
On Wed, Jun 5, 2013 at 5:51 AM, Joshua Landau joshua.landau...@gmail.com wrote: On 4 June 2013 14:39, Grant Edwards invalid@invalid.invalid wrote: On 2013-06-03, Dan Stromberg drsali...@gmail.com wrote: Today though, it would be difficult to sell a conventional (Von Neumann) computer that

Re: How to increment date by week?

2013-06-04 Thread Tim Chase
On 2013-06-04 14:31, PieGuy wrote: Starting on any day/date, I would like to create a one year list, by week (start date could be any day of week). Having a numerical week index in front of date, ie 1-52, would be a bonus. ie, 1. 6/4/2013 2. 6/11/2013 3. 6/18/2013etc to # 52.

Re: How to increment date by week?

2013-06-04 Thread Giorgos Tzampanakis
On 2013-06-04, PieGuy wrote: Starting on any day/date, I would like to create a one year list, by week (start date could be any day of week). Having a numerical week index in front of date, ie 1-52, would be a bonus. ie, 1. 6/4/2013 2. 6/11/2013 3.

Re: lstrip problem - beginner question

2013-06-04 Thread Dave Angel
On 06/04/2013 12:01 PM, Mark Lawrence wrote: On 04/06/2013 16:49, mstagliamonte wrote: [strip the double line spaced nonsense] Can you please check your email settings. It's bad enough being plagued with double line spaced mail from google, having it come from yahoo is just adding insult to

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Chris Angelico
On Wed, Jun 5, 2013 at 6:03 AM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc5' in position 61: surrogates not allowed This indicates that i'am reading the filenames in a different encoding than what they actually are? What is i

Re: How to increment date by week?

2013-06-04 Thread John Gordon
In b07dac48-1479-42cc-908c-21a3b2e14...@googlegroups.com PieGuy r90...@gmail.com writes: Starting on any day/date, I would like to create a one year list, by week (start date could be any day of week). Having a numerical week index in front of date, ie 1-52, would be a bonus. ie,

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread Chris Angelico
On Wed, Jun 5, 2013 at 3:12 AM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: I know what full root access mean. I also trust you. I'm hopeless man, its 1 week now dealing with this. The call is strong... I could rule the galaxy alongside my father... I've searched my feelings, and I know this

RE: How to increment date by week?

2013-06-04 Thread Carlos Nepomuceno
Date: Tue, 4 Jun 2013 14:31:07 -0700 Subject: How to increment date by week? From: r90...@gmail.com To: python-list@python.org Starting on any day/date, I would like to create a one year list, by week (start date could be any day of week). Having a numerical week index in front of

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-04 Thread Rick Johnson
On Jun 4, 12:42 pm, Ian Kelly ian.g.ke...@gmail.com wrote: By this manner, we can roll three common tests into one method: * Boolean conversion * member truthiness for iterables * type checking How exactly does this is_valid method perform the first two? Are you

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-04 Thread Mark Lawrence
On 05/06/2013 00:21, Rick Johnson wrote: [snip] Would you be kind enough not to smoke too much wacky baccy before posting, thanks. -- Steve is going for the pink ball - and for those of you who are watching in black and white, the pink is next to the green. Snooker commentator 'Whispering'

Do you consider Python a 4GL? Why (not)?

2013-06-04 Thread Carlos Nepomuceno
Do you consider Python a 4GL? Why (not)? -- http://mail.python.org/mailman/listinfo/python-list

Re: Do you consider Python a 4GL? Why (not)?

2013-06-04 Thread Tim Chase
On 2013-06-05 02:53, Carlos Nepomuceno wrote: Do you consider Python a 4GL? Why (not)? Of course it's a 4GL (4 Guido Language). You think he wrote it for somebody else? Unless you have some magical list of criteria that makes your own definition of 4GL, in which case you should look at your

Re: Do you consider Python a 4GL? Why (not)?

2013-06-04 Thread Mark Lawrence
On 05/06/2013 01:14, Tim Chase wrote: On 2013-06-05 02:53, Carlos Nepomuceno wrote: Do you consider Python a 4GL? Why (not)? Of course it's a 4GL (4 Guido Language). You think he wrote it for somebody else? Unless you have some magical list of criteria that makes your own definition of 4GL,

RE: Do you consider Python a 4GL? Why (not)?

2013-06-04 Thread Carlos Nepomuceno
I don't have an opinion yet, but I've found contradictory evidence from many sources, such as: A domain-specific language (DSL) is a type of programming language or specification language in software development and domain engineering dedicated to a particular problem domain, [...] The

Multiple Python one-liners

2013-06-04 Thread vasudevram
http://jugad2.blogspot.com/2013/06/multiple-python-one-liners.html Some interesting and useful one-liners there ... -- http://mail.python.org/mailman/listinfo/python-list

Re: How to increment date by week?

2013-06-04 Thread Skip Montanaro
Check out the rrule module in the python-dateutil package: http://labix.org/python-dateutil https://pypi.python.org/pypi/python-dateutil Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Do you consider Python a 4GL? Why (not)?

2013-06-04 Thread Dan Stromberg
On Tue, Jun 4, 2013 at 4:53 PM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: Do you consider Python a 4GL? Why (not)? By the wikipedia definition of 4GL and 5GL, I'd say Python is neither. And it's not a VHLL either, again according to the wikipedia definition. But IMO it is too

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread alex23
On Jun 5, 5:32 am, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Lele the output of: stmt = cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, ) chars_count = Counter(stmt) print(Number of '(': %d % chars_count['(']) print(Number of ')': %d % chars_count[')']) is: Number

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-04 Thread alex23
On Jun 5, 2:09 am, Rick Johnson rantingrickjohn...@gmail.com wrote: This is how you design a language for consistency and readability. Great! Now you can shut up and get back to work on RickPython4000. Come back and let us know all about it when it's done. --

Issue values dictionary

2013-06-04 Thread claire morandin
I have two text file with a bunch of transcript name and their corresponding length, it looks like this: ERCC.txt ERCC-2 1061 ERCC-3 1023 ERCC-4 523 ERCC-9 984 ERCC-00012 994 ERCC-00013 808 ERCC-00014 1957 ERCC-00016 844 ERCC-00017

RE: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Carlos Nepomuceno
Date: Tue, 4 Jun 2013 18:28:17 -0700 Subject: Re: Changing filenames from Greeklish = Greek (subprocess complain) From: wuwe...@gmail.com [...] Just a reminder to everyone that the OP originally went by the name of Ferrous Cranus: http://redwing.hutman.net/~mreed/warriorshtm/ferouscranus.htm

Re: Issue values dictionary

2013-06-04 Thread alex23
On Jun 5, 12:41 pm, claire morandin claire.moran...@gmail.com wrote: But I have a problem storing all size length to the value size as it is always comes back with the last entry. Could anyone explain to me what I am doing wrong and how I should set the values for each dictionary? Your code

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
Τη Τετάρτη, 5 Ιουνίου 2013 4:28:17 π.μ. UTC+3, ο χρήστης alex23 έγραψε: On Jun 5, 5:32 am, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Lele the output of: stmt = cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, ) chars_count = Counter(stmt) print(Number

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Chris Angelico
On Wed, Jun 5, 2013 at 1:28 PM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: YOU of all people should not speak at all, because you haven't helped me a bit. Its funny, how knowledge people that in facte tried to help me treat me with respect while people like you who have never been of any

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
Τη Τρίτη, 4 Ιουνίου 2013 10:31:20 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε: The code above was my (failed) attempt to focus your attention on why one of your scripts raised a SyntaxError: translating that code in plain english, that line (the stmt variable above) contains *two* open

Re: How to increment date by week?

2013-06-04 Thread steve . ferg . bitbucket
pyfdate -- http://www.ferg.org/pyfdate/ from pyfdate import Time w = Time(2013,1,2) # start with January 2, 2013, just for example # print the ISO weeknumber and date for 52 weeks # date looks like this: October 31, 2005 for i in range(52): w = w.plus(weeks=1) print (w.weeknumber, w.d)

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
Τη Τετάρτη, 5 Ιουνίου 2013 12:47:17 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: This indicates that i'am reading the filenames in a different encoding than what they actually are? What is i try to use bytes for path specifications,have Python decode them in 'utf-8' ? fullpaths.add(

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread Νικόλαος Κούρας
Τη Τετάρτη, 5 Ιουνίου 2013 1:12:26 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: On Wed, Jun 5, 2013 at 3:12 AM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: I know what full root access mean. I also trust you. I'm hopeless man, its 1 week now dealing with this. The call is

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
Τη Τετάρτη, 5 Ιουνίου 2013 6:44:38 π.μ. UTC+3, ο χρήστης Νικόλαος Κούρας έγραψε: Τη Τετάρτη, 5 Ιουνίου 2013 12:47:17 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: This indicates that i'am reading the filenames in a different encoding than what they actually are? What is i try to use

Re: Issue values dictionary

2013-06-04 Thread claire morandin
@alex23 I can't thank you enough this really helped me so much, not only fixing my issue but also understanding where was my original error Thanks a lot -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
One of my Greek filenames is Ευχή του Ιησού.mp3. Just a Greek filename with spaces. Is there a problem when a filename contain both english and greek letters? Isn't it still a unicode string? All i did in my CentOS was 'mv Euxi tou Ihsou.mp3 Ευχή του Ιησού.mp3 and the displayed filename

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread alex23
On Jun 5, 1:55 pm, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: [Wed Jun 05 06:49:56 2013] [error] [client 46.12.95.59] (2)No such file or directory: exec of '/home/nikos/public_html/cgi-bin/koukos.py' failed The script though its interpretign  correctly as seen from ni...@superhost.gr

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread Νικόλαος Κούρας
Here is the script: #!/usr/bin/python # coding=utf-8 import cgitb; cgitb.enable() import cgi, os, sys, locale, codecs from http import cookies #needed line, script does *not* work without it sys.stdout = codecs.getwriter('utf-8')(sys.stdout.detach()) #

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread Νικόλαος Κούρας
Τη Τετάρτη, 5 Ιουνίου 2013 7:34:55 π.μ. UTC+3, ο χρήστης alex23 έγραψε: On Jun 5, 1:55 pm, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: [Wed Jun 05 06:49:56 2013] [error] [client 46.12.95.59] (2)No such file or directory: exec of '/home/nikos/public_html/cgi-bin/koukos.py' failed

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread alex23
On Jun 5, 1:28 pm, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: AS you have seen i've been struggling days now to get a solution to this and the closing parenthesis is not the prbpoem here, unicode. Oh really? if they are unicode then i really see no trouble when trying to:

Re: lstrip problem - beginner question

2013-06-04 Thread Larry Hudson
On 06/04/2013 08:21 AM, mstagliamonte wrote: Hi everyone, I am a beginner in python and trying to find my way through... :) I am writing a script to get numbers from the headers of a text file. If the header is something like: h01 = ('scaffold_1') I just use: h01.lstrip('scaffold_') and this

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread alex23
On Jun 5, 2:40 pm, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Of course '/home/nikos/public_html/cgi-bin' = '/home/nikos/www/cgi-bin' What this has to do with what i asked? You display an error of No such file or directory and you wonder why I'm trying to confirm the two locations are the

Re: PyWart: The problem with print

2013-06-04 Thread Steven D'Aprano
On Tue, 04 Jun 2013 05:23:19 -0700, jmfauth wrote: How is is possible to arrive to such a situation ? The answer if far beyond my understanding Truer words have never been spoken. (although I have my opinion on the subject). http://en.wikipedia.org/wiki/Dunning–Kruger_effect -- Steven

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Νικόλαος Κούρας
Τη Τετάρτη, 5 Ιουνίου 2013 7:47:40 π.μ. UTC+3, ο χρήστης alex23 έγραψε: On Jun 5, 1:28 pm, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: AS you have seen i've been struggling days now to get a solution to this and the closing parenthesis is not the prbpoem here, unicode. Oh really?

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread Νικόλαος Κούρας
Τη Τετάρτη, 5 Ιουνίου 2013 7:59:31 π.μ. UTC+3, ο χρήστης alex23 έγραψε: On Jun 5, 2:40 pm, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Of course '/home/nikos/public_html/cgi-bin' = '/home/nikos/www/cgi-bin' What this has to do with what i asked? You display an error of No such

Re: How to get an integer from a sequence of bytes

2013-06-04 Thread Tim Roberts
Grant Edwards invalid@invalid.invalid wrote: On 2013-06-03, Dan Stromberg drsali...@gmail.com wrote: When I was a Freshman in college, I used a CDC Cyber a lot; it had 6 bit bytes and 60 bit words. This was in 1985. But you couldn't address individual 6-bit hextets in memory could you? My

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread alex23
On Jun 5, 3:11 pm, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: I'm not trolling, you are the one that do not understand. Here i swicthed the code from: path = /home/nikos/www/data/apps/ to this since '/home/nikos/public_html/cgi-bin' = '/home/nikos/www/cgi-bin' as i said: # Compute a

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-04 Thread Michael Torrie
On 06/04/2013 05:21 PM, Rick Johnson wrote: If you still feel that this idea is garbage, then, keep on writing your sloppy code. My proposal is the best method to handle the problems that arise with duck typed languages in a manner that is not restrictive or laborious -- it's actually quite

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-04 Thread Steven D'Aprano
On Wed, 05 Jun 2013 02:27:26 +1000, Chris Angelico wrote: On Wed, Jun 5, 2013 at 2:19 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: On Jun 4, 11:00 am, Chris Angelico ros...@gmail.com wrote: You know, if you want a language with strict type declarations and extreme run-time

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-04 Thread alex23
On Jun 5, 3:28 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: How many years has Rick been coming here, proclaiming loudly x [a]nd yet, he still has no clue what x actually means. It's not just duck typing. -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-04 Thread Michael Torrie
On 06/04/2013 10:15 PM, Νικόλαος Κούρας wrote: One of my Greek filenames is Ευχή του Ιησού.mp3. Just a Greek filename with spaces. Is there a problem when a filename contain both english and greek letters? Isn't it still a unicode string? All i did in my CentOS was 'mv Euxi tou Ihsou.mp3

[issue16991] Add OrderedDict written in C

2013-06-04 Thread Eric Snow
Eric Snow added the comment: Without too many optimzations, the C implementation of OrderedDict is basically between 1x and 4x the performance of raw dict. This contrasts with the pure Python OrderedDict, which falls in roughly between 4x and 100x. I've attached an addition to pybench, not

[issue16991] Add OrderedDict written in C

2013-06-04 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: Removed file: http://bugs.python.org/file30357/cOrderedDict.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___

[issue16991] Add OrderedDict written in C

2013-06-04 Thread Eric Snow
Eric Snow added the comment: Here's an updated patch that has fixes for recursive pickles and for a couple memory-related segfaults that I missed before. That leaves the following to be done: * handle the case where a node is deleted during iteration * check for any reference cycles (should

[issue18078] threading.Condition to allow notify on a specific waiter

2013-06-04 Thread Charles-François Natali
Charles-François Natali added the comment: I'm not convinced it's really useful. Furthermore, the complexity is rather bad: if T is the average number of waiting threads, an C the number of conditions being waited on, the wait is O(C) (appending to C wait queues) and wakeup is O(CT) (C removal

[issue18054] Add more exception related assertions to unittest

2013-06-04 Thread Nick Coghlan
Nick Coghlan added the comment: I like the idea of using the strategy pattern to at least decouple the assertion API from the main testcase API. I also like it better than the mixin suggested earlier. We would obviously have to keep the existing methods for backwards compatibility, but could

[issue18021] Update broken link to Apple Publication Style Guide

2013-06-04 Thread Madison May
Madison May added the comment: So I've done a quick comparison of the two, and for the most part each entry is an identical copy of the 2009 version. Some dated entries have been removed, which I would consider a plus -- who realistically needs to know how to refer to a 56K modems these day,

[issue18078] threading.Condition to allow notify on a specific waiter

2013-06-04 Thread João Bernardo
João Bernardo added the comment: I'm not convinced it's really useful. It doesn't seem a lot useful until you *really* need it. I've got 2 highly parallel programs that took advantage of this pattern. the wait is O(C) (appending to C wait queues) and wakeup is O(CT) (C removal from a

[issue18111] Add a default argument to min max

2013-06-04 Thread David Beazley
David Beazley added the comment: To me, the fact that m = max(s) if s else default doesn't work with iterators alone makes this worthy of consideration. I would also note that min/max are the only reduction functions that don't have the ability to work with a possibly empty sequence. For

[issue18132] buttons in turtledemo disappear on small screens

2013-06-04 Thread Jan Kanis
Changes by Jan Kanis jan.pyt...@jankanis.nl: -- components: +Demos and Tools type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18132 ___

[issue18132] buttons in turtledemo disappear on small screens

2013-06-04 Thread Jan Kanis
New submission from Jan Kanis: If the window of the turtledemo is small enough, the start/stop/clear buttons disappear. This is specifically a problem when running on a netbook with a small screen, because the buttons are never shown. For a newcommer checking out the demo app this could be

[issue18078] threading.Condition to allow notify on a specific waiter

2013-06-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: Furthermore, the complexity is rather bad: if T is the average number of waiting threads, an C the number of conditions being waited on, the wait is O(C) (appending to C wait queues) and wakeup is O(CT) (C removal from a T-length deque). Which just means

[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-06-04 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've tested a patch for the 2.7 branch on a 10.5 machine (which also failed to build without the patch), and will commit once I've finished running the testsuite on the 3.3 branch as well. -- ___ Python tracker

[issue18078] threading.Condition to allow notify on a specific waiter

2013-06-04 Thread João Bernardo
João Bernardo added the comment: BTW, I think it would be better to have wait_for_any() return a list of ready conditions rather than a boolean. That was the original idea until I realized `wait` and `wait_for` were just specializations of `wait_for_any`. This can probably be done with

[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-06-04 Thread Brett Cannon
Brett Cannon added the comment: I'm going to toss Armin's request over to core-mentorship since the fix is easy. Is all you are after, Armin, a ``not os.path.isfile(cfile) or os.path.islink(cfile)`` check which if true raises an exception? -- assignee: brett.cannon - status: closed -

[issue18054] Add more exception related assertions to unittest

2013-06-04 Thread Julian Berman
Julian Berman added the comment: I don't either really off the top of my head, though I've toyed with some things. If there's support for some exploration I wouldn't mind attempting a POC externally though. -- ___ Python tracker

[issue18054] Add more exception related assertions to unittest

2013-06-04 Thread Michael Foord
Michael Foord added the comment: There's always (almost) support for exploration... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18054 ___ ___

[issue18119] urllib.FancyURLopener does not treat URL fragments correctly

2013-06-04 Thread Mher Movsisyan
Changes by Mher Movsisyan mher.movsis...@gmail.com: -- nosy: +mher.movsisyan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18119 ___ ___

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-04 Thread Vajrasky Kok
Vajrasky Kok added the comment: Based on the input from Benjamin Peterson, I grab encoding from the os module in the getpass module. I put some test as well. Until the whole function is rewritten, I hope this patch will suffice and do the job properly. -- Added file:

[issue18005] faster modular exponentiation in some cases

2013-06-04 Thread Aaron Meurer
Changes by Aaron Meurer asmeu...@gmail.com: -- nosy: +Aaron.Meurer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18005 ___ ___ Python-bugs-list

[issue18078] threading.Condition to allow notify on a specific waiter

2013-06-04 Thread Charles-François Natali
Charles-François Natali added the comment: Which just means that waiting on C conditions is C times more expensive than waiting on 1 currently is. That seems reasonable enough to me, and anyway, I would expect C to be fairly small. Waking up a single thread (through notify()) is currently

<    1   2   3   >