[Tutor] IDLE problems

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Tutor] IDLE problems

Paul Douglas Grant
Hello folks,
 I am new to programming and choosing python as my first language to
learn, thus excuse the perhaps naiveté of this question and the way it
is formulated. For the last few weeks I've been trying to solve an
issue running python on mac snow leopard 10.6.8. I was running a
version of python that was preinstalled on my computer. At some point
in reading the python website I saw that version 3.2.2 was available
and recommended. After downloading and installing it along with
ActiveTcl 8.5.11. When I opened IDLE to run *hello world* nothing
happened, just a hard return...I tried reinstalling an earlier version
2.7, same problem. Reinstalled 3.2.2, same issue. Not sure how to get
python up and running. Any suggestions will be greatly appreciated.
Thanks so much.
p
_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] IDLE problems

Alan Gauld
On 06/03/12 09:51, Paul Douglas Grant wrote:

> issue running python on mac snow leopard 10.6.8. I was running a
> version of python that was preinstalled on my computer. At some point
> in reading the python website I saw that version 3.2.2 was available
> and recommended. After downloading and installing it along with
> ActiveTcl 8.5.11. When I opened IDLE to run *hello world* nothing
> happened, just a hard return...I tried reinstalling an earlier version
> 2.7, same problem. Reinstalled 3.2.2, same issue.

Sorry, it's not really clear what you mean here.

I'll try asking some questions to clarify things:

Did you uninstall the version that came with MacOS?
(If so that was probably a mistake!)

What happens if you open a terminal and type 'python'?
Do you get to the python >>> prompt?
If so with which version?

Did you have IDLE working in the original install?
(My iBook didn't have IDLE support included, I had to add
  that myself, but I don't know about newer Macs)

You probably didn't need ActiveTcl, the Mac ActivePython
should have had all that you needed. OTOH it shouldn't do
any harm either... Can you run wish in a terminal and
get the Tcl/Tk prompt/window?

How did you try to open IDLE?
(Finder, Terminal, or shortcut?)

What do you mean by a "hard return"?

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

_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] IDLE problems

Alan Gauld
Please use ReplyAll to include the group.

> formulation of the question. Ultimately the brute question is why
> can't I get IDLE to work...
> I did uninstall the version that came with mac.
> In a terminal I get version 2.7.2(?)

OK, That's good because I think that's the same as the default install on SnowLeopard
which means the things that MacOS uses Python for will probably still work...
>
> IDLE was working with the original install.

OK, That's good too.

> I run IDLE simply by opening the IDLE icon in the Python folder.

OK, so from Finder. In that case can you open a Terminal window and 
drag the python folder into the Terminal - that should navigate you to 
the same folder. Then try running IDLE by typing


python ./idle.py


At the terminal prompt.


> I don't believe I have wish, at least not after a spotlight search.


Odd given you installed Tcl/Tk, but not a problem.

>As for hard return, the cursor moves to the next line but not response
>to the *hello world* string.

OK, is this in the IDLE shell?
In other words are you actually getting IDLE to open with a Python 
prompt >> showing? If not where are you typing the command, 
and what *exactly* are you typing.

If you can cut 'n paste into a mail so much the better!

Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] IDLE problems

Alan Gauld
On 06/03/12 18:12, ALAN GAULD wrote:

> OK, so from Finder. In that case can you open a Terminal window and
> drag the python folder into the Terminal - that should navigate you to
> the same folder. Then try running IDLE by typing
>
> python ./idle.py
>
> At the terminal prompt.

I meant to say that this will let you see any error messages
from running IDLE. If you get any, post them here.


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

_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] IDLE problems

Paul Douglas Grant
>> OK, so from Finder. In that case can you open a Terminal window and
>> drag the python folder into the Terminal - that should navigate you to
>> the same folder. Then try running IDLE by typing
>>
>> python ./idle.py
>>
>> At the terminal prompt.
>
>
> I meant to say that this will let you see any error messages
> from running IDLE. If you get any, post them here.
 Here's what I get:

Last login: Wed Mar  7 11:27:19 on ttys000
MacBook-001FF3569577-4:~ fedka2$ /Applications/Python\ 3.2
-bash: /Applications/Python 3.2: is a directory
MacBook-001FF3569577-4:~ fedka2$ python ./idle.py
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python:
can't open file './idle.py': [Errno 2] No such file or directory
MacBook-001FF3569577-4:~ fedka2$

I don't seem to be getting a terminal prompt after dragging the folder
into the shell??
Thanks again
Paul
_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] IDLE problems

Alan Gauld
Sorry, I was assuming too much knowledge I suspect.
 
> Last login: Wed Mar  7 11:27:19 on ttys000

> MacBook-001FF3569577-4:~ fedka2$ /Applications/Python\ 3.2


This line is the prompt plus the folder that you dragged :-   /Applications/Python\ 3.2

You needed to type cd first (no RETURN just cd) - I took that step for granted, sorry.
then drop the folder

But since we now know the folder name you could just type

cd /Applications/Python\ 3.2

That should give you a terminal prompt of:

MacBook-001FF3569577-4: /Applications/Python 3.2$


If that is where idle.py is? I would expect it to be lower down than that...

Then you can type

python ./idle.py

If, as I suspect, idle.py is lower in the folder structure you will need to 
modify things by providing the path to idle.py

I hope that's clearer.
One of the barriers to programming on a Mac for most users is 
that they pretty much have to learn how to drive the Terminal. And 
that's kind of a counter-culture to Mac users.

Alan G
_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: [Tutor] IDLE problems

Paul Douglas Grant
Thanks again, I'm going to push my luck and ask you a final question
on this subject, you've been really helpful. Should I be able to
locate idle.py with a spotlight search. I can't seem to locate it...
Here is what terminal gave me
MacBook-001FF3569577-4:~ fedka2$ cd /Applications/Python\ 3.2
MacBook-001FF3569577-4:Python 3.2 fedka2$ python ./idle.py
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python:
can't open file './idle.py': [Errno 2] No such file or directory
MacBook-001FF3569577-4:Python 3.2 fedka2$

Thanks again, and here's to the hillwalking (I'm in the French Jura,
so it is no stranger to me)
Paul

On Wed, Mar 7, 2012 at 12:30 PM, ALAN GAULD <[hidden email]> wrote:

> Sorry, I was assuming too much knowledge I suspect.
>
>> Last login: Wed Mar  7 11:27:19 on ttys000
>
>> MacBook-001FF3569577-4:~ fedka2$ /Applications/Python\ 3.2
>
>
> This line is the prompt plus the folder that you dragged :-   /Applications/Python\ 3.2
>
> You needed to type cd first (no RETURN just cd) - I took that step for granted, sorry.
> then drop the folder
>
> But since we now know the folder name you could just type
>
> cd /Applications/Python\ 3.2
>
> That should give you a terminal prompt of:
>
> MacBook-001FF3569577-4: /Applications/Python 3.2$
>
>
> If that is where idle.py is? I would expect it to be lower down than that...
>
> Then you can type
>
> python ./idle.py
>
> If, as I suspect, idle.py is lower in the folder structure you will need to
> modify things by providing the path to idle.py
>
> I hope that's clearer.
> One of the barriers to programming on a Mac for most users is
> that they pretty much have to learn how to drive the Terminal. And
> that's kind of a counter-culture to Mac users.
>
> Alan G
_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor