Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Chris Angelico
On Sat, Dec 29, 2012 at 1:02 PM, Westley Martínez wrote: > I only use vim for everything. IDEs just seem to get in my way. I've just (like ten minutes ago) come across a perfect example of what makes an IDE useful. My mother maintains a collection of documents (book indexes, historical records,

Re: pickle module doens't work

2012-12-28 Thread Tim Roberts
Omer Korat wrote: > >So it means pickle doesn't ever save the object's values, only how it was >created? You say that as though there were a difference between the two. There isn't. An object is just a dictionary of values. If you set an object member to a string, then that object's dictiona

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Steven D'Aprano
On Fri, 28 Dec 2012 16:41:20 -0800, andrew cooke wrote: > similarly, if i run the following, i see only "done": > > from logging import DEBUG, root, getLogger > > if __name__ == '__main__': > root.setLevel(DEBUG) > getLogger(__name__).debug("hello world") > print('done')

Re: Finding the name of a function while defining it

2012-12-28 Thread Tim Roberts
Abhas Bhattacharya wrote: > >Now, for your questions: >If i call one() and two() respectively, i would like to see "one" and "two". >I dont have much knowledge of lambda functions, neither am i going to use >them, so that's something I cant answer. My point is not that these are special cases to

Re: noob can't install python modules/scripts

2012-12-28 Thread lostguru
On Friday, December 28, 2012 11:12:19 PM UTC-5, Steven D'Aprano wrote: > "The website"? There's more than one website on the Internet. Which > > website are you referring to? What .py script did you download? How did > > you run it? Details are important! > sorry about that; I was using the se

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Steven D'Aprano
On Fri, 28 Dec 2012 11:57:29 -0800, andrew cooke wrote: > When I use a config file things seem to work (in other projects), but > for my current code I hoped to configure logging from Python. > > I distilled my problem down to the following test, which does not print > anything. Please can someo

Re: noob can't install python modules/scripts

2012-12-28 Thread Steven D'Aprano
On Fri, 28 Dec 2012 17:45:56 -0800, lostguru wrote: > using easy_install as an example, I downloaded the .py script the > website told me to use for 64-bit installations, and ran it; "The website"? There's more than one website on the Internet. Which website are you referring to? What .py scrip

cunfused why gevent block redis' socket request?

2012-12-28 Thread Tony Shao
GOAL:spawn a few greenlet worker deal with the data pop from redis (pop from redis and then put into queue) RUNNING ENV: ubuntu 12.04 PYTHON VER: 2.7 GEVENT VER: 1.0 RC2 REDIS VER:2.6.5 REDIS-PY VER:2.7.1 from gevent import monkey; monkey.patch_all() import gevent from gevent.pool import Group f

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Dave Angel
On 12/28/2012 09:29 PM, andrew cooke wrote: > On Friday, 28 December 2012 21:56:46 UTC-3, Peter Otten wrote: > > reading the damn docs you condescending *? > You've made four posts this year to this forum, in two threads, to ask for help. In that same year, Peter Otten has voluntarily helpe

Re: noob can't install python modules/scripts

2012-12-28 Thread lostguru
I guess I should add that the python installation is 64-bit as well thanks again! -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused about logger config from within Python (3)

2012-12-28 Thread andrew cooke
On Friday, 28 December 2012 21:56:46 UTC-3, Peter Otten wrote: > Other revolutionary ideas: read the docs > > ;) how do you think i knew about the root handler without reading the damn docs you condescending asshole? anywa

Re: learning curve

2012-12-28 Thread Terry Reedy
On 12/28/2012 1:29 PM, Verde Denim wrote: On 12/27/2012 09:32 PM, alex23 wrote: On Dec 28, 11:20 am, Verde Denim wrote: Just getting into Py coding and not understanding why this code doesn't seem to do anything - Is that the sum total of your code? You're not showing any instantiation of yo

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Westley Martínez
On Thu, Dec 27, 2012 at 12:01:16PM -0800, mogul wrote: > 'Aloha! > > I'm new to python, got 10-20 years perl and C experience, all gained on unix > alike machines hacking happily in vi, and later on in vim. > > Now it's python, and currently mainly on my kubuntu desktop. > > Do I really need a

Re: Gvim, bug or feature?

2012-12-28 Thread Pengfei Hao
Sorry, this seems a temporary bug of gvim, and they already fix it, post closed. 2012/12/28 Pengfei Hao > When you are using gvim, the command line vim can not open a current > directory os.py, do you think this is a bug or a feature? I like python and > I like gvim, but the vim of gvim is now

Re: email.message.Message - as_string fails

