Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 30-06-13 22:14, Νίκος schreef: Στις 30/6/2013 10:58 μμ, ο/η Robert Kern έγραψε: On 2013-06-30 18:24, Νίκος wrote: Στις 29/6/2013 8:00 μμ, ο/η Mark Lawrence έγραψε: Why this when the approach to Nick the Incompetant Greek has been to roll out the red carpet? Your mother is incompetent

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 30-06-13 23:57, Joshua Landau schreef: On 30 June 2013 20:58, Robert Kernrobert.k...@gmail.com wrote: On 2013-06-30 18:24, Νίκος wrote: Στις 29/6/2013 8:00 μμ, ο/η Mark Lawrence έγραψε: Why this when the approach to Nick the Incompetant Greek has been to roll out the red carpet? Your

Re: Don't feed the troll...

2013-07-01 Thread Antoon Pardon
Op 30-06-13 19:50, Ian Kelly schreef: On Sun, Jun 30, 2013 at 11:25 AM, Antoon Pardon That is a bit odd. Rurpy seemed to consider it a big nono if others used methods that would coerce him to change his behaviour. But here you see shaming as an option which seems a coercive method. Well,

Re: indexerror: list index out of range??

2013-07-01 Thread Joshua Landau
On 29 June 2013 15:30, Mark Lawrence breamore...@yahoo.co.uk wrote: On 29/06/2013 14:44, Dave Angel wrote: Since you're using the arrogant and buggy GoogleGroups, this http://wiki.python.org/moin/GoogleGroupsPython. Please don't make comments like this, you'll upset the Python Mailing List

password protect file

2013-07-01 Thread gmsiders
I was wondering if there was a couple of words or things i could add to the top of my python script to password protect it so that it asks user for the password and then after three tries it locks them out or says access denied and closes/ends the script but if they get it wright it proceeds on

Re: Closures in leu of pointers?

2013-07-01 Thread Steven D'Aprano
On Sat, 29 Jun 2013 23:46:12 -0600, Ian Kelly wrote: On a related note, I think that generator functions should in some way be explicitly marked as such in the declaration, rather than needing to scan the entire function body for a yield statement to determine whether it's a generator or not.

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 9:23 πμ, ο/η Antoon Pardon έγραψε: Enough is enough. Iam not a troll, neither incompetent. Period. No not period. You have by your behaviour made yourself a reputation of being an incompetent inconsiderate jerk. You don't lose such a repuation by simply claiming you are not.

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 9:37 πμ, ο/η Antoon Pardon έγραψε: Remember that Nick is as much a human as all of us, he is bound to have his feelings hurt when so many people pick on him -- whether they are justified or not. So? Should we particularly care about Nikos's feelings? Nikos is not the victim, he

Re: indexerror: list index out of range??

2013-07-01 Thread Robert Kern
On 2013-06-29 16:52, Joshua Landau wrote: On 29 June 2013 15:30, Mark Lawrence breamore...@yahoo.co.uk wrote: On 29/06/2013 14:44, Dave Angel wrote: Since you're using the arrogant and buggy GoogleGroups, this http://wiki.python.org/moin/GoogleGroupsPython. Please don't make comments like

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 09:52, Νίκος schreef: Στις 1/7/2013 9:23 πμ, ο/η Antoon Pardon έγραψε: Enough is enough. Iam not a troll, neither incompetent. Period. No not period. You have by your behaviour made yourself a reputation of being an incompetent inconsiderate jerk. You don't lose such a repuation

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 09:55, Νίκος schreef: Στις 1/7/2013 9:37 πμ, ο/η Antoon Pardon έγραψε: Remember that Nick is as much a human as all of us, he is bound to have his feelings hurt when so many people pick on him -- whether they are justified or not. So? Should we particularly care about Nikos's

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 11:54 πμ, ο/η Antoon Pardon έγραψε: So shut your piehole and start proving yourself useful in this list. Or sod off. Preferably do the latter. Oh we do have illusions of grandeur, don't we? You are in no position to judge who is useful on this list or not. I'am not waste any

Need explanation of this error

