Re: [Tutor] More Help

2013-02-03 Thread Steven D'Aprano

On 04/02/13 06:15, Jack Little wrote:

So I have gotten responses to my previous email sent 3 days ago, all saying
define path1pt1() before simpstart, but I do not know how. Help?



You have something like this:


...code...
...more code...
path1pt1()
...
...

def path1pt1():
definition goes here



Select the text starting with "def path1pt1" in your text editor, and ending
with the end of the function. Then cut the text (Ctrl-X), move the cursor to
the top of the file, and paste it (Ctrl-V). Clean up any extra blank lines
needed. Your code should then look like this:


def path1pt1():
definition goes here

...code...
...more code...
path1pt1()
...
...




--
Steven
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] More Help

2013-02-03 Thread Joel Goldstick
On Sun, Feb 3, 2013 at 2:29 PM, Joel Goldstick wrote:

> Move the code that defines path1pt1 above the function that calls it.
>
> Also, don't start of new thread -- you are making it impossible for
> someone to know the context of your question.  Also, Use a better subject
> line
>
>
> On Sun, Feb 3, 2013 at 2:15 PM, Jack Little wrote:
>
>> So I have gotten responses to my previous email sent 3 days ago, all
>> saying define path1pt1() before simpstart, but I do not know how. Help?
>>
>> ___
>> Tutor maillist  -  Tutor@python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
I was curious about this post, and so I looked back through your previous
posts.  They all seem to be about getting this game code to work.  I'm
guessing that you copied it from somewhere -- or mostly copied it.  You
don't seem to have a grasp of basic concepts of programming in python.
This seems to be a good example of cargo cult programming
http://en.wikipedia.org/wiki/Cargo_cult_programming I suggest you set aside
this project and go to the python online tutorial, or use Alan's book
http://www.alan-g.me.uk/ , or google for Leaning Python the hard way, and
get some basic concepts together in your mind.

Also, set your mail client to text -- not rich text or html.  Since
indentation in python is essential to the meaning of the code, using rich
text which often mangles indentation makes your examples impossible to
decipher.

When you've done that you will be able to ask question here that will help
you learn more and raise your skill level.


>
>
> --
> Joel Goldstick
> http://joelgoldstick.com
>



-- 
Joel Goldstick
http://joelgoldstick.com
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] More Help

2013-02-03 Thread Joel Goldstick
Move the code that defines path1pt1 above the function that calls it.

Also, don't start of new thread -- you are making it impossible for someone
to know the context of your question.  Also, Use a better subject line


On Sun, Feb 3, 2013 at 2:15 PM, Jack Little  wrote:

> So I have gotten responses to my previous email sent 3 days ago, all
> saying define path1pt1() before simpstart, but I do not know how. Help?
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
Joel Goldstick
http://joelgoldstick.com
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] More Help

2013-02-03 Thread Jack Little
So I have gotten responses to my previous email sent 3 days ago, all saying 
define path1pt1() before simpstart, but I do not know how. Help?___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] More help

2012-10-13 Thread Alan Gauld

On 13/10/12 05:57, Brett Dailey wrote:

Here's another project I'm working on.


It's generally easier to stick to one problem at a time.
Otherwise we all get confused!

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] More help

2012-10-13 Thread Mark Lawrence

On 13/10/2012 05:57, Brett Dailey wrote:

Here's another project I'm working on.

1. Create a random "signal" (600 random numbers in the range -50 to +50). 
Display it as shown below.
2. Create a filter variable (integer) which is allowed to go from 0 to 
infinity. Allow the user to change this
with the up/down arrow keys. The user should have to release the key and press 
it again to go up /
down one level.
3. Apply a "box filter" to the original signal.
  If filter is 0, the signal should be the same as the original
  If filter is 1, you should, for each signal element i (of the new 
signal), average the i-1, i, and i+1
  elements of the original signal.
  If filter is 2, you should, for each signal element i (of the new 
signal), average the i-2, i-1, i, i+1,
  and i+2 elements of the original signal iv. ...
  Note: if the i-? or i+? element is "out of bounds", don't include it. 
For example, if filter is 1, and you are calculating the 0th   element of 
the new signal, you should only average the 0th and 1th element of the original signal.

Thank you ahead of time!



I'm reminded of the film Coogan's Bluff.  I have the Lee J Cobb role, 
you're Clint Eastwood.


--
Cheers.

Mark Lawrence.

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] More help

2012-10-12 Thread Brett Dailey
Here's another project I'm working on.

1. Create a random "signal" (600 random numbers in the range -50 to +50). 
Display it as shown below. 
2. Create a filter variable (integer) which is allowed to go from 0 to 
infinity. Allow the user to change this
with the up/down arrow keys. The user should have to release the key and press 
it again to go up /
down one level. 
3. Apply a "box filter" to the original signal.
 If filter is 0, the signal should be the same as the original 
 If filter is 1, you should, for each signal element i (of the new 
signal), average the i-1, i, and i+1
 elements of the original signal. 
 If filter is 2, you should, for each signal element i (of the new 
signal), average the i-2, i-1, i, i+1,
 and i+2 elements of the original signal iv. ...
 Note: if the i-? or i+? element is "out of bounds", don't include it. 
For example, if filter is 1, and you are calculating the 0th   
element of the new signal, you should only average the 0th and 1th element of 
the original signal.

Thank you ahead of time!___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] more help with vitualenv

2012-04-27 Thread Steven D'Aprano

Ivor Surveyor wrote:


As suggested I visited the site virtualenv.  However I could not find 
the files for download and to install on my machine.

Could I please ask for further guidance on how to proceed?


Which site did you go to? "virtualenv" is not a site, it is a name. Precision 
of language is your friend -- when asking for help, please be precise and 
accurate in your descriptions.


When I google for "virtualenv", the very first link that comes up is this:

http://pypi.python.org/pypi/virtualenv

Is that the site you went to? If not, which site did you go to?

On that site, there is a link "Downloads" almost at the top of the page, 
immediately under the title:


virtualenv 1.7.1.2
Virtual Python Environment builder
Downloads


Clicking on the Downloads link takes you directly to the download area, where 
you can download a source tarball (.tar.gz file).



Or if you prefer, there are other instructions for installing it. Do you have 
pip installed on your computer? If so, you can run


pip install virtualenv

from the command line (NOT the Python interactive interpreter) to 
automatically install virtualenv.


Or if all else fails, the site above links directly to a single Python file 
which you can save to your hard drive.




--
Steven

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] more help with vitualenv

2012-04-27 Thread Russell Smith
http://pypi.python.org/pypi/virtualenv/1.7.1.2

Read the page at the link above. You will find it.

On Friday, April 27, 2012, Ivor Surveyor wrote:

>
> As suggested I visited the site virtualenv.  However I could not find the
> files for download and to install on my machine.
> Could I please ask for further guidance on how to proceed?
>
> Ivor Surveyor
> isurve...@vianet.net.au
> __**_
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] more help with vitualenv

2012-04-27 Thread Ivor Surveyor


As suggested I visited the site virtualenv.  However I could not find 
the files for download and to install on my machine.

Could I please ask for further guidance on how to proceed?

Ivor Surveyor
isurve...@vianet.net.au 


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor