Re: Problem to calculate the mean in version 3.4

2015-09-25 Thread Peter Otten
Michel Guirguis wrote: > I have downloaded the version 3.4 and I have a problem to calculate the > mean. The software does not recognise the function mean(). I am getting > the following error. > mean([1, 2, 3, 4, 4]) > Traceback (most recent call last): > File "", line 1, in > mean([

Re: Problem to calculate the mean in version 3.4

2015-09-25 Thread Paul Rubin
Michel Guirguis writes: mean([1, 2, 3, 4, 4]) > Traceback (most recent call last):... > NameError: name 'mean' is not defined Before you can use that function, you have to import the statistics module, e.g.: >>> import statistics >>> statistics.mean([1,2,3,4,4]) or >>> from

Re: ConnectionError handling problem

2015-09-25 Thread Cameron Simpson
On 24Sep2015 22:46, shiva upreti wrote: On Friday, September 25, 2015 at 10:55:45 AM UTC+5:30, Cameron Simpson wrote: On 24Sep2015 20:57, shiva upreti wrote: >Thank you Cameron. >I think the problem with my code is that it just hangs without raising any >exceptions. And as mentioned by Laura

Re: PyInstaller+ Python3.5 (h5py import error)

2015-09-25 Thread Hedieh E
On Thursday, September 24, 2015 at 1:12:31 PM UTC+2, Laura Creighton wrote: > In a message of Thu, 24 Sep 2015 02:58:35 -0700, Heli Nix writes: > >Thanks Christian, > > > >It turned out that h5py.defs was not the only hidden import that I needed to > >add. > > > >I managed to get it working with

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread alister
On Thu, 24 Sep 2015 11:45:06 -0700, codywcox wrote: > I seem to be having a problem understanding how arguments and parameters > work, Most likely why my code will not run. > Can anyone elaborate on what I am doing wrong? > > ''' > Cody Cox 9/16/2015 Programming Exercise 1 - Kilometer Converter D

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread Cody Cox
Awesome guys! Thank you for helping me understand this material. Parameters and Arguments are tricky. Looks like its mainly a game of connect the dots with variables. lol. When you return a variable, it needs somewhere to go, and that's why it goes to the next call into the argument area if I n

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread Cody Cox
Oh, i also noticed that declaring the variable I was using and setting it =0.0 helped me out, seems the program had "garbage" in it... (that's what my professor said.) -- https://mail.python.org/mailman/listinfo/python-list

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread Cody Cox
#Cody Cox #9/16/2015 #Programming Exercise 1 - Kilometer Converter #Design a modular program that asks the user to enter a distance in kilometers and then covert it to miles # Miles = Kilometers * 0.6214 def main(): #set the variable to 0.0, makes it a float and creates a place in memory fo

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread Ian Kelly
On Fri, Sep 25, 2015 at 1:03 PM, Cody Cox wrote: > def main(): > #set the variable to 0.0, makes it a float and creates a place in memory > for the variable. > kilo = 0.0 This is addressing a symptom, not the actual problem. Initializing kilo here prevents Python from complaining when yo

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread Laura Creighton
In a message of Fri, 25 Sep 2015 11:50:10 -0700, Cody Cox writes: >Awesome guys! Thank you for helping me understand this material. Parameters >and Arguments are tricky. Looks like its mainly a game of connect the dots >with variables. lol. > >When you return a variable, it needs somewhere to go,

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread Laura Creighton
In a message of Fri, 25 Sep 2015 22:15:26 +0200, Laura Creighton writes: >No. You are going to return whatever is called 'experience' and >whatever is called 'monsters' and assign them to 'count' and 'monsters'. ARRGH! I meant assign them to 'count' and 'animals'. (I read that 3 times and _stil

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread Cody Cox
On Friday, September 25, 2015 at 1:26:02 PM UTC-7, Laura Creighton wrote: > In a message of Fri, 25 Sep 2015 22:15:26 +0200, Laura Creighton writes: > > >No. You are going to return whatever is called 'experience' and > >whatever is called 'monsters' and assign them to 'count' and 'monsters'. >

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread Denis McMahon
On Fri, 25 Sep 2015 12:03:43 -0700, Cody Cox wrote: > #Design a modular program that asks the user to enter a distance in > kilometers and then covert it to miles # Miles = Kilometers * 0.6214 #!/usr/bin/python # main calls the input routine to get the km value, then # calls the conversion rout

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread Terry Reedy
On 9/25/2015 2:50 PM, Cody Cox wrote: Awesome guys! Thank you for helping me understand this material. Parameters and Arguments are tricky. Looks like its mainly a game of connect the dots with variables. lol. If you stick with the convention that parameters are names in the header of a functi

Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-25 Thread Larry Hudson via Python-list
You've already received a lot of answers and guidance, but here is on more point... On 09/25/2015 12:03 PM, Cody Cox wrote: [snip] this I am not sure about, I set Kilo=get_input(kilo), ... Watch your capitalization! Kilo is _NOT_ the same as kilo. Case is significant in Python (as wel

PY3.5 and nnumpy and scipy installation problem

2015-09-25 Thread Ek Esawi
Hi All— I am a beginner in Python and new to this list, but I am an experienced programming in a few other languages. Last year I installed numpy and scipy for Python3.3 on my computer with windows 7, 64 bit OS. Today I downloaded Python3.5, but I the installation for numpy 1.9.2 or 1.9.3 nor sc

64 bit python 3.5

2015-09-25 Thread Bill Strum
Is there a 64 bit version of 3.5 and if so where can I get it. Thanks. -- Bill Strum -- https://mail.python.org/mailman/listinfo/python-list

ANN: python-ldap 2.4.21

2015-09-25 Thread Michael Ströder
Find a new release of python-ldap: http://pypi.python.org/pypi/python-ldap/2.4.21 python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related st

Re: PY3.5 and nnumpy and scipy installation problem

2015-09-25 Thread Steven D'Aprano
Hi Ek, and welcome, My responses below your questions. On Sat, 26 Sep 2015 01:43 pm, Ek Esawi wrote: > Hi All— > > I am a beginner in Python and new to this list, but I am an experienced > programming in a few other languages. > > Last year I installed numpy and scipy for Python3.3 on my com

Re: PY3.5 and nnumpy and scipy installation problem

2015-09-25 Thread Mark Lawrence
On 26/09/2015 04:43, Ek Esawi wrote: Hi All— I am a beginner in Python and new to this list, but I am an experienced programming in a few other languages. Last year I installed numpy and scipy for Python3.3 on my computer with windows 7, 64 bit OS. Today I downloaded Python3.5, but I the instal

Re: 64 bit python 3.5

2015-09-25 Thread Mark Lawrence
On 25/09/2015 17:55, Bill Strum wrote: Is there a 64 bit version of 3.5 and if so where can I get it. Thanks. -- Bill Strum https://www.python.org/downloads/release/python-350/ -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark La