Re: Help with python-list archives

2012-01-05 Thread Ian Kelly
On Thu, Jan 5, 2012 at 9:08 PM, random joe wrote: > PS: I wonder why no one has added a note to the Python-list archives > to advise people about the bug? Probably nobody has noticed it until now. It seems to be a quirk of the archive files that they are double-gzipped, and most people probably

Re: Help with python-list archives

2012-01-05 Thread Ian Kelly
On Thu, Jan 5, 2012 at 8:00 PM, MRAB wrote: > import gzip > > in_file = gzip.open(r"C:\2012-January.txt.gz") > out_file = open(r"C:\2012-January.txt.tmp", "wb") > out_file.write(in_file.read()) > in_file.close() > out_file.close() > > in_file = gzip.open(r"C:\2012-January.txt.tmp") > out_file = op

Re: Spamming PyPI with stupid packages

2012-01-05 Thread Rick Johnson
On Jan 1, 5:24 pm, Alexander Kapps wrote: > Uh oh, should I really send this? ... Yes. Yes, I should! Sorry, I > cannot resists. > > >>> allow everyone to do "import girlfriend" > > I'm betting on a joke, like antigravity only significantly less > > funny and more sexist. > > Absolutely not funny.

Re: Spamming PyPI with stupid packages

2012-01-05 Thread Rick Johnson
On Jan 3, 8:37 pm, Chris Angelico wrote: > On Wed, Jan 4, 2012 at 12:54 PM, Ben Finney > wrote: > > It objectifies women. If you can't see how that's harmful to women, I > > haven't the stamina to educate you. > > And "import pickle" objectifies pickles. It's deplorable how few > gherkins become

Re: Spamming PyPI with stupid packages

2012-01-05 Thread Rick Johnson
On Jan 3, 8:42 pm, Ben Finney wrote: > Steven D'Aprano writes: > > On Wed, 04 Jan 2012 12:54:09 +1100, Ben Finney wrote: > > > It objectifies women. > > > So you claim. > > I'm sure you have a hundred ready rationalisations for why a joke that > has “girlfriend” as a fungible object, together wit

Re: Help with python-list archives

2012-01-05 Thread Chris Angelico
On Fri, Jan 6, 2012 at 3:08 PM, random joe wrote: > Nevermind. Notepad was the problem. After using a real editor the text > is displayed correctly! Thanks for help everyone! ... or that could be your problem :) ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with python-list archives