2013-07-01 Thread prerit86
Hi, I'm new to Python and trying to run a already written code. Can someone please explain the error below? And if possible, how do I resolve this? Traceback (most recent call last): File c:\Project_1\regression_1.py, line 7, in module from sklearn import metrics, cross_validation,

Re: Need explanation of this error

2013-07-01 Thread Robert Kern
On 2013-07-01 10:13, preri...@gmail.com wrote: Hi, I'm new to Python and trying to run a already written code. Can someone please explain the error below? And if possible, how do I resolve this? Traceback (most recent call last): File c:\Project_1\regression_1.py, line 7, in module

Re: settrace doesn't trace builtin functions

2013-07-01 Thread Skip Montanaro
I've been using the settrace function to write a tracer for my program, which is working great except that it doesn't seem to work for built-in functions, like open('filename.txt'). This doesn't seem to be documented, so I'm not sure if I'm doing something wrong or that's the expected

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 11:05, Νίκος schreef: Στις 1/7/2013 11:54 πμ, ο/η Antoon Pardon έγραψε: So shut your piehole and start proving yourself useful in this list. Or sod off. Preferably do the latter. Oh we do have illusions of grandeur, don't we? You are in no position to judge who is useful on this

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Steve Simmons
Νίκος ni...@superhost.gr wrote: Στις 1/7/2013 11:54 πμ, ο/η Antoon Pardon έγραψε: So shut your piehole and start proving yourself useful in this list. Or sod off. Preferably do the latter. Oh we do have illusions of grandeur, don't we? You are in no position to judge who is useful on this

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 12:32 μμ, ο/η Antoon Pardon έγραψε: Op 01-07-13 11:05, Νίκος schreef: Στις 1/7/2013 11:54 πμ, ο/η Antoon Pardon έγραψε: So shut your piehole and start proving yourself useful in this list. Or sod off. Preferably do the latter. Oh we do have illusions of grandeur, don't we? You

Re: Need explanation of this error

2013-07-01 Thread Denis McMahon
On Mon, 01 Jul 2013 02:13:50 -0700, prerit86 wrote: I'm new to Python and trying to run a already written code. Can someone please explain the error below? And if possible, how do I resolve this? ImportError: DLL load failed: The specified module could not be found. You're missing the dll

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 12:31 μμ, ο/η Steve Simmons έγραψε: I don't know about the other members of this list but I am becoming increasingly disturbed by the rudeness and especially the foul language that is being perpetrated on this thread. Please, if you have any decency at all, continue the rest of

Re: Need explanation of this error

2013-07-01 Thread prerit86
Thanks! Solved. I found the package that would resolve this dependency. It was numpy-MKL. Downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pandas -- http://mail.python.org/mailman/listinfo/python-list

File exists but Python says 'not found'.

2013-07-01 Thread prerit86
I'm running this code that reads 2 csv files (one of them is train.csv). The code gives an error saying 'file not does not exist'. However, the file does exists in the same location as the .py file. Can someone please help me on this. Thanks! Code Output-- Reading dataset... Traceback (most

Re: File exists but Python says 'not found'.

2013-07-01 Thread Robert Kern
On 2013-07-01 11:47, preri...@gmail.com wrote: I'm running this code that reads 2 csv files (one of them is train.csv). The code gives an error saying 'file not does not exist'. However, the file does exists in the same location as the .py file. Can someone please help me on this. Thanks!

Re: File exists but Python says 'not found'.

2013-07-01 Thread Antoon Pardon
Op 01-07-13 12:47, preri...@gmail.com schreef: I'm running this code that reads 2 csv files (one of them is train.csv). The code gives an error saying 'file not does not exist'. However, the file does exists in the same location as the .py file. Can someone please help me on this. Thanks!

Re: File exists but Python says 'not found'.

2013-07-01 Thread prerit86
The variable 'train' is being called like this - def main(train='train.csv', test='test.csv', submit='logistic_pred.csv'): print Reading dataset... train_data = pd.read_csv(train) test_data = pd.read_csv(test) Let me know if I need to post the full code. --

Re: File exists but Python says 'not found'.

