Re:

2016-02-12 Thread Joel Goldstick
On Fri, Feb 12, 2016 at 3:16 PM, Manas Soni wrote: > > I have downloaded python and when I click on it, it asks me to repair > which I do, it then says successful however when I click on it again it > won’t let me on it > Sent from Mail for Windows 10 > > -- > https://mail.python.org/mailman/list

Re: modifying a standard module?

2016-02-12 Thread Paul Rubin
Ulli Horlacher writes: >> tarfile.TarFile.extractall = new_extractall > > This is more easy than I could imagined :-) It is in my Python notes, > now. This is called "duck punching" or "monkey patching" and sometimes it's necessary, but it's something of an antipattern since the module could chan

Re: Storing a big amount of path names

2016-02-12 Thread Matt Wheeler
On 12 Feb 2016 21:37, "Mark Lawrence" wrote: > Hopefully not as that would be a waste, it should be made more obvious by using a red hot poker to engrave it onto every newbies' forehead. Even then some simply wouldn't take a blind bit of notice. Yes sorry about that, I think our aim was a little

Re: modifying a standard module?

2016-02-12 Thread Ulli Horlacher
Matt Wheeler wrote: > > How can I substitute the standard module function tarfile.extractall() with > > my own function? > > import tarfile > def new_extractall(self, *args, **kwargs): > print("I am a function. Woohoo!") > > tarfile.TarFile.extractall = new_extractall This is more easy tha

Re: Storing a big amount of path names

2016-02-12 Thread Ben Finney
Chris Angelico writes: > I actually had that built behind my house, at one point. Sadly, the > letters sank until they were partly embedded into the ground, and > what's left says, in the local language, "Go stick your head in a > PHP", so it's lit up only for special celebrations. Douglas Adams

Re: (unknown)

2016-02-12 Thread Mark Lawrence
On 12/02/2016 20:16, Manas Soni wrote: I have downloaded python and when I click on it, it asks me to repair which I do, it then says successful however when I click on it again it won’t let me on it Sent from Mail for Windows 10 Please search the archives as this has been asked and answere

Re: Storing a big amount of path names

2016-02-12 Thread Mark Lawrence
On 12/02/2016 17:05, Rob Gaddi wrote: Chris Angelico wrote: Start by coding things in the simple and obvious way, and then fix problems only when you see them. Is that statement available in 10 foot letters etched into stone? Hopefully not as that would be a waste, it should be made more o

Re: modifying a standard module? (was: Re: tarfile : read from a socket?)

2016-02-12 Thread Matt Wheeler
On 11 February 2016 at 17:10, Ulli Horlacher wrote: > > Ulli Horlacher wrote: > As a hack, I modified the standard library module tarfile.py: > > root@diaspora:/usr/lib/python2.7# vv -d > --- ./.versions/tarfile.py~1~ 2015-06-22 21:59:27.0 +0200 > +++ tarfile.py 2016-02-11 18:01:50.185

[no subject]

2016-02-12 Thread Manas Soni
I have downloaded python and when I click on it, it asks me to repair which I do, it then says successful however when I click on it again it won’t let me on it Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: tarfile : secure extract?

2016-02-12 Thread Ulli Horlacher
Random832 wrote: > On Thu, Feb 11, 2016, at 18:24, Ulli Horlacher wrote: > > A better approach would be to rename such files while extracting. > > Is this possible? > > What happens if you change member.name before extracting? Ohh... such an easy solution! :-) -- Ullrich Horlacher

Re: tarfile : secure extract?

2016-02-12 Thread Lars Gustäbel
On Thu, Feb 11, 2016 at 11:24:01PM +, Ulli Horlacher wrote: > In https://docs.python.org/2/library/tarfile.html there is a warning: > > Never extract archives from untrusted sources without prior inspection. > It is possible that files are created outside of path, e.g. members that > hav

Re: working

2016-02-12 Thread sohcahtoa82
On Friday, February 12, 2016 at 1:47:24 AM UTC-8, Mohammed Zakria wrote: > hello > i want to know the company that ican work as freelance python devloper There are some recruiters that read this mailing list and will send unsolicited e-mail about job openings, but they might pass right over you i

Re: Storing a big amount of path names

2016-02-12 Thread Chris Angelico
On Sat, Feb 13, 2016 at 4:05 AM, Rob Gaddi wrote: > Chris Angelico wrote: > >> Start by coding things in the >> simple and obvious way, and then fix problems only when you see them. > > Is that statement available in 10 foot letters etched into stone? I actually had that built behind my house, at

