Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Rustom Mody
On Saturday, March 22, 2014 10:21:13 AM UTC+5:30, Chris Angelico wrote: > On Sat, Mar 22, 2014 at 3:39 PM, Rustom Mody wrote: > >> So if that's not going to be broken, how is this fundamentally different? > >> def func_loop(): > >> for x in 1,2,3: > >> yield (lambda: x) > > Thats using

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 4:24 PM, Terry Reedy wrote: > If I were in charge of the software used for this list, I would replace Mark > with a custom addition to return mis-formated posts (more blank lines than > not) with instructions on how to fix them. But I am not. I love how this makes it sound

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Rustom Mody
On Saturday, March 22, 2014 10:21:13 AM UTC+5:30, Chris Angelico wrote: > On Sat, Mar 22, 2014 at 3:39 PM, Rustom Mody wrote: > >> So if that's not going to be broken, how is this fundamentally different? > >> def func_loop(): > >> for x in 1,2,3: > >> yield (lambda: x) > > Thats using

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Terry Reedy
On 3/22/2014 12:30 AM, Mark H Harris wrote: On 3/21/14 11:15 PM, Chris Angelico wrote: It compounds. One reply makes for double spacing... two makes quadruple, three means we have seven wasted lines between every pair of real lines. That gets pretty annoying. And considering that most people who

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 3:47 PM, Steven D'Aprano wrote: > Now I'm not sure precisely how Haskell implements this trick, but it > suggests to me that it creates a different closure each time around the > loop of the comprehension. That could end up being very expensive. It needn't be terribly expe

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 11:46 PM, Chris Angelico wrote: (Side point: You have your 0d and your 0a backwards; the Unix line ending is U+000A, and the Windows default is U+000D U+000A.) Yeah, I know... smart apple. How are you going to make people change? What are you going to make them change to? Who co

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Mark H Harris
On 3/21/14 11:39 PM, Rustom Mody wrote: Given fl = [lambda y : x+y for x in [1,2,3]] It means: def rec(l): if not l: return [] else: x,ll = l[0],l[1:] return [lambda y: x + y] + rec(ll) followed by fl = rec([1,2,3]) Naturally a reasonable *implementation* would ca

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 3:39 PM, Rustom Mody wrote: >> So if that's not going to be broken, how is this fundamentally different? > >> def func_loop(): >> for x in 1,2,3: >> yield (lambda: x) > > Thats using a for-loop > A 'for' in a comprehension carries a different intention, the matc

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Steven D'Aprano
On Fri, 21 Mar 2014 19:06:06 -0700, Rustom Mody wrote: > Two: A comprehension variable is not bound but reassigned across the > comprehension. This problem remains in python3 and causes weird behavior > when lambdas are put in a comprehension I don't know why you say the behaviour in Python is a

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 3:30 PM, Mark H Harris wrote: > All files should have standard delimiters. What I used to call flat-text > files should have standard line-end delimiters, and standard file-end EOF > markers. All OS's should comply with the standard... for instance, there > should not be a

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Rustom Mody
On Saturday, March 22, 2014 8:11:27 AM UTC+5:30, Chris Angelico wrote: > On Sat, Mar 22, 2014 at 1:06 PM, Rustom Mody wrote: > > Two: A comprehension variable is not bound but reassigned across the > > comprehension. This problem remains in python3 and causes weird behavior > > when > > lambdas ar

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 11:30 PM, Mark H Harris wrote: All OS's should comply with the standard... for instance, there should not be a windows x'0a' x'0d' line ending, and a unix x'0d' line ending. whoops... I meant unix x'0a' line ending...;-) '\n' :-)) -- https://mail.python.org/mailman/listinf

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 11:15 PM, Chris Angelico wrote: It compounds. One reply makes for double spacing... two makes quadruple, three means we have seven wasted lines between every pair of real lines. That gets pretty annoying. And considering that most people who reply without cleaning up the lines also kee

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 2:58 PM, Mark H Harris wrote: > On 3/21/14 5:44 PM, Mark Lawrence wrote: >> >> I'm pleased to see that you have answers. In return would you either use >> the mailing list https://mail.python.org/mailman/listinfo/python-list or >> read and action this https://wiki.python.or

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 5:44 PM, Mark Lawrence wrote: I'm pleased to see that you have answers. In return would you either use the mailing list https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing

