Re: SNI support in python 2.7 for Locust load tests

2014-09-30 Thread dieter
Reddy writes: > ... > I'm trying to use locust (http://locust.io/) to run load test of one site > we're developing. Everything was running nice and smooth until we switch the > servers to use SNI. SNI is not officially supported in python 2.7.5 A recent post in this list regarding missing SNI s

Re: Restarting Python

2014-09-30 Thread Chris Angelico
On Wed, Oct 1, 2014 at 9:16 AM, Seymore4Head wrote: > On Tue, 30 Sep 2014 18:58:50 -0400, Terry Reedy > wrote: > >>On 9/30/2014 5:15 PM, Seymore4Head wrote: >>> Since the developers of Python decided to make Python 3 non backward >>> compatible, >> >>This is a trollish exaggeration. >> >> > I can

Re: how to parse standard algebraic notation

2014-09-30 Thread Chris Angelico
On Wed, Oct 1, 2014 at 6:53 AM, math math wrote: > I want to basically write a program that inputs a polynomial in standard > algebraic notation and outputs its derivative. > > I know that I need to get the exponent somehow, but I am not sure how to > accomplish this in python (3.3) As Gary say

Re: Python code in presentations

2014-09-30 Thread Roy Smith
On Tue, Sep 30, 2014 1:50 PM CEST Jean-Michel Pichavant wrote: > >I'm currently writing a presentation to help my co-workers ramp up on new > >features of our tool (written in python (2.7)). > > > >I have some difficulties presenting code in an efficient way (with some > >basic syntax highlights

Re: Restarting Python

2014-09-30 Thread Mark Lawrence
On 30/09/2014 22:27, Grant Edwards wrote: On 2014-09-30, Seymore4Head wrote: Since the developers of Python decided to make Python 3 non backward compatible, I can't help but wonder why they don't think a command to restart would be a useful addition? Uh... what? Does that make any sense to

Re: Using namedtuple with sqlite, surely it can do better than the example

2014-09-30 Thread Mark Lawrence
On 30/09/2014 22:32, c...@isbd.net wrote: In the namedtuple documentation there's an example:- EmployeeRecord = namedtuple('EmployeeRecord', 'name, age, title, department, paygrade') import sqlite3 conn = sqlite3.connect('/companydata') cursor = conn.cursor() cursor.ex

Re: Restarting Python

2014-09-30 Thread Seymore4Head
On Tue, 30 Sep 2014 18:58:50 -0400, Terry Reedy wrote: >On 9/30/2014 5:15 PM, Seymore4Head wrote: >> Since the developers of Python decided to make Python 3 non backward >> compatible, > >This is a trollish exaggeration. > > > I can't help but wonder why they don't think a command to >> restart w

Re: Using namedtuple with sqlite, surely it can do better than the example

2014-09-30 Thread Peter Otten
c...@isbd.net wrote: > In the namedtuple documentation there's an example:- > > EmployeeRecord = namedtuple('EmployeeRecord', 'name, age, title, > department, paygrade') > > import sqlite3 > conn = sqlite3.connect('/companydata') > cursor = conn.cursor() > cursor.execute(

Re: Restarting Python

2014-09-30 Thread Terry Reedy
On 9/30/2014 5:15 PM, Seymore4Head wrote: Since the developers of Python decided to make Python 3 non backward compatible, This is a trollish exaggeration. > I can't help but wonder why they don't think a command to restart would be a useful addition? More trollishness. Python does not hav

Re: Restarting Python

2014-09-30 Thread Seymore4Head
On Tue, 30 Sep 2014 18:05:20 -0400, Ned Batchelder wrote: >On 9/30/14 5:15 PM, Seymore4Head wrote: >> Since the developers of Python decided to make Python 3 non backward >> compatible, I can't help but wonder why they don't think a command to >> restart would be a useful addition? >> > >Starting

Re: Restarting Python

2014-09-30 Thread Ned Batchelder
On 9/30/14 5:15 PM, Seymore4Head wrote: Since the developers of Python decided to make Python 3 non backward compatible, I can't help but wonder why they don't think a command to restart would be a useful addition? Starting a process over again in the same way is not something that is easy to

Using namedtuple with sqlite, surely it can do better than the example

2014-09-30 Thread cl
In the namedtuple documentation there's an example:- EmployeeRecord = namedtuple('EmployeeRecord', 'name, age, title, department, paygrade') import sqlite3 conn = sqlite3.connect('/companydata') cursor = conn.cursor() cursor.execute('SELECT name, age, title, department, paygr

Re: Restarting Python

2014-09-30 Thread Grant Edwards
On 2014-09-30, Seymore4Head wrote: > Since the developers of Python decided to make Python 3 non backward > compatible, I can't help but wonder why they don't think a command to > restart would be a useful addition? Uh... what? Does that make any sense to anybody else? -- Grant Edwards

Restarting Python