2012-01-05 Thread Chris Angelico
On Fri, Jan 6, 2012 at 3:01 PM, random joe wrote: > THis works however there is one more tiny hiccup. The text has lost > all significant indention and newlines. Was this intended or is this a > result of another bug? I'm seeing it as plain text, with proper newlines. There's no indentation as it

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 10:01 pm, random joe wrote: > On Jan 5, 9:00 pm, MRAB wrote: > > import gzip > > > in_file = gzip.open(r"C:\2012-January.txt.gz") > > out_file = open(r"C:\2012-January.txt.tmp", "wb") > > out_file.write(in_file.read()) > > in_file.close() > > out_file.close() > > > in_file = gzip.open(

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 9:00 pm, MRAB wrote: > On 06/01/2012 02:14, random joe wrote: > > > On Jan 5, 7:27 pm, MRAB  wrote: > > >>  I've found that if I gunzip it twice (gunzip it and then gunzip the > >>  result) using the gzip module I get the text file. > > > On a windows machine? If so, can you post a code

回复: problem to install Flask

2012-01-05 Thread 水静流深
yes i run python3,how to install flask in python3? -- 原始邮件 -- 发件人: "MRAB"; 发送时间: 2012年1月6日(星期五) 中午11:05 收件人: "python-list"; 主题: Re: problem to install Flask On 06/01/2012 02:24, 水静流深 wrote: > ~$ sudo easy_install Flask > Searching for Flask > Reading

Re: problem to install Flask

2012-01-05 Thread MRAB
On 06/01/2012 02:24, 水静流深 wrote: ~$ sudo easy_install Flask Searching for Flask Reading http://pypi.python.org/simple/Flask/ Reading http://github.com/mitsuhiko/flask/ Best match: Flask 0.8 Downloading http://pypi.python.org/packages/source/F/Flask/Flask-0.8.tar.gz#md5=a5169306cfe49b3b369086f2a63

Re: Help with python-list archives

2012-01-05 Thread MRAB
On 06/01/2012 02:14, random joe wrote: On Jan 5, 7:27 pm, MRAB wrote: I've found that if I gunzip it twice (gunzip it and then gunzip the result) using the gzip module I get the text file. On a windows machine? If so, can you post a code snippet please? Thanks import gzip in_file = gzip

problem to install Flask

2012-01-05 Thread 水静流深
~$ sudo easy_install Flask Searching for Flask Reading http://pypi.python.org/simple/Flask/ Reading http://github.com/mitsuhiko/flask/ Best match: Flask 0.8 Downloading http://pypi.python.org/packages/source/F/Flask/Flask-0.8.tar.gz#md5=a5169306cfe49b3b369086f2a63816ab Processing Flask-0.8.tar.gz

Re: virtualenv wrecked my Django+modules install

2012-01-05 Thread alex23
On Jan 6, 5:01 am, Alec Taylor wrote: > Does this mean I need to install everything required by my project all > over again? - If so, should I take a virtualenv approach (and what > would the advantages be of doing so)? Virtualenv should _never_ clobber any non-virtualenv installs, that's the who

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 7:27 pm, MRAB wrote: > I've found that if I gunzip it twice (gunzip it and then gunzip the > result) using the gzip module I get the text file. On a windows machine? If so, can you post a code snippet please? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with python-list archives

2012-01-05 Thread MRAB
On 06/01/2012 00:10, Ian Kelly wrote: On Thu, Jan 5, 2012 at 4:52 PM, random joe wrote: Sure. Take the most recent file as example. "2012 - January.txt.gz". If you use the python doc example this is the result. If i use "r" or "rb" the result is the same. import gzip f1 = gzip.open('C:\\

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 6:10 pm, Ian Kelly wrote: > Interesting.  I tried this on a Linux system using both gunzip and > your code, and both worked fine to extract that file.  I also tried > your code on a Windows system, and I get the same result that you do. > This appears to be a bug in the gzip module under

Re: argparse missing optparse capabilities?

2012-01-05 Thread ru...@yahoo.com
On 01/05/2012 11:46 AM, Ian Kelly wrote: > On Thu, Jan 5, 2012 at 11:14 AM, Ian Kelly wrote: >> On Thu, Jan 5, 2012 at 1:05 AM, ru...@yahoo.com wrote: >>> I have optparse code that parses a command line containing >>> intermixed positional and optional arguments, where the optional >>> arguments

Re: Help with python-list archives

2012-01-05 Thread Ian Kelly
On Thu, Jan 5, 2012 at 4:52 PM, random joe wrote: > Sure. Take the most recent file as example. "2012 - January.txt.gz". > If you use the python doc example this is the result. If i use "r" or > "rb" the result is the same. > import gzip f1 = gzip.open('C:\\2012-January.txt.gz', 'rb') >>

Re: Help with python-list archives

2012-01-05 Thread Ian Kelly
On Thu, Jan 5, 2012 at 4:39 PM, Miki Tebeka wrote: > Is there Google groups search not good enough? > (groups.google.com/group/comp.lang.python) My experience with the Google groups search (and Google groups in general) in the past has been terrible. If you're looking for a specific thread, it

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 5:39 pm, Miki Tebeka wrote: > Is the Google groups search not good enough? That works but i would like to do some regexes and set up some defaults. > Also, can you give an example of the code and an input file? Sure. Take the most recent file as example. "2012 - January.txt.gz". If yo

Re: Help with python-list archives

2012-01-05 Thread Miki Tebeka
Is there Google groups search not good enough? (groups.google.com/group/comp.lang.python) Also, can you give an example of the code and an input file? -- http://mail.python.org/mailman/listinfo/python-list

Help with python-list archives

2012-01-05 Thread random joe
Hi. I am new to python and wanted to search the python-list archives for answers to my many questions but i can't seem to get the archive files to uncompressed? What gives? From what i understand they are gzip files so i assumed the gzip module would work, but no! The best i could do was to get a

socketserver question

2012-01-05 Thread K Richard Pixley
Once I've instantiated my server class, along with a handler class, called server.serve_forever(), handler.handle() has been called, I've done my work, and I'm ready to shut the whole thing down... How do I do that? The doc says server.shutdown(), but if I call self.server.shutdown() from wit

Re: virtualenv wrecked my Django+modules install

2012-01-05 Thread 88888 Dihedral
Use co-linux or VMware to do some experiment first. This is better than those old days of workstations or the mainframes from 5 to 10 vendors 20 years ago. -- http://mail.python.org/mailman/listinfo/python-list

Re: help me get excited about python 3

2012-01-05 Thread K Richard Pixley
You get some of the good stuff by importing future, unicode literals which essentially means you're working in unicode by default most of the time, and print function, (a small fix but long overdue). I try to write python3 whenever I can. It's rare that dependencies keep me back. More often

Re: Unable to install xmldiff package on WIndows7

2012-01-05 Thread MRAB
On 05/01/2012 19:34, John Gordon wrote: In hisan writes: Can some one help me out here Its High Priority GCC is failing with a "No such file or directory" error. I assume this means either that gcc is not installed on your computer, or that it couldn't find one of the files you passed on

Re: a little help

2012-01-05 Thread Lie Ryan
On 01/06/2012 03:04 AM, Andres Soto wrote: Please, see my comments between your lines. Thank you very much for your explanation! * * *From:* Lie Ryan *To:* python-list@python.org *Sent:* Thursday, January 5, 2012 2:30 AM *Subject:* Re: a little help On 01/05/

Re: Unable to install xmldiff package on WIndows7

2012-01-05 Thread John Gordon
In hisan writes: > Can some one help me out here Its High Priority GCC is failing with a "No such file or directory" error. I assume this means either that gcc is not installed on your computer, or that it couldn't find one of the files you passed on the command line. The first case seems le

virtualenv wrecked my Django+modules install

2012-01-05 Thread Alec Taylor
Good morning, On my system (Windows 8 Developer Preview x64 with Python 2.7.2 x64) I painstakingly installed all the dependencies for Django, Satchmo and a few other large scale projects. (about 10% couldn't be installed with pip, which is why I use the word 'painstakingly') Recently though I ne

Re: argparse missing optparse capabilities?

2012-01-05 Thread Ian Kelly
On Thu, Jan 5, 2012 at 11:14 AM, Ian Kelly wrote: > On Thu, Jan 5, 2012 at 1:05 AM, ru...@yahoo.com wrote: >> I have optparse code that parses a command line containing >> intermixed positional and optional arguments, where the optional >> arguments set the context for the following positional ar

Re: Unable to install xmldiff package on WIndows7

2012-01-05 Thread Rod Person
On Thu, 5 Jan 2012 10:03:32 -0800 (PST) hisan wrote: > Can some one help me out here Its High Priority > > > > On Jan 4, 12:47 am, hisan wrote: > > Hi All > > > > i have downloaded "xmldiff-0.6.10" from their official site > > (http://www.logilab.org/859). I have tried installing the same on

Re: argparse missing optparse capabilities?

2012-01-05 Thread Ian Kelly
On Thu, Jan 5, 2012 at 1:05 AM, ru...@yahoo.com wrote: > I have optparse code that parses a command line containing > intermixed positional and optional arguments, where the optional > arguments set the context for the following positional arguments. > For example, > >  myprogram.py arg1 -c33 arg2

Re: Unable to install xmldiff package on WIndows7

2012-01-05 Thread hisan
Can some one help me out here Its High Priority On Jan 4, 12:47 am, hisan wrote: > Hi All > > i have downloaded "xmldiff-0.6.10" from their official site > (http://www.logilab.org/859). > I have tried installing the same on my 32 bit Windows 7 OS using the > command "setup.py install" but belo

Re: argparse missing optparse capabilities?

2012-01-05 Thread ru...@yahoo.com
On 01/05/2012 02:19 AM, Ulrich Eckhardt wrote: > Am 05.01.2012 09:05, schrieb ru...@yahoo.com: >> I have optparse code that parses a command line containing >> intermixed positional and optional arguments, where the optional >> arguments set the context for the following positional arguments. >> Fo

Re: Typed python comparison / code analysis questions

2012-01-05 Thread MRAB
On 05/01/2012 06:37, Terry Reedy wrote: On 1/4/2012 3:42 PM, Lucas Vickers wrote: At the moment python3 isn't an option. There's a variety of dependencies I'm working around. Please consider telling the authors of libraries you need that you would like a Python 3 version and say why. One re

Re: a little help

2012-01-05 Thread Andres Soto
Please, see my comments between your lines. Thank you very much for your explanation! > > >From: Lie Ryan >To: python-list@python.org >Sent: Thursday, January 5, 2012 2:30 AM >Subject: Re: a little help > >On 01/05/2012 11:29 AM, Andres Soto wrote: >> my mistake is because I have no problem to

Re: a little help

2012-01-05 Thread Andres Soto
could you be a little bit more explicit. I am a begginer and I don't understand you quite well Thanks Andres Soto > > From: 8 Dihedral >To: python-list@python.org >Cc: python-list@python.org >Sent: Thursday, January 5, 2012 2:48 AM >Subject: Re: a little

Re: argparse and default values

2012-01-05 Thread Andrea Crotti
On 01/05/2012 01:24 PM, Andrea Crotti wrote: There's one thing I don't understand about argparse, why doesn't --help show what is the default value?? I mean if I add an option that can be customized it would be good for the user to know what is the current value in my opinion. Is there a way t

argparse and default values

2012-01-05 Thread Andrea Crotti
There's one thing I don't understand about argparse, why doesn't --help show what is the default value?? I mean if I add an option that can be customized it would be good for the user to know what is the current value in my opinion. Is there a way to make it show it? -- http://mail.python.org/m

Re: can a subclass method determine if called by superclass?

2012-01-05 Thread Jean-Michel Pichavant
Jean-Michel Pichavant wrote: Peter wrote: Situation: I am subclassing a class which has methods that call other class methods (and without reading the code of the superclass I am discovering these by trial and error as I build the subclass - this is probably why I may have approached the problem

Re: can a subclass method determine if called by superclass?

2012-01-05 Thread Jean-Michel Pichavant
Peter wrote: Situation: I am subclassing a class which has methods that call other class methods (and without reading the code of the superclass I am discovering these by trial and error as I build the subclass - this is probably why I may have approached the problem from the wrong viewpoint :-))

Re: argparse missing optparse capabilities?

2012-01-05 Thread Ulrich Eckhardt
Am 05.01.2012 09:05, schrieb ru...@yahoo.com: I have optparse code that parses a command line containing intermixed positional and optional arguments, where the optional arguments set the context for the following positional arguments. For example, myprogram.py arg1 -c33 arg2 arg3 -c44 arg4

Re: help me get excited about python 3

2012-01-05 Thread Lie Ryan
On 01/05/2012 03:41 PM, Evan Driscoll wrote: On 1/4/2012 9:56 AM, Sean Wolfe wrote: I am still living in the 2.x world because all the things I want to do right now in python are in 2 (django, pygame). But I want to be excited about the future of the language. I understand the concept of needing

Re: a little help

2012-01-05 Thread 88888 Dihedral
Chris Angelico於 2012年1月5日星期四UTC+8上午7時29分21秒寫道: > On Thu, Jan 5, 2012 at 10:25 AM, Andres Soto wrote: > > My situation is the following: I am developing some code. I use the IDLE > > Editor to write it down. Then, I save it and import it from the command line > > interface, so it is already availab

Re: argparse missing optparse capabilities?

2012-01-05 Thread ru...@yahoo.com
On Jan 5, 1:05 am, "ru...@yahoo.com" wrote: >   class AppendWithPos (argparse.Action): >     def __call__ (self, parser, namespace, values, > option_string=None): >         if getattr (namespace, self.dest, None) is None: >             setattr (namespace, self.dest, []) >         getattr (namespac

Re: a little help

2012-01-05 Thread Lie Ryan
On 01/05/2012 11:29 AM, Andres Soto wrote: my mistake is because I have no problem to do that using Prolog which use an interpreter as Python. I thought that the variables in the main global memory space (associated with the command line environment) were kept, although the code that use it could

Re: Adding an interface to existing classes

2012-01-05 Thread Spencer Pearson
(I'm sorry for my delayed response -- I've been travelling and not had reliable Internet access.) On 2011-12-25, Ian Kelly wrote: > On Thu, Dec 22, 2011 at 1:21 AM, Spencer Pearson > wrote: >> I see a problem with this, though. The intersection of two lines is >> (usually) an object of type Point

argparse missing optparse capabilities?

2012-01-05 Thread ru...@yahoo.com
I have optparse code that parses a command line containing intermixed positional and optional arguments, where the optional arguments set the context for the following positional arguments. For example, myprogram.py arg1 -c33 arg2 arg3 -c44 arg4 'arg1' is processed in a default context, 'args2'

Re: Adding an interface to existing classes

2012-01-05 Thread Spencer Pearson
On Dec 25 2011, 2:58 pm, Terry Reedy wrote: > On 12/24/2011 6:49 PM,SpencerPearsonwrote: > > > On Dec 23, 9:13 am, Terry Reedy  wrote: > >> On 12/22/2011 3:21 AM,SpencerPearsonwrote: > > >>> I'm writing a geometry package, with Points and Lines and Circles and > >>> so on, and eventually I want to

Re: Adding an interface to existing classes

2012-01-05 Thread Spencer Pearson
(I'm sorry for my delayed response -- I've been travelling and not had reliable Internet access.) >> Spencer, i would re-think this entire project from the >> beginning. You are trying to make an object out of everything. You >> don't need to make an object of EVERYTHING. > > Very true. I'm not s