[Tutor] generate a list/dict with a dynamic name..

2015-09-27 Thread bruce
Hi. I can do a basic a=[] to generate a simple list.. i can do a a="aa"+bb" how can i do a a=[] where a would have the value of "aabb" in other words, generate a list/dict with a dynamically generated name IRC replies have been "don't do it".. or it's bad.. but no one has said you can do it

Re: [Tutor] generate a list/dict with a dynamic name..

2015-09-27 Thread Chris Warrick
On 27 September 2015 at 18:38, bruce wrote: > Hi. > > I can do a basic > a=[] > to generate a simple list.. > > i can do a a="aa"+bb" > > how can i do a > a=[] > > where a would have the value of "aabb" > > in other words, generate a list/dict with a dynamically generated name > > IRC replies ha

Re: [Tutor] generate a list/dict with a dynamic name..

2015-09-27 Thread Mark Lawrence
On 27/09/2015 17:38, bruce wrote: Hi. I can do a basic a=[] to generate a simple list.. i can do a a="aa"+bb" Really? >>> a="aa"+bb" File "", line 1 a="aa"+bb" ^ SyntaxError: EOL while scanning string literal No. Moral of the story, never type something in directly, al

Re: [Tutor] generate a list/dict with a dynamic name..

2015-09-27 Thread Steven D'Aprano
On Sun, Sep 27, 2015 at 12:38:05PM -0400, bruce wrote: > Hi. > > I can do a basic > a=[] > to generate a simple list.. > > i can do a a="aa"+bb" > > how can i do a > a=[] > > where a would have the value of "aabb" > > in other words, generate a list/dict with a dynamically generated name Yo

Re: [Tutor] generate a list/dict with a dynamic name..

2015-09-27 Thread Danny Yoo
On Sun, Sep 27, 2015 at 9:38 AM, bruce wrote: > Hi. > > I can do a basic > a=[] > to generate a simple list.. > > i can do a a="aa"+bb" > > how can i do a > a=[] > > where a would have the value of "aabb" > > in other words, generate a list/dict with a dynamically generated name There is a con

[Tutor] mathematical and statistical functions in Python

2015-09-27 Thread Michel Guirguis
Good afternoon, Thanks for your e-mail. I did not receive e-mail from Mr Otten.Basically, the problem that I am facing is that python 3.4 does not recognise the mathematical and statistical functions. For example, I am trying to find the square root, sqrt(25) but the program does not recognise

[Tutor] xunit unittest.TestSuite

2015-09-27 Thread vijayram
Hi All, I am facing this same issue described here: https://github.com/nose-devs/nose/issues/542 any alternative or solution to this issue that anyone is aware of... please kindly suggest… need a tutor or help in someway Thank you, VJ _

Re: [Tutor] Creating lists with 3 (later4) items occuring only once