2013-07-01 Thread prerit86
I got it. The working directory was different. Sorry, I'm new and didn't the working directory has to be the location of the data. I thought the location of .py file and data file should be same. Thanks! Es. Robert Kern. -- http://mail.python.org/mailman/listinfo/python-list

Re: File exists but Python says 'not found'.

2013-07-01 Thread Antoon Pardon
Op 01-07-13 12:57, preri...@gmail.com schreef: The variable 'train' is being called like this - def main(train='train.csv', test='test.csv', submit='logistic_pred.csv'): print Reading dataset... train_data = pd.read_csv(train) test_data = pd.read_csv(test) Let me know if I

Re: File exists but Python says 'not found'.

2013-07-01 Thread prerit86
My answers I think Robert wanted to know how you started the program. What instruction do you use to launch? - used command c:\python27\python.exe c:\project_1\code.py In what directory are you launching your program? - working directory was c: - python is in c:\python27 - code was in

Re: File exists but Python says 'not found'.

2013-07-01 Thread Dave Angel
On 07/01/2013 07:00 AM, preri...@gmail.com wrote: I got it. The working directory was different. Sorry, I'm new and didn't the working directory has to be the location of the data. I thought the location of .py file and data file should be same. Thanks! Es. Robert Kern. Python didn't make

Re: File exists but Python says 'not found'.

2013-07-01 Thread prerit86
I know. Had I written the code, I would have not done this. I just wanted to get some initial results by leveraging this code. I would now build on this to improve my work's accuracy. Thanks for the inputs! -- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 11:37, Νίκος schreef: Στις 1/7/2013 12:32 μμ, ο/η Antoon Pardon έγραψε: The above is a first class illustration of why I think you are problematic. We don't want you to explain yourself, we want you to change your behaviour. Someone behaving like a jerk explaining himself is

Re: indexerror: list index out of range??

2013-07-01 Thread Steven D'Aprano
On Mon, 01 Jul 2013 09:45:52 +0100, Robert Kern wrote: On 2013-06-29 16:52, Joshua Landau wrote: On 29 June 2013 15:30, Mark Lawrence breamore...@yahoo.co.uk wrote: On 29/06/2013 14:44, Dave Angel wrote: Since you're using the arrogant and buggy GoogleGroups, this

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 11:46, Νίκος schreef: Στις 1/7/2013 12:31 μμ, ο/η Steve Simmons έγραψε: I don't know about the other members of this list but I am becoming increasingly disturbed by the rudeness and especially the foul language that is being perpetrated on this thread. Please, if you have any

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Steven D'Aprano
On Mon, 01 Jul 2013 10:52:28 +0300, Νίκος wrote: All i did was asking for help for issues i couldn't solve. That what everybody would do if he couldn't help himself solve something. [...] So shut your piehole and start proving yourself useful in this list. Or sod off. Preferably do the

Re: Stupid ways to spell simple code

2013-07-01 Thread Neil Cerutti
On 2013-06-30, Chris Angelico ros...@gmail.com wrote: So, here's a challenge: Come up with something really simple, and write an insanely complicated - yet perfectly valid - way to achieve the same thing. Bonus points for horribly abusing Python's clean syntax in the process. Go on, do your

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 14:43, Steven D'Aprano schreef: Νίκος, I am not going to wade through this long, long thread to see what problem you are trying to solve today. Nikos is not trying to solve a problem in this thread. What happened is that the original poster here got a rather short answer to his

Re: Stupid ways to spell simple code