2012-12-28 Thread Terry Reedy
On 12/28/2012 7:22 AM, Helmut Jarausch wrote: Hi, I'm trying to filter an mbox file by removing some messages. For that I use Parser= FeedParser(policy=policy.SMTP) and 'feed' any lines to it. If the mbox file contains a white line followed by '^From ', I do Msg= Parser.close() (lateron I dele

noob can't install python modules/scripts

2012-12-28 Thread lostguru
hi, I'm not that new to programming (java) but I'm a pathetic newbie when it comes to python. I just started learning today and I'm trying to install third-party modules/scripts (I don't know the difference at the moment) so that they'll work in python; namely, easy_install/pip/distribute and be

Gvim, bug or feature?

2012-12-28 Thread Pengfei Hao
When you are using gvim, the command line vim can not open a current directory os.py, do you think this is a bug or a feature? I like python and I like gvim, but the vim of gvim is now a python program , it will import module like os.py first in current directory, so any file the same name as os.p

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Peter Otten
andrew cooke wrote: > similarly, if i run the following, i see only "done": > > from logging import DEBUG, root, getLogger > > if __name__ == '__main__': > root.setLevel(DEBUG) > getLogger(__name__).debug("hello world") > print('done') You need a handler. The easiest way t

Re: Confused about logger config from within Python (3)

2012-12-28 Thread andrew cooke
similarly, if i run the following, i see only "done": from logging import DEBUG, root, getLogger if __name__ == '__main__': root.setLevel(DEBUG) getLogger(__name__).debug("hello world") print('done') -- http://mail.python.org/mailman/listinfo/python-list

Reverse Engineering of JFK Assassination Plan Featuring The Killer Queen

2012-12-28 Thread Betty fdffdfdsfdsfdsf
Interested in who really killed JFK? Who gave the orders? What famous movies and songs told you about it a long time ago? All details explained in 86-page pdf document available for free download at: http://jackieiskillerqueen.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Confused about logger config from within Python (3)

2012-12-28 Thread andrew cooke
When I use a config file things seem to work (in other projects), but for my current code I hoped to configure logging from Python. I distilled my problem down to the following test, which does not print anything. Please can someone explain why? I was expecting the module's logger to delegate

Re: Facing issue with Python loggin logger for printing object value

