Re: PEP8 and 4 spaces

2014-07-04 Thread Gregory Ewing
Steven D'Aprano wrote: That's exactly the problem with tabs - whatever you think your code looks like with tabs, other people will see quite different picture. Why do you consider this a problem? It's a problem if you try to use tabs for lining things up in a tabular fashion in your source c

eGenix at the EuroPython Conference 2014

2014-07-04 Thread eGenix Team: M.-A. Lemburg
eGenix.com at the EuroPython Conference 2014 July 21-27 2014 Berlin, Germany

Re: PEP8 and 4 spaces

2014-07-04 Thread Marko Rauhamaa
wxjmfa...@gmail.com: > Le vendredi 4 juillet 2014 08:35:04 UTC+2, Gregory Ewing a écrit : >> The truly broken tools IMO are things like mail handlers that shrink >> away in terror when they see a tab and remove it altogether. There's >> no excuse for that, as far as I can see. > > Yes, and you can

flask sql cann't insert Variable in VALUES

2014-07-04 Thread Frank Liou
I try to insert username in to my table it show Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. it maybe mean no request i try to change username to '123123' then

Re: flask sql cann't insert Variable in VALUES

2014-07-04 Thread Chris Angelico
On Fri, Jul 4, 2014 at 8:15 PM, Frank Liou wrote: > I try to insert username in to my table > > it show > > Internal Server Error > The server encountered an internal error and was unable to complete your > request. Either the server is overloaded or there is an error in the > application. > > .

Re: fixing an horrific formatted csv file.

2014-07-04 Thread flebber
On Friday, 4 July 2014 14:12:15 UTC+10, flebber wrote: > I have taken the code and gone a little further, but I need to be able to > protect myself against commas and single quotes in names. > > > > How is it the best to do this? > > > > so in my file I had on line 44 this trainer name. >

Re: PEP8 and 4 spaces

2014-07-04 Thread Chris “Kwpolska” Warrick
On Thu, Jul 3, 2014 at 7:31 PM, Tobiah wrote: > Anyway, I gave up the 80 char line length long > ago, having little feeling for some dolt on > a Weiss terminal that for some reason needs to > edit my code. And yet, you did not give up an even more insane line length limit, in e-mail. The longest

Re: fixing an horrific formatted csv file.

2014-07-04 Thread flebber
On Friday, 4 July 2014 16:19:09 UTC+10, Gregory Ewing wrote: > flebber wrote: > > > so in my file I had on line 44 this trainer name. > > > > > > "Michael, Wayne & John Hawkes" > > > > > > and in line 95 this horse name. Inz'n'out > > > > > > this throws of my capturing correct item 9. H

Re: Is pip being automatically installed for Python 3.4.0?

2014-07-04 Thread Conrad Taylor
On Wednesday, July 2, 2014 9:59:46 PM UTC-7, Ned Deily wrote: > In article , > > Conrad Taylor wrote: > > > Hi, shouldn't pip be automatically installed for Python 3.4.0 release? I > > > have read through the release and the PEP 453. Thus, can someone confirm > > > whether or not this is

Re: TextBlob on Windows