2015-09-27 Thread marcus lütolf
Hello Martin, again thanks for your endeavour, ist tought me to really think deeply how to specify my task fort he Python language. Before I start to work with your "heavy" piece of code for a beginner below I like to make the following statements: 1. my task is to create lists or tupleS (whicheve

Re: [Tutor] Creating lists with 3 (later4) items occuring only once

2015-09-27 Thread marcus lütolf
Hello Martin. I never exspected to get such motivating comments and advice !!! Thank you again. Referring to my statments below 1. I explain my task in plain text: Flights (in golfers language) or Triples (in computer language) composed of 3 golfers (in golfers language) or 3 letters (in compu

Re: [Tutor] mathematical and statistical functions in Python

2015-09-27 Thread Martin A. Brown
Greetings Michel, Thanks for your e-mail. I did not receive e-mail from Mr Otten. Nobody in their right mind wants to receive an email from Mr. Otten. ;) Basically, the problem that I am facing is that python 3.4 does not recognise the mathematical and statistical functions. https://do

Re: [Tutor] mathematical and statistical functions in Python

2015-09-27 Thread Danny Yoo
On Fri, Sep 25, 2015 at 3:58 AM, Michel Guirguis wrote: > Good afternoon, > > Thanks for your e-mail. I did not receive e-mail from Mr Otten.Basically, the > problem that I am facing is that python 3.4 does not recognise the > mathematical and statistical functions. Many mathematical functions

Re: [Tutor] mathematical and statistical functions in Python

2015-09-27 Thread Alan Gauld
On 25/09/15 11:58, Michel Guirguis wrote: the problem that I am facing is that python 3.4 does not recognise the > mathematical and statistical functions. That's because they are in the math and statistics modules which you have to import: Python 3.4.0 (default, Jun 19 2015, 14:20:21) [GCC 4

Re: [Tutor] xunit unittest.TestSuite

2015-09-27 Thread Danny Yoo
On Sat, Sep 26, 2015 at 10:25 AM, vijayram wrote: > Hi All, > > I am facing this same issue described here: > https://github.com/nose-devs/nose/issues/542 > > > any alternative or solution to this issue that anyone is aware of... please > kindly s

Re: [Tutor] Opencv

2015-09-27 Thread Alan Gauld
On 19/09/15 11:29, Ahmed AL-Masri wrote: I have a project for hand detection as the person wave his hand than give an action. I am trying to use the current library in opencv using the haar cascade. This list is for people learning Python programming with the standard library. opencv is a la

Re: [Tutor] Creating lists with 3 (later4) items occuring only once

2015-09-27 Thread Martin A. Brown
Hello Marcus, I never exspected to get such motivating comments and advice !!! Thank you again. Much appreciated! Each of us contributes to this mailing list in some way or another. And, not a one of us sprang fully-formed from Zeus's head with our Python expertise. 1. I explain my tas

Re: [Tutor] stx, etx (\x02, \x03)

2015-09-27 Thread Alan Gauld
On 22/09/15 15:44, richard kappler wrote: gives me: line 1 starts with the \x02 hex then the line line 2 is the \xo3 hex alone line 3 starts with the \x02 hex then the line line 4 is the \x03 hex alone lather rinse repeat. Silly possibility but are your lines fixed length? And if so might they

Re: [Tutor] stx, etx (\x02, \x03)

2015-09-27 Thread Alan Gauld
On 22/09/15 17:32, Oscar Benjamin wrote: with open('input/PS06Test_100Packages.xml', 'r') as f1: with open('mod1.xml', 'a') as f2: for line in f1: s = '\x02' + line[:-1] + '\x03\n' A further possibility is the [-1] is not stripping the full EOL on your system. Try u

Re: [Tutor] mathematical and statistical functions in Python

2015-09-27 Thread Laura Creighton
In a message of Sun, 27 Sep 2015 11:48:28 -0700, "Martin A. Brown" writes: > > >Greetings Michel, > >> Thanks for your e-mail. I did not receive e-mail from Mr >> Otten. > >Nobody in their right mind wants to receive an email from Mr. Otten. ;) > >> Basically, the problem that I am facing is that

Re: [Tutor] mathematical and statistical functions in Python

2015-09-27 Thread Alan Gauld
On 27/09/15 22:46, Laura Creighton wrote: The tutor list is sending mail out late. Partly due to me being on vacation and only checking the moderation Q twice last week. Michel had 2 problems. The first is that he hadn't subscribed to python list, which meant that he wasn't getting the repl

Re: [Tutor] stx, etx (\x02, \x03)

2015-09-27 Thread Danny Yoo
On Tue, Sep 22, 2015 at 5:37 AM, richard kappler wrote: > I have a file with several lines. I need to prepend each line with \x02 and > append each line with \x03 for reading into Splunk. I can get the \x02 at > the beginning of each line, no problem, but can't get the \x03 to go on the > end of t

Re: [Tutor] Opencv

2015-09-27 Thread Danny Yoo
> This list is for people learning Python programming with the standard > library. opencv is a large third party set of modules for a very > specific use case. > > You will find a Q&A forum on the opencv web site: > > http://answers.opencv.org/questions/ > > This is much more likely to be able to h