2014-09-30 Thread Seymore4Head
Since the developers of Python decided to make Python 3 non backward compatible, I can't help but wonder why they don't think a command to restart would be a useful addition? -- https://mail.python.org/mailman/listinfo/python-list

Re: how to parse standard algebraic notation

2014-09-30 Thread Gary Herron
On 09/30/2014 01:53 PM, math math wrote: Hi, I am trying to learn Python while solving exercises. I want to basically write a program that inputs a polynomial in standard algebraic notation and outputs its derivative. I know that I need to get the exponent somehow, but I am not sure how to a

how to parse standard algebraic notation

2014-09-30 Thread math math
Hi, I am trying to learn Python while solving exercises. I want to basically write a program that inputs a polynomial in standard algebraic notation and outputs its derivative. I know that I need to get the exponent somehow, but I am not sure how to accomplish this in python (3.3) Do you hav

Re[2]: Teaching Python

2014-09-30 Thread Grawburg
I use Chris Roffey's "Coding Club - Python Basics (Level 1)" and "Coding Club - Python: Next Steps (Level 2)" I also use the Turtle material from "Python for Kids" These are 11+ year old kids in week long, 3 hour/day summer camps on the Raspberry Pi and Python. The Level 2 book is for the 2nd cam

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread cl
Neil D. Cerutti wrote: > On 9/30/2014 7:35 AM, c...@isbd.net wrote: > > Thus I'd have something like (apologies for any syntax errors):- > > > > cfg = { "LeisureVolts": ["AIN0", 0.061256, "Leisure Battery Voltage"], > > "StarterVolts": ["AIN1", 0.060943, "Starter Battery Voltage"], > >

Re: Python code in presentations

2014-09-30 Thread Mihamina Rakotomandimby
On 09/30/2014 02:50 PM, Jean-Michel Pichavant wrote: I wonder if some people in this list who have successfully presented python code have some tips about doing the proper way. Ned's presentations for pycons are to me one example of successful code presentation: - the layout is simple - t

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread Chris Angelico
On Wed, Oct 1, 2014 at 3:30 AM, wrote: > The main trouble with this approach is that I need some way to have > the python/config file available at the 'home' end of this as well as > at the 'remote' end. I guess I could write a copy of the file into > the database but then I have the editing iss

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread Chris Angelico
On Wed, Oct 1, 2014 at 3:31 AM, Rustom Mody wrote: > On the other hand if you impose a convention: Constants file-module has > NOTHING but constants, thats a non-formal convention and thats ok. > > If however you mix it up with other (real) code, you'll get a bloody mess. > This kind of stuff "7*2

Re: SNI support in python 2.7 for Locust load tests