2012-12-28 Thread Dave Angel
On 12/28/2012 09:27 AM, Morten Engvoldsen wrote: > Hi Team, > i am new to python and i am using python loggin for log the value of the > object. Below is my code : > > class field: > field_name = "" > length = 0 > type = 0 > value = "" > > def __init__(self, field_name, length,

Re: issue with loggin

2012-12-28 Thread Dave Angel
On 12/28/2012 01:15 PM, Morten Engvoldsen wrote: > Hi Dave, > Thanks for looking into my issue. You cannot run the program since it is > in Openerp where python is used as programming language. Here python 2.7 is > used. Sorry i didn't mention all the detail. > > My program is able to write log fo

Re: learning curve

2012-12-28 Thread Verde Denim
On 12/27/2012 09:32 PM, alex23 wrote: > On Dec 28, 11:20 am, Verde Denim wrote: >> Just getting into Py coding and not understanding why this code doesn't >> seem to do anything - > > Is that the sum total of your code? You're not showing any > instantiation of your classes. Yes, as a matter of f

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Mitya Sirenef
On 12/28/2012 01:05 PM, Mitya Sirenef wrote: On 12/28/2012 12:55 PM, Mitya Sirenef wrote: >> On 12/28/2012 12:33 PM, alankrin...@gmail.com wrote: >>> I think 396 just comes from the end of the Python loop, without indicating which line in the loop is >> at issue. >> > >> > Here is the full co

issue with loggin

2012-12-28 Thread Morten Engvoldsen
Hi Dave, Thanks for looking into my issue. You cannot run the program since it is in Openerp where python is used as programming language. Here python 2.7 is used. Sorry i didn't mention all the detail. My program is able to write log for other message in the log file. here 'batch' is an object a

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Mitya Sirenef
On 12/28/2012 12:55 PM, Mitya Sirenef wrote: On 12/28/2012 12:33 PM, alankrin...@gmail.com wrote: I think 396 just comes from the end of the Python loop, without indicating which line in the loop is at issue. > > Here is the full code from this section of the loop: > > > for ( > msr, brk, dmn

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Mitya Sirenef
On 12/28/2012 12:33 PM, alankrin...@gmail.com wrote: I think 396 just comes from the end of the Python loop, without indicating which line in the loop is at issue. > > Here is the full code from this section of the loop: > > > for ( > msr, brk, dmn, src, dspd1, dspd2, dspd3, dspd4, dspd5, dspd6

Re: Python lists

2012-12-28 Thread Alex
Manatee wrote: > On Friday, December 28, 2012 9:14:57 AM UTC-5, Manatee wrote: > > I read in this: > > > > ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', > > '10', '2', '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', > > 'Digi-Key', '490-1521-1-ND', ''] > > > > > > >

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread alankrinsky
I think 396 just comes from the end of the Python loop, without indicating which line in the loop is at issue. Here is the full code from this section of the loop: for ( msr, brk, dmn, src, dspd1, dspd2, dspd3, dspd4, dspd5, dspd6, dspd7, dspd8, dspd9, dspd10, dspd11, dspd12, period1,

Re: email.message.Message - as_string fails

2012-12-28 Thread Chris Rebert
On Dec 28, 2012 4:26 AM, "Helmut Jarausch" wrote: > > Hi, > > I'm trying to filter an mbox file by removing some messages. > For that I use > Parser= FeedParser(policy=policy.SMTP) > and 'feed' any lines to it. > If the mbox file contains a white line followed by '^From ', > I do > > Msg= Parser.c

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Chris Angelico
On Sat, Dec 29, 2012 at 3:43 AM, wrote: > Chris, > > I tried placing in the format you suggested and received this error message: > > END PROGRAM. > Traceback (most recent call last): > File "", line 396, in > ValueError: incomplete format key I don't think the code I gave could produce that.

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Peter Otten
alankrin...@gmail.com wrote: > I tried placing in the format you suggested and received this error > message: > > END PROGRAM. > Traceback (most recent call last): > File "", line 396, in > ValueError: incomplete format key You seem to have a malformed format string. Example: Correct: >>> "

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread alankrinsky
Chris, I tried placing in the format you suggested and received this error message: END PROGRAM. Traceback (most recent call last): File "", line 396, in ValueError: incomplete format key On Friday, December 28, 2012 11:10:10 AM UTC-5, Chris Angelico wrote: > On Sat, D

Re: Wrapping statements in Python in SPSS

2012-12-28 Thread Chris Angelico
On Sat, Dec 29, 2012 at 3:01 AM, wrote: > I am working with Python looping in SPSS. What are the limits for the > > for var1, var2, var3 in zip(Variable1, Variable2, Variable3): > > statement in the Python looping function within SPSS? I am getting an error > message, I presume because of wrappi

Wrapping statements in Python in SPSS

2012-12-28 Thread alankrinsky
I am working with Python looping in SPSS. What are the limits for the for var1, var2, var3 in zip(Variable1, Variable2, Variable3): statement in the Python looping function within SPSS? I am getting an error message, I presume because of wrapping or length. Imagine the above statement, but exp

Re: Source code of Windows installer for Python interactive interpreter

2012-12-28 Thread Dave Angel
On 12/28/2012 10:30 AM, philip.a.mol...@gmail.com wrote: > I am writing a command-line application for Windows. I would like to review > the Python source code to find out how to install my application so that it > doesn't have to be called using the path and file name (i.e. being able to > type

Re: Source code of Windows installer for Python interactive interpreter

2012-12-28 Thread Andrew Berg
On 2012.12.28 09:30, philip.a.mol...@gmail.com wrote: > Is the Python directory (i.e. "C:\Python33") assigned to the PATH variable > using the Batch PATH built-in command? If so, where? As of Python 3.3, there is a py.exe in the system32 directory that launches the appropriate version of Python fo

Re: Meaning of `\newline` as escape sequence

2012-12-28 Thread Chris Angelico
On Sat, Dec 29, 2012 at 2:42 AM, Marco wrote: > Hi all, in the documentation: > > http://docs.python.org/3.3/reference/lexical_analysis.html > > the escape sequence `\newline` is expained as "Backslash and newline > ignored". What does it mean? It means this: >>> foo = "This is\ one string." >>

Meaning of `\newline` as escape sequence

2012-12-28 Thread Marco
Hi all, in the documentation: http://docs.python.org/3.3/reference/lexical_analysis.html the escape sequence `\newline` is expained as "Backslash and newline ignored". What does it mean? Thanks in advance, M. -- Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: Facing issue with Python loggin logger for printing object value

2012-12-28 Thread Dave Angel
On 12/28/2012 09:27 AM, Morten Engvoldsen wrote: > Hi Team, > i am new to python Welcome. > and i am using python loggin for log the value of the > object. Below is my code : > > class field: > field_name = "" > length = 0 > type = 0 > value = "" > > def __init__(self, field_

Source code of Windows installer for Python interactive interpreter

2012-12-28 Thread philip . a . molloy
I am writing a command-line application for Windows. I would like to review the Python source code to find out how to install my application so that it doesn't have to be called using the path and file name (i.e. being able to type `python` into the Command prompt, instead of `C:\path\to\execut

ANN: Python Meeting Düsseldorf - 22.01.2013

2012-12-28 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a local user group meeting in Düsseldorf, Germany] ANKÜNDIGUNG Python Meeting Düsseldorf http://pyddf.de/ Ein Treffen v

Re: how to detect the character encoding in a web page ?

2012-12-28 Thread python培训
在 2012年12月24日星期一UTC+8上午8时34分47秒,iMath写道: > how to detect the character encoding in a web page ? > > such as this page > > > > http://python.org/ first setup chardet import chardet #抓取网页html html_1 = urllib2.urlopen(line,timeout=120).read() #print html_1 mychar=chardet.detect(html_1) #pri

Re: Python lists

2012-12-28 Thread Manatee
On Friday, December 28, 2012 9:14:57 AM UTC-5, Manatee wrote: > I read in this: > > ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', '10', '2', > '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', 'Digi-Key', > '490-1521-1-ND', ''] > > > > Then I need to convert it to thi

Re: Python lists

2012-12-28 Thread Roy Smith
In article <8f5cfb99-d1d7-42d7-858a-89dd23cd5...@googlegroups.com>, Manatee wrote: > I read in this: > ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', '10', '2', > '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', 'Digi-Key', > '490-1521-1-ND', ''] > > Then I need to co

Facing issue with Python loggin logger for printing object value

2012-12-28 Thread Morten Engvoldsen
Hi Team, i am new to python and i am using python loggin for log the value of the object. Below is my code : class field: field_name = "" length = 0 type = 0 value = "" def __init__(self, field_name, length, type, value): self.field_name = field_name self.lengt

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread python培训
too much ide for python PyCharm PyDev(Eclipse) Pyscripter Sublime Text TextMate UliPad Vim for beginner best choiceidle -- http://mail.python.org/mailman/listinfo/python-list

Python lists

2012-12-28 Thread Manatee
I read in this: ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', '10', '2', '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', 'Digi-Key', '490-1521-1-ND', ''] Then I need to convert it to this: [['C100', 'C117'], 'X7R 0.033uF 10% 25V 0603', '0603-C_L', '0603-C_N', '10', '

email.message.Message - as_string fails

2012-12-28 Thread Helmut Jarausch
Hi, I'm trying to filter an mbox file by removing some messages. For that I use Parser= FeedParser(policy=policy.SMTP) and 'feed' any lines to it. If the mbox file contains a white line followed by '^From ', I do Msg= Parser.close() (lateron I delete the Parser and create a new one by Parser= F

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread gst
Le jeudi 27 décembre 2012 21:01:16 UTC+1, mogul a écrit : > 'Aloha! > holà ! > > I'm new to python, got 10-20 years perl and C experience, all gained on unix > alike machines hacking happily in vi, and later on in vim. > About same than me, though I had not to use/work with perl for new proj

Re: Custom alphabetical sort

2012-12-28 Thread wxjmfauth
Le vendredi 28 décembre 2012 00:17:53 UTC+1, Ian a écrit : > On Thu, Dec 27, 2012 at 3:17 PM, Terry Reedy wrote: > > >> PS Py 3.3 warranty: ~30% slower than Py 3.2 > > > > > > > > > Do you have any actual timing data to back up that claim? > > > If so, please give specifics, including build,

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Kwpolska
On Thu, Dec 27, 2012 at 9:01 PM, mogul wrote: > 'Aloha! Hello! > I'm new to python, got 10-20 years perl and C experience, all gained on unix > alike machines hacking happily in vi, and later on in vim. You are already awesome, > Now it's python, and currently mainly on my kubuntu desktop. and

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Chris Angelico
On Fri, Dec 28, 2012 at 8:52 PM, Andrew Berg wrote: > On 2012.12.28 00:51, Jamie Paul Griffin wrote: >> The benefit of the tmux client (terminal multiplexer) is that I can see >> all the screens at the same time and quickly switch between them. I >> believe Linux has screen(1) which does the same

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Andrew Berg
On 2012.12.28 00:51, Jamie Paul Griffin wrote: > The benefit of the tmux client (terminal multiplexer) is that I can see > all the screens at the same time and quickly switch between them. I > believe Linux has screen(1) which does the same thing. tmux is generally easily available for Linux, and

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-28 Thread Yuvraj Sharma
Use IDLE -- http://mail.python.org/mailman/listinfo/python-list

Re: learning curve

2012-12-28 Thread Terry Reedy
On 12/27/2012 8:20 PM, Verde Denim wrote: Just getting into Py coding and not understanding why this code doesn't seem to do anything - Part of your 'learning curve' should be learning to write informative subjects lines. The above says almost nothing. For this I suggest "Problem with classes