2013-07-01 Thread Chris Angelico
On Mon, Jul 1, 2013 at 10:59 PM, Neil Cerutti ne...@norwich.edu wrote: On 2013-06-30, Chris Angelico ros...@gmail.com wrote: So, here's a challenge: Come up with something really simple, and write an insanely complicated - yet perfectly valid - way to achieve the same thing. Bonus points for

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 3:28 μμ, ο/η Antoon Pardon έγραψε: Did i told you to fuck off? Well never mind. Fuck off! I think this needs some work. You need more creativity. Try to think of something more forceful. My little niece of 10 can do better than that. Well i could, but i don't want to spend my

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 3:43 μμ, ο/η Steven D'Aprano έγραψε: On Mon, 01 Jul 2013 10:52:28 +0300, Νίκος wrote: All i did was asking for help for issues i couldn't solve. That what everybody would do if he couldn't help himself solve something. [...] So shut your piehole and start proving yourself

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Andrew Berg
On 2013.07.01 08:28, Νίκος wrote: So, Steven you want me to sit tight and read all the insults coming from this guy? If that happened to you, wouldn't you feel the need and urge to reply back and stand for yourself? You can ignore it (this is the best solution) or you can take it off-list.

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Walter Hurry
On Mon, 01 Jul 2013 10:56:54 +0200, Antoon Pardon wrote: Op 01-07-13 09:55, Νίκος schreef: Στις 1/7/2013 9:37 πμ, ο/η Antoon Pardon έγραψε: Remember that Nick is as much a human as all of us, he is bound to have his feelings hurt when so many people pick on him -- whether they are justified

Re: Don't feed the troll...

2013-07-01 Thread rurpy
On 06/30/2013 11:25 AM, Antoon Pardon wrote: Op 28-06-13 19:20, Ian Kelly schreef: [...] Flaming a troll is not punishing to them. I see I didn't make my point clear. This was my response to your remark about the collective experience going back decades. The collective experience often

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread rusi
On Monday, July 1, 2013 7:31:18 PM UTC+5:30, Walter Hurry wrote: Please...enough. Polite request: consider killfiling him and having done with it. It is irritating to see all the responses even though I killfiled him long ago. Whilst I realise, of course, that it is entirely your

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Neil Cerutti
On 2013-07-01, rusi rustompm...@gmail.com wrote: To wit: 1. Kill-filing/spam-filtering are tools for spam. Nikos is certainly not spamming in the sense of automated sending out of cooked mail to zillions of recipients/lists. His posts are definite and intentional I disagree. Kill-files are

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Steven D'Aprano
On Mon, 01 Jul 2013 16:28:52 +0300, Νίκος wrote: Στις 1/7/2013 3:43 μμ, ο/η Steven D'Aprano έγραψε: [...] The above of course assumes that I have not kill-filed you for continuing to be abusive on-list. So, Steven you want me to sit tight and read all the insults coming from this guy?

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Steven D'Aprano
On Mon, 01 Jul 2013 15:08:18 +0200, Antoon Pardon wrote: Op 01-07-13 14:43, Steven D'Aprano schreef: Νίκος, I am not going to wade through this long, long thread to see what problem you are trying to solve today. Nikos is not trying to solve a problem in this thread. What happened is

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread rusi
On Monday, July 1, 2013 9:04:11 PM UTC+5:30, Steven D'Aprano wrote: And no, i do not want to piss off people like you, who have spend time helping me. Too late. I asked you to stop flaming on-list, and you didn't. I am now kill-filing you for a month. Feel grateful that it is not permanent,

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 6:34 μμ, ο/η Steven D'Aprano έγραψε: And no, i do not want to piss off people like you, who have spend time helping me. Too late. I asked you to stop flaming on-list, and you didn't. I am now kill-filing you for a month. Feel grateful that it is not permanent, and take this time

Re: Stupid ways to spell simple code

