Re: New Python student needs help with execution

2015-06-11 Thread Mark Lawrence
On 11/06/2015 05:50, c me wrote: I installed 2.7.9 on a Win8.1 machine. The Coursera instructor did a simple install then executed Python from a file in which he'd put a simple hello world script. My similar documents folder cannot see the python executable. How do I make this work? I'm n

Re: Did the 3.4.4 docs get published early?

2015-06-11 Thread Nicholas Chammas
Sorry, somehow the formatting in my previous email didn't come through correctly. This part was supposed to be in a quote block: > Also, just replacing the version number in the URL works for the python 3 series > (use 3.X even for python 3.0), even farther back than the drop down menu allows. N

Re: New Python student needs help with execution

2015-06-11 Thread Laura Creighton
In a message of Wed, 10 Jun 2015 21:50:54 -0700, c me writes: >I installed 2.7.9 on a Win8.1 machine. The Coursera instructor did a simple >install then executed Python from a file in which he'd put a simple hello >world script. My similar documents folder cannot see the python executable. >Ho

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-11 Thread Steven D'Aprano
On Thursday 11 June 2015 15:39, Devin Jeanpierre wrote: >> But I'm not talking about re-inventing what already exists. If I want >> JSON, I'll use JSON, not spend weeks or months re-writing it from >> scratch. I can't do this: >> >> class MyClass: >>pass >> >> a = MyClass() >> serialised = repr(a)

PYTHON QUESTION

2015-06-11 Thread adebayo . abraham
Help with this problem! Temperature converter Description Write two functions that will convert temperatures back and forth from the Celsius and Fahrenheit temperature scales. The formulas for making the conversion are as follows: Tc=(5/9)*(Tf-32) Tf=(9/5)*Tc+32 where Tc is the Celsius te

Re: PYTHON QUESTION