Re: Storing a big amount of path names

2016-02-12 Thread Rob Gaddi
Chris Angelico wrote: > Start by coding things in the > simple and obvious way, and then fix problems only when you see them. Is that statement available in 10 foot letters etched into stone? -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out o

Re: tarfile : secure extract?

2016-02-12 Thread Random832
On Thu, Feb 11, 2016, at 18:24, Ulli Horlacher wrote: > A better approach would be to rename such files while extracting. > Is this possible? What happens if you change member.name before extracting? -- https://mail.python.org/mailman/listinfo/python-list

[ANN] MicroPython 1.6

2016-02-12 Thread Paul Sokolovsky
Hello, MicroPython is a lean and efficient Python implementation for microcontrollers, embedded, and mobile systems (which also runs just as fine on desktops, servers, and clouds). https://github.com/micropython/micropython https://github.com/micropython/micropython/releases/tag/v1.6 There're fo

Re: I cannot open IDLE

2016-02-12 Thread Oscar Benjamin
On 11 February 2016 at 18:02, anthony averett wrote: > I have downloaded python but I cannot open up idle. I really need this > issue resolved for I have work do for one of my computer science class. What operating system are you using? Windows? Which version? Have you installed Python and if so

Re: Best programs written completly in Python

2016-02-12 Thread mentificium
On Sunday, August 5, 2007 at 3:14:38 AM UTC-7, Franz Steinhäusler wrote: > Hello NG, > > wWhat are the best programs in your opinion, written entirly > in pyhton, divided into categories like: Maybe such a list of categories should include a) Artificial Intelligence > a) Games > b) Utilities/Sys

I cannot open IDLE

2016-02-12 Thread anthony averett
I have downloaded python but I cannot open up idle. I really need this issue resolved for I have work do for one of my computer science class. -- https://mail.python.org/mailman/listinfo/python-list

Re: tarfile : read from a socket?

2016-02-12 Thread Ulli Horlacher
Lars Gustäbel wrote: > On Fri, Feb 12, 2016 at 09:35:40AM +0100, Antoon Pardon wrote: > > On 02/11/2016 06:27 PM, Lars Gustäbel wrote: > > > What about using an iterator? > > > > > > def myiter(tar): > > > for t in tar: > > > print "extracting", t.name > > > yield t > > > > > >

working

2016-02-12 Thread Mohammed Zakria
hello i want to know the company that ican work as freelance python devloper -- https://mail.python.org/mailman/listinfo/python-list

Python study

2016-02-12 Thread Mohammed Zakria
hello thank you very much for this intersting programming languch now I finished study Fundamentals of python in microsift and now im asking about what course should study after that and in web or game or networking? thank you for your time mz -- https://mail.python.org/mailman/listinfo/python

Re: tarfile : read from a socket?

2016-02-12 Thread Lars Gustäbel
On Fri, Feb 12, 2016 at 09:35:40AM +0100, Antoon Pardon wrote: > On 02/11/2016 06:27 PM, Lars Gustäbel wrote: > > What about using an iterator? > > > > def myiter(tar): > > for t in tar: > > print "extracting", t.name > > yield t > > > > sfo = sock.makefile('r') > > taro = tarfi

Re: tarfile : read from a socket?

2016-02-12 Thread Antoon Pardon
On 02/11/2016 06:27 PM, Lars Gustäbel wrote: > On Thu, Feb 11, 2016 at 04:41:43PM +, Ulli Horlacher wrote: >> sfo = sock.makefile('r') >> taro = tarfile.open(fileobj=sfo,mode='r|') >> taro.extractall(path=edir) > What about using an iterator? > > def myiter(tar): > for t in tar: >

Re: asyncio and blocking - an update

2016-02-12 Thread Chris Angelico
On Fri, Feb 12, 2016 at 7:17 PM, Frank Millman wrote: > Using run_in_executor() and cur.fetchall(), I experience delays of up to 2 > seconds while the task is active. > > Using my approach, the maximum I saw was about a tenth of a second, and that > is because I was looking for it - a normal user

Re: asyncio and blocking - an update

2016-02-12 Thread Frank Millman
"Frank Millman" wrote in message news:n9hjfp$ad7$1...@ger.gmane.org... However, my concern is not to maximise database performance, but to ensure that in an asynchronous environment, one task does not block the others from responding. My tests simulate a number of tasks running concurrently