2013-07-01 Thread Joshua Landau
On 1 July 2013 14:14, Chris Angelico ros...@gmail.com wrote: On Mon, Jul 1, 2013 at 10:59 PM, Neil Cerutti ne...@norwich.edu wrote: On 2013-06-30, Chris Angelico ros...@gmail.com wrote: So, here's a challenge: Come up with something really simple, and write an insanely complicated - yet

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 6:00 μμ, ο/η rusi έγραψε: On Monday, July 1, 2013 7:31:18 PM UTC+5:30, Walter Hurry wrote: Please...enough. Polite request: consider killfiling him and having done with it. It is irritating to see all the responses even though I killfiled him long ago. Whilst I realise, of

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 6:34 μμ, ο/η Steven D'Aprano έγραψε: The above of course assumes that I have not kill-filed you for continuing to be abusive on-list. So, Steven you want me to sit tight and read all the insults coming from this guy? If that happened to you, wouldn't you feel the need and urge to

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Joshua Landau
On 1 July 2013 16:49, rusi rustompm...@gmail.com wrote: On Monday, July 1, 2013 9:04:11 PM UTC+5:30, Steven D'Aprano wrote: And no, i do not want to piss off people like you, who have spend time helping me. Too late. I asked you to stop flaming on-list, and you didn't. I am now kill-filing

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Νίκος
Στις 1/7/2013 7:56 μμ, ο/η Joshua Landau έγραψε: So yes, Antoon Pardon and Nikos, please stop. You are not representing the list. I haven't followed any of the other arguments, true, but you two in particular are causing a lot of trouble for the rest of us. It is not hard to avoid making your

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Joshua Landau
On 1 July 2013 18:15, Νίκος ni...@superhost.gr wrote: Στις 1/7/2013 7:56 μμ, ο/η Joshua Landau έγραψε: So yes, Antoon Pardon and Nikos, please stop. You are not representing the list. I haven't followed any of the other arguments, true, but you two in particular are causing a lot of trouble

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread rusi
On Monday, July 1, 2013 10:26:21 PM UTC+5:30, Joshua Landau wrote: So yes, Antoon Pardon and Nikos, please stop. You are not representing the list. This 'and' is type-wrong. I haven't followed any of the other arguments, true, but you two in particular are causing a lot of trouble for the

PYTHONPATH and module names

2013-07-01 Thread Tobiah
So today, I created a file called 'formatter.py', and my program broke. It turned out that I was also import 'gluon' from web2py, which in turn, somewhere, imported the regular python formatter.py with which I was not familiar. So the question is: Does one simply always have to be knowledgeable

Re: PYTHONPATH and module names

2013-07-01 Thread rusi
On Monday, July 1, 2013 11:59:35 PM UTC+5:30, Tobiah wrote: So today, I created a file called 'formatter.py', and my program broke. It turned out that I was also import 'gluon' from web2py, which in turn, somewhere, imported the regular python formatter.py with which I was not familiar.

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 16:01, Walter Hurry schreef: On Mon, 01 Jul 2013 10:56:54 +0200, Antoon Pardon wrote: Op 01-07-13 09:55, Νίκος schreef: Στις 1/7/2013 9:37 πμ, ο/η Antoon Pardon έγραψε: Remember that Nick is as much a human as all of us, he is bound to have his feelings hurt when so many people

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 18:56, Joshua Landau schreef: To put things in perspective, these are the people who have been insulting on this post: Mark Lawrence (once, probably without meaning to be insulting) Nikos Antoon Pardon I don't consider something insulting if it can be supported by argument and

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Joshua Landau
On 1 July 2013 19:29, rusi rustompm...@gmail.com wrote: On Monday, July 1, 2013 10:26:21 PM UTC+5:30, Joshua Landau wrote: So yes, Antoon Pardon and Nikos, please stop. You are not representing the list. This 'and' is type-wrong. I don't follow. I haven't followed any of the other

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Antoon Pardon
Op 01-07-13 17:33, Steven D'Aprano schreef: On Mon, 01 Jul 2013 15:08:18 +0200, Antoon Pardon wrote: Op 01-07-13 14:43, Steven D'Aprano schreef: Νίκος, I am not going to wade through this long, long thread to see what problem you are trying to solve today. Nikos is not trying to solve a

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread rusi
On Tuesday, July 2, 2013 12:46:40 AM UTC+5:30, Joshua Landau wrote: On 1 July 2013 19:29, rusi wrote: On Monday, July 1, 2013 10:26:21 PM UTC+5:30, Joshua Landau wrote: So yes, Antoon Pardon and Nikos, please stop. You are not representing the list. This 'and' is type-wrong. I don't

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Joshua Landau
On 1 July 2013 20:12, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Op 01-07-13 18:56, Joshua Landau schreef: To put things in perspective, these are the people who have been insulting on this post: Mark Lawrence (once, probably without meaning to be insulting) Nikos Antoon Pardon

