Re: [Tutor] Comment on http://www.catb.org/esr/faqs/smart-questions.html

2013-08-27 Thread Alan Gauld
On 27/08/13 03:48, Chris Down wrote: "Keep the width of the lines in your example to under 62 characters wide." I don't really see any reason to use less than 79 in 2013. The reason for preferring shorter lines is to leave room for the chevrons when the message gets quoted multiple times. eg

Re: [Tutor] Comment on http://www.catb.org/esr/faqs/smart-questions.html

2013-08-27 Thread Chris Down
On 2013-08-27 09:49, Alan Gauld wrote: > The reason for preferring shorter lines is to leave room for > the chevrons when the message gets quoted multiple times. I always reformat quotes with `gq' in vim when I am quoting, I suggest others do the same. pgp8Ve33ukc7A.pgp Description: PGP signatur

Re: [Tutor] Comment on http://www.catb.org/esr/faqs/smart-questions.html

2013-08-27 Thread Steven D'Aprano
On Tue, Aug 27, 2013 at 09:49:46AM +0100, Alan Gauld wrote: > >> I don't really see any reason to use less than 79 in 2013. > > The reason for preferring shorter lines is to leave room for > > the chevrons when the message gets quoted multiple times. > That's just crazy > >>> Mayb

Re: [Tutor] Comment on http://www.catb.org/esr/faqs/smart-questions.html

2013-08-27 Thread Chris Down
On 2013-08-27 20:11, Steven D'Aprano wrote: > I wish mail clients would support rich text using ReST or Markdown. The > mail client could still include a GUI so you choose formatting commands > rather than have to type markup. Why can't you do this through your mailcap instead of relying on the

Re: [Tutor] Python execution timer/proficiency testing

2013-08-27 Thread eryksun
On Tue, Aug 27, 2013 at 2:18 AM, Steven D'Aprano wrote: > On Mon, Aug 26, 2013 at 08:20:30PM +0200, Dino Bektešević wrote: > >> Warning (from warnings module): >> File "/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py", line >> 152 >> warnings.warn(msg, RuntimeWarning) >> RuntimeWa

Re: [Tutor] Python execution timer/proficiency testing

2013-08-27 Thread Oscar Benjamin
On 27 August 2013 11:03, eryksun wrote: > On Tue, Aug 27, 2013 at 2:18 AM, Steven D'Aprano wrote: >> On Mon, Aug 26, 2013 at 08:20:30PM +0200, Dino Bektešević wrote: >> >>> Warning (from warnings module): >>> File "/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py", line >>> 152 >>>

Re: [Tutor] i need help with the following question

2013-08-27 Thread Don Jennings
On Aug 27, 2013, at 3:40 AM, isaac Eric wrote: > print "For a circle of radius %s the area is %s" % (radius,area) > Question: What is the purpose of %s ? Okay, so you're just getting started with python. We're happy to do some hand-holding, but we encourage you to think first. You've follow

Re: [Tutor] spss.BasePivotTable

2013-08-27 Thread Albert-Jan Roskam
Ooops, sorry wrong mailing list! ;-) Regards, Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the

[Tutor] spss.BasePivotTable

2013-08-27 Thread Albert-Jan Roskam
Hello,   I am trying to create a BasePivot table with three columns: one for the labels, one for a a category "Before" and one for "After". The following attempt fails, but what am I doing wrong?   begin program. import spss try:     spss.StartSPSS()     #spss.Submit("get file='demo.sav'.")     s

[Tutor] Global var not defined?

2013-08-27 Thread leam hall
Could use some help with this. Python 2.4.3 on RHEL 5.x. In the functions file that gets imported: def append_customer(line_list): global customers cust = line_list[0] // list with Customer info in [0] cust = clean_word(cust) // Trims white space if len(cust)

Re: [Tutor] Global var not defined?

2013-08-27 Thread Alan Gauld
On 27/08/13 18:58, leam hall wrote: def append_customer(line_list): global customers cust = line_list[0] // list with Customer info in [0] cust = clean_word(cust) // Trims white space if len(cust) and cust not in customers: host_list[cus

Re: [Tutor] Global var not defined?

2013-08-27 Thread Prasad, Ramit
leam hall wrote: > Could use some help with this. Python 2.4.3 on RHEL 5.x. > > In the functions file that gets imported: > > def append_customer(line_list): >     global customers >     cust = line_list[0] // list with Customer info in [0] >     cust = clean_word(cust)  // Trims

Re: [Tutor] Global var not defined?

2013-08-27 Thread leam hall
Well, I'm happy to change things but my python is only so good. And much of that is based off of shell programming. What the data looks like is fairly simple. I have a spreadsheet of host information. Customer 'Alan' may have a dozen or so servers and customer Ramit has another dozen or two. When

Re: [Tutor] Global var not defined?

2013-08-27 Thread Alan Gauld
On 27/08/13 19:50, leam hall wrote: Well, I'm happy to change things but my python is only so good. And much of that is based off of shell programming. You will need to change something because what you have won;t work. The question is what to change? What the data looks like is fairly simp

Re: [Tutor] Python execution timer/proficiency testing (Dino Bektešević)

2013-08-27 Thread Dino Bektešević
Hello, First off thank you for the good responses. That's most likely why I couldn't find it with google, English is not my native language so the little difference between proficiency and efficiency escaped me. I apologize for HTML text first time I sent something from gmail there seemed to be no

[Tutor] os.system() not working

2013-08-27 Thread Nitish Kunder
Hii I have a python program which i am calling from a php script. The arguments to the program is a path to the file The program when directly run from console executes normally. But when I try to execute the program from browser ie call the python script from php, os.system command is not working

Re: [Tutor] Comment on http://www.catb.org/esr/faqs/smart-questions.html

2013-08-27 Thread Rick Moen
/me waves to esteemed tutors and helpers. Quoting Bob Gailer (bgai...@gmail.com): > I have a reaction to > http://www.catb.org/esr/faqs/smart-questions.html and I'd like your > feedback. Perhaps I will then send revised comments to the authors of > the [essay]. As one of the essays' co-autho

Re: [Tutor] Global var not defined?

2013-08-27 Thread Steven D'Aprano
On 28/08/13 03:58, leam hall wrote: Could use some help with this. Python 2.4.3 on RHEL 5.x. In the functions file that gets imported: def append_customer(line_list): global customers Globals are not "globally global", they are global to the module. Otherwise variables defined in mo

Re: [Tutor] os.system() not working

2013-08-27 Thread Alan Gauld
On 27/08/13 11:33, Nitish Kunder wrote: I have a python program which i am calling from a php script. How are you executing the PHP script? Which OS? Which web server? Which browser? Have you tried others? The arguments to the program is a path to the file The program when directly run from c

Re: [Tutor] Python execution timer/proficiency testing (Dino Bektešević)

2013-08-27 Thread Oscar Benjamin
On 27 August 2013 15:05, Dino Bektešević wrote: > Thank you both I did not know it quits(!) but since my further code > never reported an error I assume it returned something similar to > initial guess? > I will add a test of the returned variable ier and try to find another > initial guess or han

Re: [Tutor] spss.BasePivotTable

2013-08-27 Thread Steven D'Aprano
On 27/08/13 23:14, Albert-Jan Roskam wrote: Hello, I am trying to create a BasePivot table with three columns: one for the labels, one for a a category "Before" and one for "After". The following attempt fails, but what am I doing wrong? At least two things. Here is the first: try: [m

Re: [Tutor] Runestone Python Course

2013-08-27 Thread ram sagar
I am a beginner in python i found the Runestone python learning environment the best one i came across. CodeLens is the best feature , as it shows the actual working of the program in graphical way that one will never forget those details. Thanks to all the people who involved in this project. Ra

Re: [Tutor] os.system() not working

2013-08-27 Thread Chris Down
Hello, On 2013-08-27 16:03, Nitish Kunder wrote: > I have a python program which i am calling from a php script. > The arguments to the program is a path to the file > The program when directly run from console executes normally. > But when I try to execute the program from browser ie call the pyt

Re: [Tutor] os.system() not working

2013-08-27 Thread Dominik George
Hi, in any case and apart from what was already said, your setup sounds very awkward, if not insane. Are you sure your implementation is a good idea? -nik Nitish Kunder schrieb: >Hii >I have a python program which i am calling from a php script. >The arguments to the program is a path to th