2014-07-04 Thread selvaperumal . p
On Saturday, 24 May 2014 04:45:14 UTC+5:30, subhaba...@gmail.com wrote: > Dear Group, > > > > It seems there is a nice language processing library named TextBlob, like > NLTK. > > But I am being unable to install it on my Windows(MS-Windows 7 machine. I am > using Python 2.7 > > > > If a

Why is regexp not working?

2014-07-04 Thread Florian Lindner
Hello, I have that piece of code: def _split_block(self, block): cre = [re.compile(r, flags = re.MULTILINE) for r in self.regexps] block = "".join(block) print(block) print("---") for regexp in cre: match = regexp.match(block

Re: fixing an horrific formatted csv file.

2014-07-04 Thread F.R.
On 07/04/2014 12:28 PM, flebber wrote: On Friday, 4 July 2014 14:12:15 UTC+10, flebber wrote: I have taken the code and gone a little further, but I need to be able to protect myself against commas and single quotes in names. How is it the best to do this? so in my file I had on line 44

capturing SNMP trap events

2014-07-04 Thread loial
I want to monitor printers for events such as the completion of printing. If the printer initiates an SNMP trap event when the job has finished printing, how can I capture this? Presumably I need some sort of deamon to listen for these trap messages. I have looked at pySNMP but am not sure if t

Re: PEP8 and 4 spaces

2014-07-04 Thread Roy Smith
In article , Gregory Ewing wrote: > As long as *all* your tools follow that convention, everything > is fine. The problems arise when you mix in tools that use > different conventions. The problem is, tools always get mixed. I use emacs. The next guy uses vi. Somebody else uses Sublime. Th

Re: PEP8 and 4 spaces

2014-07-04 Thread Mihamina Rakotomandimby
On 07/04/2014 04:47 PM, Roy Smith wrote: As long as*all* your tools follow that convention, everything >is fine. The problems arise when you mix in tools that use >different conventions. The problem is, tools always get mixed. I use emacs. The next guy uses vi. Somebody else uses Sublime. T

Re: PEP8 and 4 spaces

2014-07-04 Thread Grant Edwards
On 2014-07-03, Emile van Sebille wrote: > On 7/3/2014 2:23 PM, Tobiah wrote: >> I think your suggestion of having GIT handle the transformations >> is the way we'll go. nothing to quibble or worry about. Well put >> spaces in the repository since it still seems to be the community's >> preferenc

Re: PEP8 and 4 spaces

2014-07-04 Thread Marko Rauhamaa
Grant Edwards : > Definitely. Indenting with tabs vs. spaces is mostly personal > preference (though spaces are better!). But, mixing the two is right > out, and should be stomped on hard. Often one person writes the code and another person fixes bugs in it or adds features to it. So if one uses

Re: PEP8 and 4 spaces

2014-07-04 Thread Mark Lawrence
On 04/07/2014 15:28, Grant Edwards wrote: On 2014-07-03, Emile van Sebille wrote: On 7/3/2014 2:23 PM, Tobiah wrote: I think your suggestion of having GIT handle the transformations is the way we'll go. nothing to quibble or worry about. Well put spaces in the repository since it still seems

Re: PEP8 and 4 spaces

2014-07-04 Thread Chris Angelico
On Sat, Jul 5, 2014 at 12:54 AM, Marko Rauhamaa wrote: > Grant Edwards : > >> Definitely. Indenting with tabs vs. spaces is mostly personal >> preference (though spaces are better!). But, mixing the two is right >> out, and should be stomped on hard. > > Often one person writes the code and anothe

Re: PEP8 and 4 spaces

2014-07-04 Thread Mark Lawrence
On 04/07/2014 15:54, Marko Rauhamaa wrote: Grant Edwards : Definitely. Indenting with tabs vs. spaces is mostly personal preference (though spaces are better!). But, mixing the two is right out, and should be stomped on hard. Often one person writes the code and another person fixes bugs in i

Re: PEP8 and 4 spaces

2014-07-04 Thread Mark Lawrence
On 04/07/2014 14:59, Mihamina Rakotomandimby wrote: On 07/04/2014 04:47 PM, Roy Smith wrote: As long as*all* your tools follow that convention, everything >is fine. The problems arise when you mix in tools that use >different conventions. The problem is, tools always get mixed. I use emacs.

Re: PEP8 and 4 spaces

2014-07-04 Thread Marko Rauhamaa
Mark Lawrence : > Only for the very old fashioned Python 2, the modern Python 3 has > booted mixed tabs and spaces into touch. Since Python 3 (alas!) got into the business of booting, it should have booted tabs altogether. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP8 and 4 spaces

2014-07-04 Thread George Silva
Isn't this an old discussion? Just configure your editor properly. In my team we all use spaces, but I'll be damned if I need to type 12 spaces in a row. I'll just configured Sublime to insert spaces instead of tabs. Problem solved. On Fri, Jul 4, 2014 at 12:12 PM, Mark Lawrence wrote: > On 04/

Re: PEP8 and 4 spaces

2014-07-04 Thread Emile van Sebille
On 7/4/2014 7:57 AM, Mark Lawrence wrote: On 04/07/2014 15:28, Grant Edwards wrote: On 2014-07-03, Emile van Sebille wrote: Just watch out for mixed tabs and spaces in the same file -- a tab counts as eight spaces and can be used interchangeably in python2. Definitely. Indenting with tabs

Re: Why is regexp not working?

2014-07-04 Thread MRAB
On 2014-07-04 13:27, Florian Lindner wrote: Hello, I have that piece of code: def _split_block(self, block): cre = [re.compile(r, flags = re.MULTILINE) for r in self.regexps] block = "".join(block) print(block) print("---") for r

Re: PEP8 and 4 spaces

2014-07-04 Thread Mark Lawrence
On 04/07/2014 16:57, Emile van Sebille wrote: On 7/4/2014 7:57 AM, Mark Lawrence wrote: On 04/07/2014 15:28, Grant Edwards wrote: On 2014-07-03, Emile van Sebille wrote: Just watch out for mixed tabs and spaces in the same file -- a tab counts as eight spaces and can be used interchangeably

Re: PEP8 and 4 spaces

2014-07-04 Thread Maciej Dziardziel
> Surely the issue of mixing tabs and spaces is much more important than > > working systems? :) Python 3 considers tabs as an error and refuses to work. -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP8 and 4 spaces

2014-07-04 Thread Roy Smith
In article , George Silva wrote: > Isn't this an old discussion? Just configure your editor properly. In my > team we all use spaces, but I'll be damned if I need to type 12 spaces in a > row. I'll just configured Sublime to insert spaces instead of tabs. Problem > solved. On emacs, I used auto

Re: PEP8 and 4 spaces

2014-07-04 Thread Steven D'Aprano
On Fri, 04 Jul 2014 09:19:24 -0700, Maciej Dziardziel wrote: >> Surely the issue of mixing tabs and spaces is much more important than >> working systems? :) > > > Python 3 considers tabs as an error and refuses to work. Incorrect. [steve@ando ~]$ python3 Python 3.3.0rc3 (default, Sep 27 201

Re: PEP8 and 4 spaces

2014-07-04 Thread George Silva
> I assume any sane editor has similar functionality. I see my coworkers > using vim, sublime, eclipse, and X-code. They all appear to do these > things, and I would thus classify any of them as sane editors. I'm sure > there are others. If the tool you're (in the generic sense of "you") > usin

Re: general module auditing

2014-07-04 Thread Irmen de Jong
On 4-7-2014 1:09, Rita wrote: > > here is what I am doing now, > > egrep 'from|import' *.py | wc -l which is giving me that. But this does not > give me the number of times the particular module gets called. I was > thinking of adding a logging feature to all of my modules so every time > they ge

Re: general module auditing

2014-07-04 Thread Irmen de Jong
On 4-7-2014 19:05, Irmen de Jong wrote: > The code at the end of this message outputs the following on my machine: [...] hmm the formatting got screwed up a bit it seems. Here's the same code: https://gist.github.com/irmen/c3d07118a8e1a00367f5 Irmen -- https://mail.python.org/mailman/listinfo/

Re: PEP8 and 4 spaces

2014-07-04 Thread Lie Ryan
On 04/07/14 07:55, Gregory Ewing wrote: Steven D'Aprano wrote: That's exactly the problem with tabs - whatever you think your code looks like with tabs, other people will see quite different picture. Why do you consider this a problem? It's a problem if you try to use tabs for lining things

Re: PEP8 and 4 spaces

2014-07-04 Thread Simon Ward
On 4 July 2014 15:54:50 BST, Marko Rauhamaa wrote: >Even if we accepted that to be bad style, there's nothing on the screen >that would warn against such usage: the lines seemingly align >perfectly, >and the code runs as expected. If using vim, set list and listchars, you get to highlight tabs

Re: PEP8 and 4 spaces

2014-07-04 Thread Roy Smith
In article , Lie Ryan wrote: > PEP8 suggests using this style of method invocation: > > obj.method(foo, > bar, > baz) > > which is an effect impossible to do correctly with tabs alone. If course you can do it with tabs. Just make sure all your method names

Re: PEP8 and 4 spaces

2014-07-04 Thread Mark Lawrence
On 04/07/2014 20:04, Roy Smith wrote: In article , Lie Ryan wrote: PEP8 suggests using this style of method invocation: obj.method(foo, bar, baz) which is an effect impossible to do correctly with tabs alone. If course you can do it with tabs. Just

This Python script cannot open by a editor?

2014-07-04 Thread rxjwg98
Hi, I am learning a Python Tool from web: http://www.ohwr.org/projects/hdl-make/wiki/Quick-start-new I download the program to Ubuntu 12.04. I find that in the folder it is shown as hdlmake-v1.0, 37.8 KB Python Script. I remember that script file can be loaded to an editor to read its content. B

Re: This Python script cannot open by a editor?

2014-07-04 Thread jkn
Hi there the script is 'actually' a python script compressed, with a short header (see the '#!/usr/bin/python' right at the front? I'm guessing that if you make it executable, and run it, then it will either create a .py file that you can edit, or just run the hdlmake function that you want.

Re: PEP8 and 4 spaces

2014-07-04 Thread Gregory Ewing
Lie Ryan wrote: PEP8 suggests using this style of method invocation: obj.method(foo, bar, baz) which is an effect impossible to do correctly with tabs alone. Yes, PEP 8 is self-contradictory in that regard. I also happen to think that recommendation is insane

Re: PEP8 and 4 spaces

2014-07-04 Thread Gregory Ewing
Roy Smith wrote: The problem is, tools always get mixed. I use emacs. The next guy uses vi. Somebody else uses Sublime. The list goes on and on. You will never control what tools other people use. Yes, but my point is that none of the tools are "broken", they're just incompatible. -- Gre

Re: PEP8 and 4 spaces

2014-07-04 Thread Tim Chase
On 2014-07-05 11:17, Gregory Ewing wrote: > > PEP8 suggests using this style of method invocation: > > > > obj.method(foo, > >bar, > >baz) > > > > which is an effect impossible to do correctly with tabs alone. > > Yes, PEP 8 is self-contradictory in that reg

Re: This Python script cannot open by a editor?

2014-07-04 Thread Steven D'Aprano
On Fri, 04 Jul 2014 14:50:02 -0700, rxjwg98 wrote: > Hi, > > I am learning a Python Tool from web: > http://www.ohwr.org/projects/hdl-make/wiki/Quick-start-new Did you read that web page? It says: To get the code you have two choices: you might clone the repository, which contains the

Re: PEP8 and 4 spaces

2014-07-04 Thread Rick Johnson
On Thursday, July 3, 2014 12:31:04 PM UTC-5, Tobiah wrote: > Coworker takes PEP8 as gospel and uses 4 spaces I'm saddened that every one of these little "tabs versus spaces" arguments revolve more around selfishness and less around an understanding of what a "tabs" and "spaces" actually *are*, be

Re: PEP8 and 4 spaces

2014-07-04 Thread Rick Johnson
[A continuation of my last reply...] Here is a recent situation that occurred to me that showcases the tendency of humans to carelessly bind illogical terms to common objects, thereby creating a inverse esoteric of ubiquitous illogic, in this case, the term: "flash-light". ===

Your message to sqlite-users awaits moderator approval

2014-07-04 Thread sqlite-users-bounces
Your mail to 'sqlite-users' with the subject hi Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Either the message will get posted to the list, or you will receive notification of the moderator's

Re: Your message to sqlite-users awaits moderator approval

2014-07-04 Thread Steve Hayes
On Sat, 05 Jul 2014 01:00:22 -0400, sqlite-users-boun...@sqlite.org wrote: >Your mail to 'sqlite-users' with the subject > >hi > >Is being held until the list moderator can review it for approval. > >The reason it is being held: > >Post by non-member to a members-only list So has someone

Re: Your message to sqlite-users awaits moderator approval

2014-07-04 Thread Chris Angelico
On Sat, Jul 5, 2014 at 4:19 PM, Steve Hayes wrote: > On Sat, 05 Jul 2014 01:00:22 -0400, sqlite-users-boun...@sqlite.org wrote: > >>Your mail to 'sqlite-users' with the subject >> >>hi >> >>Is being held until the list moderator can review it for approval. >> >>The reason it is being held: >>