python adds an extra half space when reading froma string or list -- back to the question

2013-07-01 Thread Joel Goldstick
I copied the original question so that the rant on the other thread can continue. Let's keep this thread ontopic number_drawn=() def load(lot_number,number_drawn): first=input(enter first lot: ) last=input(enter last lot: ) for lot_number in range(first,last):

Re: Stupid ways to spell simple code

2013-07-01 Thread Marcin Szamotulski
On 17:30 Mon 01 Jul , Joshua Landau wrote: On 1 July 2013 14:14, Chris Angelico ros...@gmail.com wrote: On Mon, Jul 1, 2013 at 10:59 PM, Neil Cerutti ne...@norwich.edu wrote: On 2013-06-30, Chris Angelico ros...@gmail.com wrote: So, here's a challenge: Come up with something really

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Joshua Landau
On 1 July 2013 20:18, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Op 01-07-13 17:33, Steven D'Aprano schreef: On Mon, 01 Jul 2013 15:08:18 +0200, Antoon Pardon wrote: Op 01-07-13 14:43, Steven D'Aprano schreef: Νίκος, I am not going to wade through this long, long thread to see what

Re: python adds an extra half space when reading froma string or list -- back to the question

2013-07-01 Thread Joshua Landau
On 1 July 2013 20:32, Joel Goldstick joel.goldst...@gmail.com wrote: I copied the original question so that the rant on the other thread can continue. Let's keep this thread ontopic Thank you. I shall do the same below. Unfortunately I don't have high hopes that any progress will be made on

Re: PYTHONPATH and module names

2013-07-01 Thread Tobiah
Are you familiar with absolute and relative imports: http://docs.python.org/release/2.5/whatsnew/pep-328.html Doesn't seem to work: Python 2.7.3 (default, May 10 2012, 13:31:18) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type help, copyright, credits or license for more information. from

Re: Issues compiling hunspell from source on windows

2013-07-01 Thread Akshay Kayastha
I installed a 32 bit python and it still gives me the same error. -- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading froma string or list -- back to the question

2013-07-01 Thread Dave Angel
On 07/01/2013 03:32 PM, Joel Goldstick wrote: I copied the original question so that the rant on the other thread can continue. Let's keep this thread ontopic number_drawn=() def load(lot_number,number_drawn): first=input(enter first lot: ) last=input(enter last lot: ) for

Re: python adds an extra half space when reading froma string or list -- back to the question

2013-07-01 Thread rusi
On Tuesday, July 2, 2013 1:32:44 AM UTC+5:30, Dave Angel wrote: But what was the expected output? And who cares? The code made no sense, was incomplete, and the posted question was nonsensical. Yes in this specific instance all this is probably true. I believe however, that Joel's intent in

Re: PYTHONPATH and module names

2013-07-01 Thread rusi
On Tuesday, July 2, 2013 1:24:30 AM UTC+5:30, Tobiah wrote: Are you familiar with absolute and relative imports: http://docs.python.org/release/2.5/whatsnew/pep-328.html Doesn't seem to work: Python 2.7.3 (default, May 10 2012, 13:31:18) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type

Re: PYTHONPATH and module names

2013-07-01 Thread Steven D'Aprano
On Mon, 01 Jul 2013 14:38:50 -0700, rusi wrote: On Tuesday, July 2, 2013 1:24:30 AM UTC+5:30, Tobiah wrote: Are you familiar with absolute and relative imports: http://docs.python.org/release/2.5/whatsnew/pep-328.html Doesn't seem to work: Python 2.7.3 (default, May 10 2012, 13:31:18)

Re: Stupid ways to spell simple code

2013-07-01 Thread Steven D'Aprano
On Mon, 01 Jul 2013 20:36:29 +0100, Marcin Szamotulski wrote: Here is another example which I came across when playing with generators, the first function is actually quite useful, the second generator is the whole fun: from functools import wraps def init(func): decorator which

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Steven D'Aprano
On Mon, 01 Jul 2013 20:42:48 +0200, Antoon Pardon wrote: How about the following comprimise. I'll get myself a second identity. Every respons I make to Nikos will be done with the same identity. Normal python exchanges will be done with the other. You can then simply killfile my identity that

