how do you reset the turtle's position without drawing a line from where it
last was?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Grace Sanford wrote:
> how do you reset the turtle's position without drawing a line from where
> it last was?
Call turtle.penup() when you want to prevent it from drawing and pendown()
to have it draw again. Example:
import turtle
for i in range(10):
# draw a 20 units line
turtle.forw
On 17/05/17 03:49, boB Stepp wrote:
> corresponding to one of his functions or methods, if he could use that
> word to run a function of the same name. I said I had done something
> once where I used the word as a dictionary key, which was then used to
> call the function.
That's the usual appr
I need suggestions/help for writing the following function:
import turtle
import time
import random
# This list represents the board. It's a list
# of nine strings, each of which is either
# "X", "O", "_", representing, respectively,
# a position occupied by an X, by an O, and
# an unoccupied pos
I am wondering if someone can help/advise me on finishing the code for this
function:
import turtle
import time
import random
# This list represents the board. It's a list
# of nine strings, each of which is either
# "X", "O", "_", representing, respectively,
# a position occupied by an X, by an
*Hi, *
*I have been working on a graphic user interface with matplotlib and
suddenly(Earlier, I didnt get these errors, and when I opened the files
now, I am) getting these errors: *
*/Users/poojabhalode/.bash_profile: line 1: .bashrc: No such file or
directory*
*[[ 2 -1 0]*
* [-1 2 -1]*
* [ 0 -
On 17/05/17 14:31, Grace Sanford wrote:
> I am wondering if someone can help/advise me on finishing the code for this
> function:
Please only send one email for a given i8ssue it gets confusing
when people start responding to two different threads about
the same question.
Also please give us more
Grace Sanford wrote:
> I am wondering if someone can help/advise me on finishing the code for
> this function:
>
> import turtle
> import time
> import random
>
> # This list represents the board. It's a list
> # of nine strings, each of which is either
> # "X", "O", "_", representing, respectiv
On 17/05/17 15:07, Pooja Bhalode wrote:
> */Users/poojabhalode/.bash_profile: line 1: .bashrc: No such file or
> directory*
I'd start with this one.
Where is the bash script error coming from?
Is there really no .bashrc?
If not what is the impact of not having it?
I'm also not clear what is call
Theoretically, the following code is suppose to check if the user has won a
tic tac toe game by checking if there are all "X"s in either the
horizontal, vertical, or diagonal lines of a grid (represented by a list
with "board" with elements 0-8). If one of these is the case, it is
suppose to print
Hi Alan,
Yes, that was the issue, I had a tempfile.py created my me some time back.
That was interfering with this one.
Thanks a lot for your input.
Hope you have a great day!
Pooja
On Wed, May 17, 2017 at 11:27 AM, Alan Gauld via Tutor
wrote:
> On 17/05/17 15:07, Pooja Bhalode wrote:
>
> > */
Hi all,
How do I move files to a designated folder or copy/paste?
thanks!
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Hi,
I hope you could help. I am new to the Python community. I am looking
for your recommendation for a Windows 10 (64 bit) Python 3.6
distribution package that covers all the necessary installtions/files.
Thanks,
Keith
___
Tutor maillist - Tutor@
in fact, when I ran this:
import os
os.system("mspaint 1.bmp")
It also opened a cmd.exe window and the script wouldn't continue until I
closed the cmd window!
On Wed, May 17, 2017 at 1:24 PM, Michael C
wrote:
> from PIL import Image
>
>
> im = Image.open('pic.bmp')
> im.show()
>
>
> I ran thi
I'm beginning to think that I don't know how to ask the question as
Google and Stack Overflow have resulted in nothing. All of the results
seem to deal with integers.
I have a number of single column floating point arrays each containing
300 entries that I want to combine into a n by 300 arra
from PIL import Image
im = Image.open('pic.bmp')
im.show()
I ran this code and it not only opened the picture in paint, which is what
I want,
but it also opens a CMD.exe console window! how do I prevent that from
happening?
thanks!
___
Tutor maillist
Hi all,
How do I display a picture?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Wed, May 17, 2017 at 8:24 PM, Michael C
wrote:
> from PIL import Image
>
> im = Image.open('pic.bmp')
> im.show()
>
> I ran this code and it not only opened the picture in paint, which is what
> I want, but it also opens a CMD.exe console window! how do I prevent that from
> happening?
You're
Actually, that is the whole script! I didn't get used to have the cmd.exe
window pop up at all, could it be something I did?
Or, is there a way to suppress that from showing up?
thanks!
On Wed, May 17, 2017 at 3:30 PM, eryk sun wrote:
> On Wed, May 17, 2017 at 8:24 PM, Michael C
> wrote:
> >
On 17/05/17 17:26, Grace Sanford wrote:
> with "board" with elements 0-8). If one of these is the case, it is
> suppose to print the "You won" string. Nevertheless, when I change list
> variable to reflect one of these conditions, there is no printing
> occurring. I cannot figure out why.
You
On 17/05/17 19:17, keith quach wrote:
> I hope you could help. I am new to the Python community. I am looking
> for your recommendation for a Windows 10 (64 bit) Python 3.6
> distribution package that covers all the necessary installtions/files.
It depends on what you want to do. There is no si
On 17/05/17 20:09, Michael C wrote:
> How do I move files to a designated folder or copy/paste?
copy/paste is a UI specific thing, you don't do that in Python code.
What you do is either copy a file or move it.
The shutil module provides easy functions for both.
See the documentation for the mo
On 17/05/17 21:33, Michael C wrote:
> How do I display a picture?
What do you mean? What kind of picture?
Where do you want it displayed (what kind
of window/screen)?
There are a dozen possible ways to "display a picture"
depending on what you specifically want.
--
Alan G
Author of the Learn t
On 2017-05-17 12:09, Michael C wrote:
Hi all,
How do I move files to a designated folder or copy/paste?
The first hit when I googled "how to move a file using python" was
http://stackoverflow.com/questions/8858008/how-to-move-a-file-in-python
which in turn suggests the use of:
os.rename() or
Please always use reply all, or reply list when responding to list
messages. I think eryksun may have already answered your question, if not
give more info about how you run your code.
Original Message
Subject: Re: [Tutor] How do I display a picture?
From: Micha
Please use Reply-All or Reply-List when replying to the list,
otherwise it only goes to me.
On 17/05/17 17:21, Grace Sanford wrote:
> Syntactically speaking, how can I check if an element in the list
> "board" at position p equals "_" and then change that element to "0"?
You can use the == operat
Ok!
On Wed, May 17, 2017 at 4:11 PM, Alan Gauld via Tutor
wrote:
> On 17/05/17 20:09, Michael C wrote:
>
> > How do I move files to a designated folder or copy/paste?
>
> copy/paste is a UI specific thing, you don't do that in Python code.
> What you do is either copy a file or move it.
>
> The
I use python image library and apparently when I do
im = Image.open('1.png')
im.show()
show() actually opens a empty console window that doesn't do anything and
as long as it's around the script hangs.
Currently I have to close it by clicking on the close button and it makes
my script useless.
On 18/05/17 00:38, Alan G via Tutor wrote:
>Please always use reply all, or reply list when responding to list
Oops, it seems like you did that already, my apologies.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my
On 18/05/17 00:24, Michael C wrote:
> or to find another way to display the picture without using python image
> library.
There are lots of ways it depends on what you actually want
to do with the image. For example you can run your favourite
image viewer program(that looks like what PIL is doin
On 17/05/17 20:50, Stephen P. Molnar wrote:
> I'm beginning to think that I don't know how to ask the question as
> Google and Stack Overflow have resulted in nothing. All of the results
> seem to deal with integers.
Have you tried asking on the scipy forum?
https://www.scipy.org/scipylib/mail
On 17May2017 12:26, Grace Sanford wrote:
Theoretically, the following code is suppose to check if the user has won a
tic tac toe game by checking if there are all "X"s in either the
horizontal, vertical, or diagonal lines of a grid (represented by a list
with "board" with elements 0-8). If one
On Wed, May 17, 2017 at 10:33 PM, Michael C
wrote:
> On Wed, May 17, 2017 at 3:30 PM, eryk sun wrote:
>
>> You're probably running a .py script that's associated with py.exe or
>> python.exe. These executables create a new console (i.e. an instance
>> of the console host process, conhost.exe), if
On Thu, May 18, 2017 at 1:58 AM, Michael C
wrote:
> when I run this, while it's called test.pyw, this pops up
>
> from PIL import Image
>
> im = Image.open('1.bmp')
> im.show()
Ok, I stand corrected. It's something weird, and most likely due to
Windows support here being an afterthought throw in
On Wed, May 17, 2017 at 1:42 AM, Peter Otten <__pete...@web.de> wrote:
> boB Stepp wrote:
>> Oh, and I suppose I should ask for a critique of the code as written
>> for appropriate Python style, proper targeted function use, etc. I am
>> always eager to learn!
>
>> if function in valid_fcns:
35 matches
Mail list logo