Re: [Tutor] Question about if functions

2014-08-21 Thread Alan Gauld
On 22/08/14 03:43, Mimi Ou Yang wrote: name = input("Enter your name: ) age = input("Enter your age: ) age = int(age) if (name and age == jimmy and 35): print ("BLABLABLABLABLABLAB") There are two problems here. First You need to put quote signs around 'jimmy' since its a literal string,

[Tutor] Question about if functions

2014-08-21 Thread Mimi Ou Yang
name = input("Enter your name: ) age = input("Enter your age: ) age = int(age) if (name and age == jimmy and 35): print ("BLABLABLABLABLABLAB") how can I make a code that has the same effect has the code that I wrote even though it isn’t a real working code. I hope you unders

Re: [Tutor] Development of administration utility

2014-08-21 Thread Danny Yoo
On Aug 21, 2014 7:39 AM, "Alessandro Di Bella" wrote: > > Hi, > > We are currently investigating different languages and technologies to develop an command line administration utility. Hi Alessandro, This is out of scope for Python Tutor. This is not to say that the question is not interesting,

Re: [Tutor] import values, calculate distance

2014-08-21 Thread Emile van Sebille
On 8/21/2014 6:13 AM, Joel Goldstick wrote:> On Wed, Aug 20, 2014 at 10:12 PM, LN A-go-go > wrote: > while you can name things like this, good python style (look up > 'pep8') says this would be better > id_code, x_coordinate, y_coordinate > > But better yet, I think would be to call these thing

Re: [Tutor] Development of administration utility

2014-08-21 Thread Alan Gauld
On 21/08/14 12:01, Alessandro Di Bella wrote: We are currently investigating different languages and technologies to develop an command line administration utility. For what? Operating under which environments? The utility should have the following characteristics: 1. support for sub comma

Re: [Tutor] Development of administration utility

2014-08-21 Thread Japhy Bartlett
You could definitely achieve that modularity, if the parent package knows (by convention) where to look for sub-modules. I'm not sure there's a built-in mechanism, unless you want to use 'import' in a clever way. It feels like that's more of a RPM/.deb challenge than a Python challenge. There ar

Re: [Tutor] import values, calculate distance

2014-08-21 Thread Emile van Sebille
On 8/21/2014 6:13 AM, Joel Goldstick wrote:> On Wed, Aug 20, 2014 at 10:12 PM, LN A-go-go > wrote: > while you can name things like this, good python style (look up > 'pep8') says this would be better > id_code, x_coordinate, y_coordinate > > But better yet, I think would be to call these thing

Re: [Tutor] Development of administration utility

2014-08-21 Thread Peter Otten
Martin A. Brown wrote: > I think item 2. about bash_completion bit is outside the scope of > Python, specifically, though, and more of an operating environment > thing. I have recently (re)discovered that there is an easy way to get bash completion: https://pypi.python.org/pypi/argcomplete I'

Re: [Tutor] Development of administration utility

2014-08-21 Thread Martin A. Brown
Greetings Alessandro, : We are currently investigating different languages and technologies to : develop an command line administration utility. : Python is one of the options we are looking at for the job but currently we : have no relevant skill set so I thought I'd post some question to ge

[Tutor] Development of administration utility

2014-08-21 Thread Alessandro Di Bella
Hi, We are currently investigating different languages and technologies to develop an command line administration utility. Python is one of the options we are looking at for the job but currently we have no relevant skill set so I thought I'd post some question to get an idea if using python i

Re: [Tutor] sys module - what does "It is always available" mean in the docs?

2014-08-21 Thread Peter Otten
Flynn, Stephen (L & P - IT) wrote: > The documentation (https://docs.python.org/3/library/sys.html) for > Python 3.4.1 says that "This module provides access to some variables > used or maintained by the interpreter and to functions that interact > strongly with the interpreter. It is always avail

Re: [Tutor] import values, calculate distance

2014-08-21 Thread Joel Goldstick
On Wed, Aug 20, 2014 at 10:12 PM, LN A-go-go wrote: > Python Mentors, > > I can't get this code to run and at times, I can't even save it. It is > sections of code used from previous exercises, put it together and it just > isn't right. > > Thank-you, > LN > > > The method is as follows: > > Run

Re: [Tutor] sys module - what does "It is always available" mean in the docs?

2014-08-21 Thread Dave Angel
"Flynn, Stephen (L & P - IT)" Wrote in message: > The documentation (https://docs.python.org/3/library/sys.html) for > Python 3.4.1 says that "This module provides access to some variables > used or maintained by the interpreter and to functions that interact > strongly with the interpreter. It i

[Tutor] sys module - what does "It is always available" mean in the docs?

2014-08-21 Thread Flynn, Stephen (L & P - IT)
The documentation (https://docs.python.org/3/library/sys.html) for Python 3.4.1 says that "This module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. It is always available." I interpreted that last sentence as

Re: [Tutor] import values, calculate distance

2014-08-21 Thread Dave Angel
LN A-go-go Wrote in message: > Thanks for a better subject line, and for starting a new thread when you have a substantially new question. . Please use text mail instead of html. The html you're using can cause several different problems. And please do interleaved quoting, not top-posting.

[Tutor] Top posting

2014-08-21 Thread Mark Lawrence
Please note everybody that I'm giving up trying to help out here as I can't cope with the stream of top posted replies. They make long threads such as the recent "Re: Building Starships -- object of type 'int' has no len()" unreadable to me. -- My fellow Pythonistas, ask not what our language

Re: [Tutor] Question

2014-08-21 Thread Dave Angel
Lucia Stockdale Wrote in message: > Hi everyone, Welcome to the list. And thanks for using text mode. What's the Python version and os version. I expect this is crucial. > > I have been writing a program to print words backwards until an an empty line > of input is entered, > but after I put

Re: [Tutor] Question

2014-08-21 Thread Peter Otten
Peter Otten wrote: > I see another problem, the while loop will run at most once, but you > should be able to fix that yourself. Sorry, it will run forever reversing and unreversing the same string... ___ Tutor maillist - Tutor@python.org To unsubs

Re: [Tutor] Question

2014-08-21 Thread Cameron Simpson
On 21Aug2014 13:03, Lucia Stockdale wrote: I have been writing a program to print words backwards until an an empty line of input is entered, but after I put in the input it comes up with TypeError. Hi Lucia, It would be helpful to include the whole traceback that Python shows you. Can you

Re: [Tutor] Question

2014-08-21 Thread Felix Dietrich
Lucia Stockdale writes: > I have been writing a program to print words backwards until an an > empty line of input is entered, but after I put in the input it comes > up with TypeError. For completeness give us the whole Traceback, it makes pin-pointing the error easier. Also, tell us which Ver

Re: [Tutor] Question

2014-08-21 Thread Peter Otten
Lucia Stockdale wrote: > Hi everyone, > > I have been writing a program to print words backwards until an an empty > line of input is entered, but after I put in the input it comes up with > TypeError. In the future please include the traceback (cut and paste, don't rephrase). > This is my goa

[Tutor] import values, calculate distance

2014-08-21 Thread LN A-go-go
Python Mentors, I can't get this code to run and at times, I can't even save it.  It is sections of code used from previous exercises, put it together and it just isn't right.  Thank-you, LN The method is as follows: 1. Run the distance calculations for pt1 to all other points, and pr

[Tutor] Question

2014-08-21 Thread Lucia Stockdale
Hi everyone, I have been writing a program to print words backwards until an an empty line of input is entered, but after I put in the input it comes up with TypeError. This is my goal: Line: hello world olleh dlrow Line: extra artxe Line: i love python i evol nohtyp Line: This is my current c