Re: PYTHONPATH and module names

2013-07-01 Thread Fábio Santos
On 1 Jul 2013 20:58, Tobiah t...@tobiah.org wrote: Are you familiar with absolute and relative imports: http://docs.python.org/release/2.5/whatsnew/pep-328.html Doesn't seem to work: Python 2.7.3 (default, May 10 2012, 13:31:18) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type help,

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Denis McMahon
On Mon, 01 Jul 2013 21:18:26 +0200, Antoon Pardon wrote: I am not baiting Nikos. Your opinion, mine differs. all I have done in the last two weeks that involves Nikos as a subject is the Don't feed the troll thread Calling him a troll is baiting. Please stop. -- Denis McMahon,

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Denis McMahon
On Mon, 01 Jul 2013 20:42:48 +0200, Antoon Pardon wrote: How about the following comprimise. Let me know what you think about this. How about you just ignore him. -- Denis McMahon, denismfmcma...@gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading froma string or list -- back to the question

2013-07-01 Thread Dave Angel
On 07/01/2013 05:16 PM, rusi wrote: On Tuesday, July 2, 2013 1:32:44 AM UTC+5:30, Dave Angel wrote: SNIP Yes in this specific instance all this is probably true. I believe however, that Joel's intent in reposting this is more global (and important) in its scope, viz: If this list

Re: python adds an extra half space when reading froma string or list -- back to the question

2013-07-01 Thread alex23
On 2/07/2013 5:32 AM, Joel Goldstick wrote: I copied the original question so that the rant on the other thread can continue. Let's keep this thread ontopic You've included the same set of code twice. Also, it doesn't run as is, so you haven't reduced it to a minimal working example for us

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread alex23
On 1/07/2013 7:37 PM, Νίκος wrote: I dont expect anyone to solve my problems, This is not consistent with the number of HELP ME I BROKE MY BUSINESS posts you've made. iam happy if they point me to a direction which i can solve it myself This is not consistent with your repeated claim that

Re: Regular expression negative look-ahead

2013-07-01 Thread Jason Friedman
Found this: http://stackoverflow.com/questions/13871833/negative-lookahead-assertion-not-working-in-python . This pattern seems to work: pattern = re.compile(r^(?!.*(CTL|DEL|RUN))) But I am not sure why. On Mon, Jul 1, 2013 at 5:07 PM, Jason Friedman jsf80...@gmail.com wrote: I have table

OSError [Errno 26] ?!?!

2013-07-01 Thread Νίκος
After making a slightly chnage inside my pelatologio.py script substituting '*' instead of '-' for no apparent reason i receive the following error: [Tue Jul 02 06:33:06 2013] [error] [client 46.12.97.148] OSError: [Errno 26] \\u0391\\u03c1\\u03c7\\u03b5\\u03af\\u03bf

Re: Stupid ways to spell simple code

2013-07-01 Thread 88888 Dihedral
Steven D'Aprano於 2013年7月2日星期二UTC+8上午6時09分18秒寫道: On Mon, 01 Jul 2013 20:36:29 +0100, Marcin Szamotulski wrote: Here is another example which I came across when playing with generators, the first function is actually quite useful, the second generator is the whole fun: from

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread rusi
On Monday, July 1, 2013 8:36:53 PM UTC+5:30, Neil Cerutti wrote: On 2013-07-01, rusi wrote: 1. Kill-filing/spam-filtering are tools for spam. Nikos is certainly not spamming in the sense of automated sending out of cooked mail to zillions of recipients/lists. His posts are definite and

Re: OSError [Errno 26] ?!?!

2013-07-01 Thread Cameron Simpson
On 02Jul2013 06:37, Νίκος ni...@superhost.gr wrote: | After making a slightly chnage inside my pelatologio.py script | substituting '*' instead of '-' for no apparent reason i | receive the following error: | | [Tue Jul 02 06:33:06 2013] [error] [client 46.12.97.148] OSError: | [Errno 26]