Re: Installing ssdeep on Portable Python /advice

2014-03-21 Thread Mark H Harris
On 3/21/14 9:51 PM, Mark H Harris wrote: On 3/20/14 7:16 PM, laguna...@mail.com wrote: $ tar -zxvf ssdeep-2.10.tar.gz $ cd ssdeep-2.10&& ./configure&& make&& sudo make install I need install it on PortablePython for Windows, so it's not clear how to make this: where should be placed ssdeep

Re: Question about Source Control

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 1:49 PM, Cameron Simpson wrote: > You might do better to ask this kind of question on the mercurial list: > > http://selenic.com/mailman/listinfo/mercurial > > Someone there is bound to have wanted to do this kind of thing, and > may know if there's a tool or extension th

Re: Installing ssdeep on Portable Python /advice

2014-03-21 Thread Mark H Harris
On 3/20/14 7:16 PM, laguna...@mail.com wrote: $ tar -zxvf ssdeep-2.10.tar.gz $ cd ssdeep-2.10&& ./configure&& make&& sudo make install I need install it on PortablePython for Windows, so it's not clear how to make this: where should be placed ssdeep Windows binary files, that Pyt

Re: Question about Source Control

2014-03-21 Thread Cameron Simpson
On 22Mar2014 09:17, Chris Angelico wrote: > On Sat, Mar 22, 2014 at 8:32 AM, Cameron Simpson wrote: > > Basicly, run "hg log" for the file, and examine each of the diffs > > WRT to your target line. > > > > Refactoring raises the bar somewhat. > > Here's one where git and hg are a lot more diffe

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 1:06 PM, Rustom Mody wrote: > Two: A comprehension variable is not bound but reassigned across the > comprehension. This problem remains in python3 and causes weird behavior when > lambdas are put in a comprehension > fl = [lambda y : x+y for x in [1,2,3]] [fl[i](

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Rustom Mody
On Saturday, March 22, 2014 3:00:10 AM UTC+5:30, Ian wrote: > On Fri, Mar 21, 2014 at 3:09 PM, Rustom Mody wrote: > > A 'for' introduces a scope: > This is false. And On Saturday, March 22, 2014 3:04:48 AM UTC+5:30, Gregory Ewing wrote: > > A 'for' introduces a scope: > No, it doesn't! Ha

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Terry Reedy
On 3/21/2014 6:55 PM, cool-RR wrote: On Saturday, March 22, 2014 12:25:03 AM UTC+2, Chris Angelico wrote: (First and a halfth question: When you say "won't install", exactly what do you mean? For completeness, I'll answer this question I forgot to answer, in case someone still wants to invest

Re: Github down?

2014-03-21 Thread Dan Sommers
On Fri, 21 Mar 2014 14:51:54 +0100, Chris “Kwpolska” Warrick wrote: > (though GitHub could qualify as social media for some…) +1 QOTW -- https://mail.python.org/mailman/listinfo/python-list

Re: CallBack function in C Libraries.

2014-03-21 Thread fiensproto
Le vendredi 21 mars 2014 16:50:18 UTC, Mark H. Harris a écrit : > > def TheProc(): <== you moved c_int from here ... > > > fpgui.fpgFormWindowTitle(0, 'Boum') > > > return 0 > > CMPFUNC = CFUNCTYPE(c_int) < and placed it here ... > > > ... it wa

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
On Saturday, March 22, 2014 12:25:03 AM UTC+2, Chris Angelico wrote: > (First and a halfth question: When you say "won't install", exactly > what do you mean? For completeness, I'll answer this question I forgot to answer, in case someone still wants to investigate: It just showed the first dialo

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
On Saturday, March 22, 2014 12:42:56 AM UTC+2, Chris Angelico wrote: > I think you should follow the internet version of Hanlon's Razor here: > Damaged transmission before deliberate tampering. :) It's far more > likely something simply got misdownloaded, and your guess about > timezones is the mos

Re: Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 5:16 AM, Mark H Harris wrote: > On 3/21/14 12:42 PM, Marko Rauhamaa wrote: >> >>http://docs.python.org/3/library/subprocess.html#popen-constructor> > > >> It's got the optional close_fds parameter, which is True by default. > > >> IOW, you don't need to do anything if y

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark Lawrence
On 21/03/2014 22:34, cool-RR wrote: I'm pleased to see that you have answers. In return would you either use the mailing list https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 9:34 AM, cool-RR wrote: > I did download from python.org. I checked the md5, it was incorrect, then I > downloaded again by using a proxy in Austria. (Which hopefully the communists > haven't be able to infiltrate? ;) > I think you should follow the internet version of H

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
Here's the offending MSI, if anyone wants to investigate: https://dl.dropboxusercontent.com/u/1927707/python-3.4.0.amd64.msi On Saturday, March 22, 2014 12:34:06 AM UTC+2, cool-RR wrote: > I did download from python.org. I checked the md5, it was incorrect, then I > downloaded again by using a

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
I did download from python.org. I checked the md5, it was incorrect, then I downloaded again by using a proxy in Austria. (Which hopefully the communists haven't be able to infiltrate? ;) Now it worked! Woohoo! I'm still curious about the bad installation file... And what Ho Chi Minh is doing

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 9:05 AM, cool-RR wrote: > I downloaded it, but the MSI won't install. It didn't work on both of my > computers (Windows 7 64bit). > > What the hell. Was python.org hacked by communists? First question: Where did you download from? What file did you get? (First and a half

Re: Question about Source Control

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 8:32 AM, Cameron Simpson wrote: > Basicly, run "hg log" for the file, and examine each of the diffs > WRT to your target line. > > Refactoring raises the bar somewhat. Here's one where git and hg are a lot more different. When I'm trying to find the origin of some line of

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
Sorry, couldn't attach the file, here's the log file: https://gist.github.com/anonymous/9697505 On Saturday, March 22, 2014 12:05:59 AM UTC+2, cool-RR wrote: > Hi everybody, > > > > I need to install Python 3.4 final urgently, because my IDE stopped > supporting Python 3.4 beta2, and I need i

Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
Hi everybody, I need to install Python 3.4 final urgently, because my IDE stopped supporting Python 3.4 beta2, and I need it urgently to work. I downloaded it, but the MSI won't install. It didn't work on both of my computers (Windows 7 64bit). I managed to have the MSI dump data to log, file

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Gregory Ewing
Rustom Mody wrote: A 'for' introduces a scope: No, it doesn't! x = 42 for x in [1,2,3]: ... print x ... 1 2 3 No sign of the 42 --v ie the outer x -- inside because of scope You're right that there's no sign of the 42, but it's *not* because of scope, as you'll see if you do one more

Re: Question about Source Control

2014-03-21 Thread Cameron Simpson
On 21Mar2014 08:23, Roy Smith wrote: > In article , > Cameron Simpson wrote: > > > hg blame bin/set-x > > > > and the output goes: > > > > [hg/css]fleet*> hg blame bin/set-x > > 2186: #!/bin/sh > > 11359: # > > 11359: # Trace execution of a command. > > There's two things

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Ian Kelly
On Fri, Mar 21, 2014 at 3:09 PM, Rustom Mody wrote: > A 'for' introduces a scope: This is false. x = 42 for x in [1,2,3]: > ... print x > ... > 1 > 2 > 3 > > No sign of the 42 --v ie the outer x -- inside because of scope Try printing x again *after* the for loop: >>> x = 42 >>> fo

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Rustom Mody
On Saturday, March 22, 2014 2:26:09 AM UTC+5:30, vasudevram wrote: > On Saturday, March 22, 2014 2:24:00 AM UTC+5:30, Rustom Mody wrote: > > Lets try without comprehending comprehensions :-) > > >>> x=[[1,2],[3,4]] > > >>> for x in x: > > ... for x in x: > > ... print x > > ... > > 1 > > 2

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread vasudevram
On Saturday, March 22, 2014 2:24:00 AM UTC+5:30, Rustom Mody wrote: > Lets try without comprehending comprehensions :-) > >>> x=[[1,2],[3,4]] > > >>> for x in x: > > ... for x in x: > > ... print x > > ... > > 1 > > 2 > > 3 > > 4 Nice and all, thanks, but doesn't answer the questi

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Rustom Mody
On Saturday, March 22, 2014 2:12:53 AM UTC+5:30, vasudevram wrote: > Hi list, > Can anyone - maybe one of the Python language core team, or someone with > knowledge of the internals of Python - can explain why this code works, and > whether the different occurrences of the name x in the expressi

Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread vasudevram
Hi list, Can anyone - maybe one of the Python language core team, or someone with knowledge of the internals of Python - can explain why this code works, and whether the different occurrences of the name x in the expression, are in different scopes or not? : x = [[1,2], [3,4], [5,6]] [x f

Re: Python3 - temporarily change the file encoding

2014-03-21 Thread Peter Otten
Helmut Jarausch wrote: > Hi, > > my locale is en_US.iso88591 > > But now I'd like to process a restructuredtext file which is encoded in > utf-8. > > rst2html has > > #!/usr/bin/python3.3 > > # $Id: rst2html.py 4564 2006-05-21 20:44:42Z wiemann $ > # Author: David Goodger > # Copyright: This

Re: Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Mark H Harris
On 3/21/14 12:42 PM, Marko Rauhamaa wrote: http://docs.python.org/3/library/subprocess.html#popen-constructor> It's got the optional close_fds parameter, which is True by default. IOW, you don't need to do anything if you use subprocess.Popen() to start your child process. Incidentally,

Re: Question about Source Control

2014-03-21 Thread Tim Chase
On 2014-03-21 12:54, Tim Chase wrote: > A quick "hg -help blame" Sigh. Accidentally hit when I meant to hit with down. That is, of course "hg help blame", formerly written there as "hg -v help blame" and accidentally sent mid-edit. -tkc -- https://mail.python.org/mailman/listinfo/python-li

Re: Question about Source Control

2014-03-21 Thread Tim Chase
On 2014-03-22 04:23, Chris Angelico wrote: > > The hard thing is I don't really want to know which change most > > recently touched the line of text. I want to know who really > > wrote it. It would be wonderful if hg were smart enough to be > > able to back-track through the change history and i

Python3 - temporarily change the file encoding

2014-03-21 Thread Helmut Jarausch
Hi, my locale is en_US.iso88591 But now I'd like to process a restructuredtext file which is encoded in utf-8. rst2html has #!/usr/bin/python3.3 # $Id: rst2html.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger # Copyright: This module has been placed in the public domain. """ A

Re: Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Marko Rauhamaa
Antony Joseph : > How can i implement multiprocessing without inherit file descriptors > from my parent process? Take a look at the subprocess module: http://docs.python.org/3/library/subprocess.html#popen-constructor> It's got the optional close_fds parameter, which is True by default. IOW,

Re: Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Grant Edwards
On 2014-03-21, Antony Joseph wrote: > How can i implement multiprocessing without inherit file descriptors from > my parent process? What one typically does if that is desired is to call fork() and then in the child process close all open file descriptors before doing any other processsing (such

Re: Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Mark H Harris
On 3/21/14 10:28 AM, Antony Joseph wrote: How can i implement multiprocessing without inherit file descriptors from my parent process? I'll bite... If what you mean by 'multiprocessing' is forking a process, to get a child process, which will then do some parallel processing for some reason,

Re: Question about Source Control

2014-03-21 Thread Chris Angelico
On Fri, Mar 21, 2014 at 11:23 PM, Roy Smith wrote: > There's two things hg blame doesn't do which would be useful. > > First, the trivial one. I don't want lines annotated by change number, > I want them annotated by the name of the person who checked it in. But, > I'm sure that can be easily fi

Re: CallBack function in C Libraries.

2014-03-21 Thread Mark H Harris
On 3/21/14 7:02 AM, fienspr...@gmail.com wrote: Yep, Many thanks for help Hum, i have find the solution, it was in "CallBack function" in help-doc. No, it was not in the "CallBack function" in help-doc ... def TheProc(): <== you moved c_int from here ... f

Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Antony Joseph
Hi all, How can i implement multiprocessing without inherit file descriptors from my parent process? Please help me. regards, Antony -- https://mail.python.org/mailman/listinfo/python-list

Re: csv read _csv.Error: line contains NULL byte

2014-03-21 Thread Mark Lawrence
On 21/03/2014 14:46, chip9m...@gmail.com wrote: On Friday, March 21, 2014 2:39:37 PM UTC+1, Tim Golden wrote: Without disturbing your existing code too much, you could wrap the input_reader in a generator which skips malformed lines. That would look something like this: def unfussy_reader(

Re: csv read _csv.Error: line contains NULL byte

2014-03-21 Thread Tim Golden
On 21/03/2014 14:46, chip9m...@gmail.com wrote: > I am sorry I do not understand how to get to each row in this way. > > Please could you explain also this: > If I define this function, > how do I change my for loop to get each row? Does this help? #!python3 import csv def unfussy_reader(csv_

Re: csv read _csv.Error: line contains NULL byte

2014-03-21 Thread chip9munk
Ok, I have figured it out: for i, row in enumerate(unfussy_reader(input_reader): # and I do something on each row Sorry, it is my first "face to face" with generators! Thank you very much! Best, Chip Munk -- https://mail.python.org/mailman/listinfo/python-list

Re: csv read _csv.Error: line contains NULL byte

2014-03-21 Thread chip9munk
On Friday, March 21, 2014 2:39:37 PM UTC+1, Tim Golden wrote: > Without disturbing your existing code too much, you could wrap the > > input_reader in a generator which skips malformed lines. That would look > > something like this: > > > > def unfussy_reader(reader): > > while True: >

Re: Github down?

2014-03-21 Thread Mark Lawrence
On 21/03/2014 13:22, Skip Montanaro wrote: Anybody else having trouble getting to Github? I'm trying to get to the pythondotorg issue tracker: https://github.com/python/pythondotorg/issues Thx, Skip http://www.downforeveryoneorjustme.com/ -- My fellow Pythonistas, ask not what our language

ANN: Wing IDE 5.0.4 released

2014-03-21 Thread Wingware
Hi, Wingware has released version 5.0.4 of Wing IDE, our cross-platform integrated development environment for the Python programming language. Wing IDE includes a professional quality code editor with vi, emacs, visual studio, and other key bindings, auto-completion, call tips, goto-definiti

Re: Github down?

2014-03-21 Thread Larry Martell
On Fri, Mar 21, 2014 at 9:48 AM, Skip Montanaro wrote: > On Fri, Mar 21, 2014 at 8:24 AM, Larry Martell > wrote: >> https://twitter.com/githubstatus > > Thanks for the pointer. I'm an old fart and don't use social media > much (in fact, just closed my FB account a couple days ago). Does that > m

Re: Github down?

2014-03-21 Thread Chris “Kwpolska” Warrick
On Fri, Mar 21, 2014 at 2:48 PM, Skip Montanaro wrote: > On Fri, Mar 21, 2014 at 8:24 AM, Larry Martell > wrote: >> https://twitter.com/githubstatus > > Thanks for the pointer. I'm an old fart and don't use social media > much (in fact, just closed my FB account a couple days ago). Does that > m

Re: Github down?

2014-03-21 Thread Skip Montanaro
On Fri, Mar 21, 2014 at 8:24 AM, Larry Martell wrote: > https://twitter.com/githubstatus Thanks for the pointer. I'm an old fart and don't use social media much (in fact, just closed my FB account a couple days ago). Does that mean I'm a curmudgeon? :-) Skip -- https://mail.python.org/mailman/l

Re: csv read _csv.Error: line contains NULL byte

2014-03-21 Thread Tim Golden
On 21/03/2014 13:29, chip9m...@gmail.com wrote: > Hi all! > > I am reading from a huge csv file (> 20 Gb), so I have to read line by line: > > for i, row in enumerate(input_reader): > # and I do something on each row > > Everything works fine until i get to a row with some strange symbols

csv read _csv.Error: line contains NULL byte

2014-03-21 Thread chip9munk
Hi all! I am reading from a huge csv file (> 20 Gb), so I have to read line by line: for i, row in enumerate(input_reader): # and I do something on each row Everything works fine until i get to a row with some strange symbols "0I`00�^" at that point I get an error: _csv.Error: line contai

Re: Github down?

2014-03-21 Thread Larry Martell
On Fri, Mar 21, 2014 at 9:22 AM, Skip Montanaro wrote: > Anybody else having trouble getting to Github? I'm trying to get to > the pythondotorg issue tracker: > > https://github.com/python/pythondotorg/issues They post the status at: https://twitter.com/githubstatus As of 10 minutes ago it was

Github down?

2014-03-21 Thread Skip Montanaro
Anybody else having trouble getting to Github? I'm trying to get to the pythondotorg issue tracker: https://github.com/python/pythondotorg/issues Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about Source Control

2014-03-21 Thread Roy Smith
In article , Cameron Simpson wrote: > hg blame bin/set-x > > and the output goes: > > [hg/css]fleet*> hg blame bin/set-x > 2186: #!/bin/sh > 11359: # > 11359: # Trace execution of a command. There's two things hg blame doesn't do which would be useful. First, the trivial o

Re: running python 2 vs 3

2014-03-21 Thread alister
On Fri, 21 Mar 2014 09:40:40 +, Mark Lawrence wrote: > On 21/03/2014 02:18, Chris Angelico wrote: >> On Fri, Mar 21, 2014 at 12:06 PM, Roy Smith wrote: >>> In article <532b8f0d$0$29994$c3e8da3$54964...@news.astraweb.com>, >>> Steven D'Aprano wrote: >>> The rule of three applies here:

Re: CallBack function in C Libraries.

2014-03-21 Thread fiensproto
> I'm afraid it doesn't help that GoogleGroups has badly mangled the > > formatting of your code. I'm not quite sure what to suggest since it > > isn't one of the usual problems, but you might find reading > > https://wiki.python.org/moin/GoogleGroupsPython helpful. It will > > certai

Re: Need help in Python automation

2014-03-21 Thread Adnan Sadzak
Hi, there should be manufacturer documentation or API. What switch do You use? Any other info? Cheers, Adnan On Fri, Mar 21, 2014 at 9:14 AM, Anil Kumar A <401a...@gmail.com> wrote: > - > Hi All, > > I work for an ISP. Currently we bou

Re: Python - Caeser Cipher Not Giving Right Output

2014-03-21 Thread Mark Lawrence
On 21/03/2014 04:23, dtran...@gmail.com wrote: Would you please access this list via https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing and single line paragraphs, thanks. -- My

Re: running python 2 vs 3

2014-03-21 Thread Mark Lawrence
On 21/03/2014 02:18, Chris Angelico wrote: On Fri, Mar 21, 2014 at 12:06 PM, Roy Smith wrote: In article <532b8f0d$0$29994$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: The rule of three applies here: anything you do in three different places ought to be managed by a function

Need help in Python automation

2014-03-21 Thread Anil Kumar A
- Hi All, I work for an ISP. Currently we bought few switches and routers. Python is available in that switches. So I would like to write some scipts which I can run inside switch. I tried module 'os, system', but It is not executing