2014-09-30 Thread Christian Heimes
On 30.09.2014 16:50, Reddy wrote: > Hello, > > At the beginning - welcome everyone, as this is my first post here. I'm not > an active Python developer now, but I have general knowledge of the language. > > I'm trying to use locust (http://locust.io/) to run load test of one site > we're devel

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread cl
Rustom Mody wrote: > > > # docs for first option > > # more docs > > # examples > > # etcetera > > first_option =123 > > > # docs for second option > > second_option = 234 > > > Is that Python code, or is it a sectionless INI file, or what? > > Yeah I was going to say that this is possible >

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread Rustom Mody
On Tuesday, September 30, 2014 10:46:21 PM UTC+5:30, Chris Angelico wrote: > On Wed, Oct 1, 2014 at 3:01 AM, Rustom Mody wrote: > >> And you get expressions for free - simple stuff like > >> "7*24*60*60" to represent the number of seconds in a week (for people > >> who aren't intimately familiar w

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread Chris Angelico
On Wed, Oct 1, 2014 at 3:01 AM, Rustom Mody wrote: >> And you get expressions for free - simple stuff like >> "7*24*60*60" to represent the number of seconds in a week (for people >> who aren't intimately familiar with 604800), or calculations relative >> to previous data, or whatever. Sometimes i

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread Rustom Mody
On Tuesday, September 30, 2014 10:22:12 PM UTC+5:30, Chris Angelico wrote: > On Wed, Oct 1, 2014 at 2:39 AM, Rustom Mody wrote: > >> python - just keep config in the modules/classes, not easy to use > >> at 'both ends' (home and remote), otherwise quite simple > > Can work at a trivial lev

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread Chris Angelico
On Wed, Oct 1, 2014 at 2:39 AM, Rustom Mody wrote: >> python - just keep config in the modules/classes, not easy to use >> at 'both ends' (home and remote), otherwise quite simple > > Can work at a trivial level. > > As soon as things get a bit larger data and code mixed up is a recipe for

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread Rustom Mody
On Tuesday, September 30, 2014 8:48:15 PM UTC+5:30, c...@isbd.net wrote: > Rustom Mody wrote: > > On Tuesday, September 30, 2014 5:18:31 PM UTC+5:30, Chris wrote: > > > I would actually > > > quite like to keep the configuration data separate from the code as it > > > would simplify using the data

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread Neil D. Cerutti
On 9/30/2014 7:35 AM, c...@isbd.net wrote: Thus I'd have something like (apologies for any syntax errors):- cfg = { "LeisureVolts": ["AIN0", 0.061256, "Leisure Battery Voltage"], "StarterVolts": ["AIN1", 0.060943, "Starter Battery Voltage"], "LeisureAmps1": ["AIN2", 0.423122, "

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread jkn
might this be of interest (though old)? https://wiki.python.org/moin/ConfigParserShootout Cheers Jon N -- https://mail.python.org/mailman/listinfo/python-list

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread cl
Rustom Mody wrote: > On Tuesday, September 30, 2014 5:18:31 PM UTC+5:30, Chris wrote: > > > I would actually > > quite like to keep the configuration data separate from the code as it > > would simplify using the data at the 'home' end of things as I'd just > > need to copy the configuration file

SNI support in python 2.7 for Locust load tests

2014-09-30 Thread Reddy
Hello, At the beginning - welcome everyone, as this is my first post here. I'm not an active Python developer now, but I have general knowledge of the language. I'm trying to use locust (http://locust.io/) to run load test of one site we're developing. Everything was running nice and smooth un

Re: Re:Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread cl
Dave Angel wrote: > c...@isbd.net Wrote in message: > > I am puzzling where and how to keep these configuration values. My > > current design has them in dedicated tables in the database but this > > is rather clumsy in many ways as there's an overhead reading them > > every time the program needs

Re: Python code in presentations

2014-09-30 Thread Albert-Jan Roskam
-- On Tue, Sep 30, 2014 1:50 PM CEST Jean-Michel Pichavant wrote: >Hello list, > >I'm currently writing a presentation to help my co-workers ramp up on new >features of our tool (written in python (2.7)). > >I have some difficulties presenting code in an efficient wa

Re: Python code in presentations

2014-09-30 Thread Jean-Michel Pichavant
- Original Message - > From: "Joel Goldstick" > Cc: python-list@python.org > Sent: Tuesday, 30 September, 2014 3:01:38 PM > Subject: Re: Python code in presentations > > I'm a little at a loss that you are concentrating on showing code to > users. Are you also showing how your tool works

Re: Python code in presentations

2014-09-30 Thread Ned Batchelder
On 9/30/14 7:50 AM, Jean-Michel Pichavant wrote: I wonder if some people in this list who have successfully presented python code have some tips about doing the proper way. Ned's presentations for pycons are to me one example of successful code presentation: - the layout is simple - the c

Re: Python code in presentations

2014-09-30 Thread Rustom Mody
On Tuesday, September 30, 2014 5:21:00 PM UTC+5:30, Jean-Michel Pichavant wrote: > Hello list, > I'm currently writing a presentation to help my co-workers ramp up on new > features of our tool (written in python (2.7)). > I have some difficulties presenting code in an efficient way (with some bas

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread Rustom Mody
On Tuesday, September 30, 2014 5:18:31 PM UTC+5:30, Chris wrote: > I would actually > quite like to keep the configuration data separate from the code as it > would simplify using the data at the 'home' end of things as I'd just > need to copy the configuration file across. This was why the datab

Re:Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread Dave Angel
c...@isbd.net Wrote in message: > I am developing some code which runs on a (remote from me most of the > time) Beaglebone Black single board computer. It reads various items > of data (voltages, currents, temperatures, etc.) using both a 1-wire > bus system and the Beaglebone's ADC inputs. The v

Re: Python code in presentations

2014-09-30 Thread Joel Goldstick
On Tue, Sep 30, 2014 at 8:46 AM, Tom P wrote: > On 30.09.2014 13:50, Jean-Michel Pichavant wrote: >> >> Hello list, >> >> I'm currently writing a presentation to help my co-workers ramp up on new >> features of our tool (written in python (2.7)). >> >> I have some difficulties presenting code in a

Re: Python code in presentations

2014-09-30 Thread Tom P
On 30.09.2014 13:50, Jean-Michel Pichavant wrote: Hello list, I'm currently writing a presentation to help my co-workers ramp up on new features of our tool (written in python (2.7)). I have some difficulties presenting code in an efficient way (with some basic syntax highlights). I need to b

Python code in presentations

2014-09-30 Thread Jean-Michel Pichavant
Hello list, I'm currently writing a presentation to help my co-workers ramp up on new features of our tool (written in python (2.7)). I have some difficulties presenting code in an efficient way (with some basic syntax highlights). I need to be catchy about the code I'm presenting otherwise th

Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-09-30 Thread cl
I am developing some code which runs on a (remote from me most of the time) Beaglebone Black single board computer. It reads various items of data (voltages, currents, temperatures, etc.) using both a 1-wire bus system and the Beaglebone's ADC inputs. The values are stored at hourly intervals int