Re: PYTHONPATH and module names

2013-07-01 Thread Lele Gaifax
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: On Mon, 01 Jul 2013 14:38:50 -0700, rusi wrote: 2. The __future__ is not necessary in python 2.7 [Not necessary or not allowed I not know :-) ] Not necessary. IIRC that it is needed, to solve the OP problem: one thing is the

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Joshua Landau
On 2 July 2013 05:34, rusi rustompm...@gmail.com wrote: On Monday, July 1, 2013 8:36:53 PM UTC+5:30, Neil Cerutti wrote: On 2013-07-01, rusi wrote: 1. Kill-filing/spam-filtering are tools for spam. Nikos is certainly not spamming in the sense of automated sending out of cooked mail to

Re: Regular expression negative look-ahead

2013-07-01 Thread Ian Kelly
On Mon, Jul 1, 2013 at 8:27 PM, Jason Friedman jsf80...@gmail.com wrote: Found this: http://stackoverflow.com/questions/13871833/negative-lookahead-assertion-not-working-in-python. This pattern seems to work: pattern = re.compile(r^(?!.*(CTL|DEL|RUN))) But I am not sure why. On Mon, Jul

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18335 ___ ___ Python-bugs-list

[issue16468] argparse only supports iterable choices

2013-07-01 Thread paul j3
paul j3 added the comment: chris.jerdonek wrote: Also, to answer a previous question, the three places in which the choices string is used are: in the usage string (separator=','), in the help string when expanding %(choices)s (separator=', '), and in the error message text (separator=', '

[issue18336] codecs: Link to readline module (history) instead of fd.readline()

2013-07-01 Thread Thomas Guettler
New submission from Thomas Guettler: The documentation of codecs.readline() has a link to the readline module. That the same word with a total different meaning! http://docs.python.org/2/library/codecs.html?highlight=readline#codecs.StreamReader.readline The GNU readline module is about the

[issue18337] codecs: StremReader readline() breaks on undocumented characters

2013-07-01 Thread Thomas Guettler
New submission from Thomas Guettler: The stream reader of codecs.open() breaks on undocumented characters: http://docs.python.org/2/library/codecs.html?highlight=codecs%20readline#codecs.StreamReader.readline import tempfile temp=tempfile.mktemp() fd=open(temp, 'wb')

[issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute

2013-07-01 Thread Nick Coghlan
Nick Coghlan added the comment: Unfortunately, it's not that simple, as calling type(name, bases, namespace) is *exactly* what a subclass will do as part of creating the type object. From inside the type implementation, we can't tell the difference between properly called from the child type

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Nick Coghlan
Nick Coghlan added the comment: It turns out there's one slight wrinkle in this grand plan: it won't work for docstrings without some additional tweaking to allow for method calls in the docstring detection. def f(): ... example.lower() ... print(f.__doc__) None import dis dis.dis(f)

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Nick Coghlan
Nick Coghlan added the comment: I still think the methods are worth adding regardless - I just anticipate a request to allow method calls on docstrings to follow not long after ;) -- ___ Python tracker rep...@bugs.python.org

[issue18336] codecs: Link to readline module (history) instead of fd.readline()

2013-07-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: docs@python - serhiy.storchaka keywords: +easy nosy: +serhiy.storchaka stage: - needs patch versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: str already have too many methods. Who uses str.swapcase() or str.zfill() now? I'm -0.5 for adding any new str methods. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue18337] codecs: StremReader readline() breaks on undocumented characters

2013-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report. This is a duplicate of issue18291. -- nosy: +serhiy.storchaka resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - codecs.open interprets space as line ends versions: +Python 3.3, Python

[issue18291] codecs.open interprets space as line ends

2013-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In contrary to documentation str.splitlines() splits lines not only on '\n', '\r\n' and '\r'. 'a'.join(chr(i) for i in range(32)).splitlines(True) ['\x00a\x01a\x02a\x03a\x04a\x05a\x06a\x07a\x08a\ta\n', 'a\x0b', 'a\x0c', 'a\r',

  1   2   >