2015-06-11 Thread David Palao
2015-06-11 12:44 GMT+02:00 : > Help with this problem! > > Temperature converter > Description > > Write two functions that will convert temperatures back and forth from the > Celsius and Fahrenheit temperature scales. The formulas for making the > conversion are as follows: > > Tc=(5/9)*(Tf-3

A basic dictionary question

2015-06-11 Thread David Aldrich
Hi I am fairly new to Python. I am writing some code that uses a dictionary to store definitions of hardware registers. Here is a small part of it: import sys register = { 'address' : 0x3001c, 'fields' : { 'FieldA' : { 'range' : (31,20), }, 'FieldB

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-11 Thread Serhiy Storchaka
On 11.06.15 02:58, Chris Angelico wrote: On Thu, Jun 11, 2015 at 8:10 AM, Devin Jeanpierre wrote: The problem is that there are two different ways repr might write out a dict equal to {'a': 1, 'b': 2}. This can make tests brittle -- e.g. it's why doctest fails badly at examples involving dictio

Re: Parser needed.

2015-06-11 Thread Skybuck Flying
Well it did help a little bit. Somebody asked if there was already a parser for it. I answered yes in C#. So I took a closer look at it... and learned something from it. Maybe I would have done that anyway... or maybe not... Now we will never know... but I am happy that the parser is now ok,

I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread Skybuck Flying
Hello, I don't like the object orientated part of Python. The idea/prospect of having to write "self" everywhere... seems very horrorific and a huge time waster. (Perhaps the module thing of python might help in future not sure about that). What are your thoughts on the "self" thing/requir

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread Skybuck Flying
Little typo corrected... it's a common typo I seem to make. "with" had to be "without" see ***. "Skybuck Flying" wrote in message news:... Hello, I don't like the object orientated part of Python. The idea/prospect of having to write "self" everywhere... seems very horrorific and a huge time

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread Skybuck Flying
Another typo corrected... see (*) "Skybuck Flying" wrote in message news:2c87e$55796f2c$5419aafe$47...@news.ziggo.nl... Little typo corrected... it's a common typo I seem to make. "with" had to be "without" see ***. "Skybuck Flying" wrote in message news:... Hello, I don't like the o

Re: A basic dictionary question

2015-06-11 Thread Peter Otten
David Aldrich wrote: > Hi > > I am fairly new to Python. I am writing some code that uses a dictionary > to store definitions of hardware registers. Here is a small part of it: > > import sys > > register = { > 'address' : 0x3001c, > 'fields' : { > 'FieldA' : { >

Re: A basic dictionary question

2015-06-11 Thread MRAB
On 2015-06-11 11:10, David Aldrich wrote: Hi I am fairly new to Python. I am writing some code that uses a dictionary to store definitions of hardware registers. Here is a small part of it: import sys register = { 'address' : 0x3001c, 'fields' : { 'FieldA' : {

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread Skybuck Flying
Then again... I also believe the highest goal for a programming language is "natural spoken" language. If "self.somefield" equals 10 then... Does have some understandable ring to it. However... time constraints also have to be kept in mind. In another words if the code looks like begin of

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread Chris Angelico
On Thu, Jun 11, 2015 at 9:27 PM, Skybuck Flying wrote: > If I wanted to access a global variable I would use the existing "global" > thing > > global SomeField... > > maybe if I wanted to use a local variable for routine: > > local SomeField... > > seems nicer... then having to use self everywhere

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread Chris Angelico
On Thu, Jun 11, 2015 at 9:27 PM, Skybuck Flying wrote: > If I wanted to access a global variable I would use the existing "global" > thing > > global SomeField... > > maybe if I wanted to use a local variable for routine: > > local SomeField... > > seems nicer... then having to use self everywhere

I just need this question explained.

2015-06-11 Thread Adebayo Abraham
I am not requesting for a solution. I just need the question explained. I am a beginner python developer and i do not know where to start from to solve this problem. So anybody, somebody: please explain this question. Am i to create a testcase or create the code to display a value? Challenge: F

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread MRAB
On 2015-06-11 12:27, Skybuck Flying wrote: Then again... I also believe the highest goal for a programming language is "natural spoken" language. Natural language is full of ambiguities. If "self.somefield" equals 10 then... Does have some understandable ring to it. However... time constra

Re: I just need this question explained.

2015-06-11 Thread David Palao
2015-06-11 14:03 GMT+02:00 Adebayo Abraham : > I am not requesting for a solution. I just need the question explained. I am > a beginner python developer and i do not know where to start from to solve > this problem. So anybody, somebody: please explain this question. Am i to > create a testcase

Re: I just need this question explained.

2015-06-11 Thread MRAB
On 2015-06-11 13:03, Adebayo Abraham wrote: I am not requesting for a solution. I just need the question explained. I am a beginner python developer and i do not know where to start from to solve this problem. So anybody, somebody: please explain this question. Am i to create a testcase or create

Re: Parser needed.

2015-06-11 Thread Joel Goldstick
On Thu, Jun 11, 2015 at 7:15 AM, Skybuck Flying wrote: > Well it did help a little bit. > > Somebody asked if there was already a parser for it. > > I answered yes in C#. > > So I took a closer look at it... and learned something from it. > > Maybe I would have done that anyway... or maybe not...

Re: Parser needed.

2015-06-11 Thread Larry Martell
On Thu, Jun 11, 2015 at 8:35 AM, Joel Goldstick wrote: > but you aren't asking questions. You are having a conversation with > yourself on a public q/a list. Its unpleasant Well, he did mention masterbation in another post. -- https://mail.python.org/mailman/listinfo/python-list

Writting Dialog to enter preset items from a combo list

2015-06-11 Thread mewthree19
ok that subject is complex I known I am fairly new to python programming and I am using python 3.4.3 and the gui editor/creator boa Constructor and and another one what I can't think of as I type this will add later on as am typing this of public system and not the computer I do most of my progr

Re: New Python student needs help with execution

2015-06-11 Thread Chris Warrick
On Thu, Jun 11, 2015 at 10:52 AM, Laura Creighton wrote: > In a message of Wed, 10 Jun 2015 21:50:54 -0700, c me writes: >>I installed 2.7.9 on a Win8.1 machine. The Coursera instructor did a simple >>install then executed Python from a file in which he'd put a simple hello >>world script. My s

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread Michael Torrie
On 06/11/2015 05:19 AM, Skybuck Flying wrote: > I haven't written much OO code yet in Python... and don't plan on doing it > too... Except that you already have written OO code in Python with your parser. Or at least code that interacts heavily with OO. Anytime you call a method on a string lik

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread Thomas Mlynarczyk
On 11/06/15 14:16, MRAB wrote: harder then they anticipated. ---^ seems nicer... then having to use self everywhere... "then"? Should be "than"... (That seems to be happening more and more these days...) Indeed :-) -- Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont

Re: Parser needed.

2015-06-11 Thread Rustom Mody
On Thursday, June 11, 2015 at 6:08:22 PM UTC+5:30, larry@gmail.com wrote: > On Thu, Jun 11, 2015 at 8:35 AM, Joel Goldstick wrote: > > but you aren't asking questions. You are having a conversation with > > yourself on a public q/a list. Its unpleasant > > Well, he did mention masterbation i

Error in or

2015-06-11 Thread subhabrata . banerji
Dear Group, In the following script, inp1=raw_input("PRINT YOUR INPUT:") if ("AND" in inp1) or ("OR" in inp1) or ("NOT" in inp1) or (">" in inp1) or ("&" in inp1) or ("MAYBE" in inp1) or ("(" in inp1) or ("*" in inp1): if write this it is working fine, but if I write if ("AND" in

Re: New Python student needs help with execution

2015-06-11 Thread Laura Creighton
In a message of Thu, 11 Jun 2015 16:03:33 +0200, Chris Warrick writes: >On Thu, Jun 11, 2015 at 10:52 AM, Laura Creighton wrote: >> In a message of Wed, 10 Jun 2015 21:50:54 -0700, c me writes: >>>I installed 2.7.9 on a Win8.1 machine. The Coursera instructor did a simple >>>install then executed

Re: Error in or

2015-06-11 Thread Ian Kelly
On Thu, Jun 11, 2015 at 9:40 AM, wrote: > if write this it is working fine, but if I write > > if ("AND" in inp1) or ("OR" in inp1) or ("NOT" in inp1) or (">" in inp1) or > ("&" in inp1) or ("MAYBE" in inp1) or ("(" in inp1) or ("*" in inp1) or (''' > " ''' in inp1): > > the portion of (

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread Rustom Mody
On Thursday, June 11, 2015 at 4:49:59 PM UTC+5:30, Skybuck Flying wrote: > Hello, > > I don't like the object orientated part of Python. > > The idea/prospect of having to write "self" everywhere... seems very > horrorific and a huge time waster. > > (Perhaps the module thing of python might he

Re: Error in or

2015-06-11 Thread subhabrata . banerji
On Thursday, June 11, 2015 at 9:20:59 PM UTC+5:30, Ian wrote: > On Thu, Jun 11, 2015 at 9:40 AM, > > if write this it is working fine, but if I write > > > > if ("AND" in inp1) or ("OR" in inp1) or ("NOT" in inp1) or (">" in inp1) > > or ("&" in inp1) or ("MAYBE" in inp1) or ("(" in inp1) or

Re: Error in or

2015-06-11 Thread Ian Kelly
On Thu, Jun 11, 2015 at 10:39 AM, wrote: > On Thursday, June 11, 2015 at 9:20:59 PM UTC+5:30, Ian wrote: >> On Thu, Jun 11, 2015 at 9:40 AM, >> > if write this it is working fine, but if I write >> > >> > if ("AND" in inp1) or ("OR" in inp1) or ("NOT" in inp1) or (">" in inp1) >> > or ("&" i

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread sohcahtoa82
On Thursday, June 11, 2015 at 4:19:59 AM UTC-7, Skybuck Flying wrote: > Hello, > > I don't like the object orientated part of Python. > > The idea/prospect of having to write "self" everywhere... seems very > horrorific and a huge time waster. > > (Perhaps the module thing of python might help

Re: Error in or

2015-06-11 Thread subhabrata . banerji
On Thursday, June 11, 2015 at 10:18:33 PM UTC+5:30, Ian wrote: > On Thu, Jun 11, 2015 at 10:39 AM, wrote: > > On Thursday, June 11, 2015 at 9:20:59 PM UTC+5:30, Ian wrote: > >> On Thu, Jun 11, 2015 at 9:40 AM, > >> > if write this it is working fine, but if I write > >> > > >> > if ("AND" in

Re: Error in or

2015-06-11 Thread Mark Lawrence
On 11/06/2015 17:39, subhabrata.bane...@gmail.com wrote: On Thursday, June 11, 2015 at 9:20:59 PM UTC+5:30, Ian wrote: On Thu, Jun 11, 2015 at 9:40 AM, if write this it is working fine, but if I write if ("AND" in inp1) or ("OR" in inp1) or ("NOT" in inp1) or (">" in inp1) or ("&" in inp

How to pretty mathematical formulas in Python? Similar to Mathematica formats.

2015-06-11 Thread Sebastian M Cheung via Python-list
How to pretty mathematical formulas in Python? Similar to Mathematica formats. Are there good packages to prettify mathematica formulas in Python? -- https://mail.python.org/mailman/listinfo/python-list

Re: How to pretty mathematical formulas in Python? Similar to Mathematica formats.

2015-06-11 Thread random832
On Thu, Jun 11, 2015, at 14:32, Sebastian M Cheung via Python-list wrote: > How to pretty mathematical formulas in Python? Similar to Mathematica > formats. > > Are there good packages to prettify mathematica formulas in Python? >From a google search, apparently matplotlib has a module called mat

Re: How to pretty mathematical formulas in Python? Similar to Mathematica formats.

2015-06-11 Thread random832
On Thu, Jun 11, 2015, at 14:54, random...@fastmail.us wrote: > On Thu, Jun 11, 2015, at 14:32, Sebastian M Cheung via Python-list > wrote: > > How to pretty mathematical formulas in Python? Similar to Mathematica > > formats. > > > > Are there good packages to prettify mathematica formulas in Pyth

Python 3.5.0b2 - permission error after pip upgrade

2015-06-11 Thread Andreas Balogh
I've installed a fresh copy of Python 3.5.0b2 and - as recommended - upgraded pip. I don't understand the reason for the permission errors as I am owner and have full control for the temporary directory created. What can I do to fix this? C:\Apps\Python35>pip install --upgrade pip You are usin

Re: Python 3.5.0b2 - permission error after pip upgrade

2015-06-11 Thread Chris Angelico
On Fri, Jun 12, 2015 at 4:57 AM, Andreas Balogh wrote: > I've installed a fresh copy of Python 3.5.0b2 and - as recommended - upgraded > pip. I don't > understand the reason for the permission errors as I am owner and have full > control for > the temporary directory created. > > What can I do t

Re: Python 3.5.0b2 - permission error after pip upgrade

2015-06-11 Thread Zachary Ware
On Thu, Jun 11, 2015 at 2:15 PM, Chris Angelico wrote: > On Fri, Jun 12, 2015 at 4:57 AM, Andreas Balogh wrote: >> I've installed a fresh copy of Python 3.5.0b2 and - as recommended - >> upgraded pip. I don't >> understand the reason for the permission errors as I am owner and have full >> cont

Re: How to pretty mathematical formulas in Python? Similar to Mathematica formats.

2015-06-11 Thread TheSeeker
On Thursday, June 11, 2015 at 1:33:12 PM UTC-5, Sebastian M Cheung wrote: > How to pretty mathematical formulas in Python? Similar to Mathematica formats. > > Are there good packages to prettify mathematica formulas in Python? Sympy (http://www.sympy.org/en/index.html) has some capabilities to p

Re: How to pretty mathematical formulas in Python? Similar to Mathematica formats.

2015-06-11 Thread Sebastian M Cheung via Python-list
On Thursday, June 11, 2015 at 7:33:12 PM UTC+1, Sebastian M Cheung wrote: > How to pretty mathematical formulas in Python? Similar to Mathematica formats. > > Are there good packages to prettify mathematica formulas in Python? Thanks Pythonistas -- https://mail.python.org/mailman/listinfo/python

XCode and Python

2015-06-11 Thread Sebastian M Cheung via Python-list
For some reason I cannot build now in XCode: $ xcodebuild -find python /Users/sebc/anaconda/bin/python $python Python 2.7.10 |Anaconda 2.2.0 (x86_64)| (default, May 28 2015, 17:04:42) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more informat

Re: XCode and Python

2015-06-11 Thread Sebastian M Cheung via Python-list
On Thursday, June 11, 2015 at 11:07:59 PM UTC+1, Sebastian M Cheung wrote: > For some reason I cannot build now in XCode: > > $ xcodebuild -find python > /Users/sebc/anaconda/bin/python > > $python > Python 2.7.10 |Anaconda 2.2.0 (x86_64)| (default, May 28 2015, 17:04:42) > [GCC 4.2.1 (Apple Inc

Re: XCode and Python

2015-06-11 Thread C.D. Reimer
On 6/11/2015 3:09 PM, Sebastian M Cheung via Python-list wrote: Or I need to configure something in Xcode? Perhaps this link might help determine if the problem is with Xcode and/or Python. http://stackoverflow.com/questions/5276967/python-in-xcode-6 Chris R. -- https://mail.python.org/mail