FAQ
I'm a beginning user with some challenges. I have installed and uninstalled
several versions with the same results - I can't get IDLE to work, nor can I
associate .py files with Python.

So I can get the interactive shell interface but nothing else. I'm
currently running ActiveState 2.6.

Any thoughts on where to begin are appreciated.

Thanks!

Grant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101016/3a298945/attachment-0001.html>

Search Discussions

  • Dave Angel at Oct 17, 2010 at 12:30 am

    On 2:59 PM, Grant Andrew wrote:
    I'm a beginning user with some challenges. I have installed and uninstalled
    several versions with the same results - I can't get IDLE to work, nor can I
    associate .py files with Python.

    So I can get the interactive shell interface but nothing else. I'm
    currently running ActiveState 2.6.

    Any thoughts on where to begin are appreciated.

    Thanks!

    Grant
    You could start by writing a more complete question. Exactly what have
    you tried, and in what way does it "not work" ? Show what you typed at
    the command prompt, and just what error messages you got. Use copy &
    paste, don't retype it.

    With the ActiveState default install, you shouldn't need to create your
    own association; it should already be done by the installation.
    However, if you install multiple versions, and don't properly uninstall,
    it might change the default.

    Have you tried running python.exe explicitly?

    DaveA
  • Grant Andrew at Oct 17, 2010 at 3:27 am
    I hear that...God knows if I had a more complete question, I'd type it -
    basically, when I click the IDLE GUI icon from the Start Menu, there is a
    flash of a command prompt loading, then nothing happens.

    I've tried a number of things at the command prompt over the last two weeks
    and five versions. I went to ActiveState because I was thinking I had not
    configured something properly in the Python.org versions, however, the
    behavior is the same.

    I ran C:\>C:\python26\lib\idlelib\idle.py at the command prompt and that
    returned:

    C:\>C:\python26\lib\idlelib\idle.py
    Traceback (most recent call last):
    File "C:\python26\lib\idlelib\idle.py", line 21, in <module>
    idlelib.PyShell.main()
    File "C:\Python26\lib\idlelib\PyShell.py", line 1386, in main
    root = Tk(className="Idle")
    File "C:\Python26\lib\lib-tk\Tkinter.py", line 1643, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive,
    want
    objects, useTk, sync, use)
    _tkinter.TclError: Can't find a usable init.tcl in the following
    directories:
    {C:\IBMTOOLS\Python22\tcl\tcl8.4} C:/IBMTOOLS/Python22/tcl/tcl8.5
    C:/Python2
    6/lib/tcl8.5 C:/lib/tcl8.5 C:/lib/tcl8.5 C:/library C:/library
    C:/tcl8.5.8/libra
    ry C:/tcl8.5.8/library

    C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl: version conflict for package
    "Tcl": ha
    ve 8.5.8, need exactly 8.4
    version conflict for package "Tcl": have 8.5.8, need exactly 8.4
    while executing
    "package require -exact Tcl 8.4"
    (file "C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl" line 19)
    invoked from within
    "source C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl"
    ("uplevel" body line 1)
    invoked from within
    "uplevel #0 [list source $tclfile]"


    This probably means that Tcl wasn't installed properly.


    I hope this helps. Thanks again for any help.

    Grant




    On Sat, Oct 16, 2010 at 6:30 PM, Dave Angel wrote:
    On 2:59 PM, Grant Andrew wrote:

    I'm a beginning user with some challenges. I have installed and
    uninstalled
    several versions with the same results - I can't get IDLE to work, nor can
    I
    associate .py files with Python.

    So I can get the interactive shell interface but nothing else. I'm
    currently running ActiveState 2.6.

    Any thoughts on where to begin are appreciated.

    Thanks!

    Grant

    You could start by writing a more complete question. Exactly what have
    you tried, and in what way does it "not work" ? Show what you typed at the
    command prompt, and just what error messages you got. Use copy & paste,
    don't retype it.

    With the ActiveState default install, you shouldn't need to create your own
    association; it should already be done by the installation. However, if
    you install multiple versions, and don't properly uninstall, it might change
    the default.

    Have you tried running python.exe explicitly?

    DaveA
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20101016/707d4afc/attachment-0001.html>
  • Dave Angel at Oct 17, 2010 at 10:17 am

    On 10/16/2010 11:27 PM, Grant Andrew wrote:
    I hear that...God knows if I had a more complete question, I'd type it -
    basically, when I click the IDLE GUI icon from the Start Menu, there is a
    flash of a command prompt loading, then nothing happens.

    I've tried a number of things at the command prompt over the last two weeks
    and five versions. I went to ActiveState because I was thinking I had not
    configured something properly in the Python.org versions, however, the
    behavior is the same.

    I ran C:\>C:\python26\lib\idlelib\idle.py at the command prompt and that
    returned:

    <snip>
    You probably need to start with fundamentals. That means using a
    command prompt. As you've noticed, many times a program started from
    the start menu doesn't leave its command window open long enough to read
    the messages.

    I'm afraid I can't really help with Idle; I've never tried using it,
    till today. When I start if from ActiveState's menu, it flashes and
    exits for me as well. Perhaps because we both have Thinkpads. I notice
    the IBMTools directory in your traceback. Perhaps there's an old
    version of TCL there that's interfering with the one Idle needs. To
    start debugging it, figure out what the menu shortcut is doing, and do
    it yourself from a command window. In my case,
    StartIdle-right-click->properties->shortcut shows me:

    Target C:\Progfiles\ActivePython26\Lib\idlelib\idle.bat
    Start in: c:\progfiles\activePython26

    So you CD to the latter directory (or rather, to your equivalent one),
    and type lib\idlelib\idle.bat

    When I do that, I get an error message: "IDLE's subprocess didn't make
    connection. Either IDLE can't start a subprocess or personal firewall
    software is blocking."

    But let's get your python itself working. ActivePython's install adds
    itself to your path, so you should be able to just type
    python
    or python26

    at the C: prompt, and get a Python interpreter prompt. Then do
    something like
    print 3*4
    to see if it's working.

    Next, write a small xxx.py program, in your code directory, and NOT in
    the Python install directory. From that code directory, type
    python xxx.py

    or whatever you called it. Let us know if it works.

    Only then should you worry about associations. You can check them with
    assoc and ftype, but people tell me that's not reliable if there is more
    than one user on the machine, or specifically if you have created
    user-specific associations, which take precedence over the ones in assoc
    and ftype.

    DaveA
  • Grant Andrew at Oct 19, 2010 at 7:06 pm
    1. Okay, I can open the interpreter and do math. If only I needed the
    answer to 6*7 I'd be great. But, to your point, Python is installed and
    working.

    2. When I went to the shortcut and hit properties, the path was

    Target: C:\Python26\Lib\idlelib\idle.bat
    Start in: C:\Python26\

    I cd'd to C:\Python26\ at the command prompt and ran Lib\idlelib\idle.bat.

    It just reprints C:\Python26\ with no error or message. Looks like this:

    C:\Python26>Lib\idlelib\idle.bat
    C:\Python26>

    3. I created a simple file in Wordpad that prints a few lines. It is
    called Print.py but I'm not sure where the 'code' folder is. I'm not
    familiar enough with Python to locate a file from the Interpreter and open
    it.

    4. I also tried editing the PATH variable, which did have both versions in
    it, but with no success - same error.


    Thanks for your help...

    Grant

    On Sun, Oct 17, 2010 at 4:17 AM, Dave Angel wrote:
    On 10/16/2010 11:27 PM, Grant Andrew wrote:

    I hear that...God knows if I had a more complete question, I'd type it -
    basically, when I click the IDLE GUI icon from the Start Menu, there is a
    flash of a command prompt loading, then nothing happens.

    I've tried a number of things at the command prompt over the last two
    weeks
    and five versions. I went to ActiveState because I was thinking I had not
    configured something properly in the Python.org versions, however, the
    behavior is the same.

    I ran C:\>C:\python26\lib\idlelib\idle.py at the command prompt and that
    returned:

    <snip>
    You probably need to start with fundamentals. That means using a command
    prompt. As you've noticed, many times a program started from the start menu
    doesn't leave its command window open long enough to read the messages.

    I'm afraid I can't really help with Idle; I've never tried using it, till
    today. When I start if from ActiveState's menu, it flashes and exits for me
    as well. Perhaps because we both have Thinkpads. I notice the IBMTools
    directory in your traceback. Perhaps there's an old version of TCL there
    that's interfering with the one Idle needs. To start debugging it, figure
    out what the menu shortcut is doing, and do it yourself from a command
    window. In my case, StartIdle-right-click->properties->shortcut shows me:

    Target C:\Progfiles\ActivePython26\Lib\idlelib\idle.bat
    Start in: c:\progfiles\activePython26

    So you CD to the latter directory (or rather, to your equivalent one), and
    type lib\idlelib\idle.bat

    When I do that, I get an error message: "IDLE's subprocess didn't make
    connection. Either IDLE can't start a subprocess or personal firewall
    software is blocking."

    But let's get your python itself working. ActivePython's install adds
    itself to your path, so you should be able to just type
    python
    or python26

    at the C: prompt, and get a Python interpreter prompt. Then do something
    like
    print 3*4
    to see if it's working.

    Next, write a small xxx.py program, in your code directory, and NOT in the
    Python install directory. From that code directory, type
    python xxx.py

    or whatever you called it. Let us know if it works.

    Only then should you worry about associations. You can check them with
    assoc and ftype, but people tell me that's not reliable if there is more
    than one user on the machine, or specifically if you have created
    user-specific associations, which take precedence over the ones in assoc and
    ftype.

    DaveA

    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20101019/9bb8298d/attachment-0001.html>
  • Sridhar Ratnakumar at Oct 19, 2010 at 8:09 pm
    Hi Grant,

    Typing the following opens IDLE (albeit after a short delay; the command will immediately return regardless) for me:

    C:\> C:\Python26\lib\idlelib\idle.bat

    IDLE is also installed in the Start Menu for ActivePython.

    You need at least ActivePython 2.6.6.15 or 2.7.0.2 for this to work.

    -srid
    On 2010-10-19, at 12:06 PM, Grant Andrew wrote:

    1. Okay, I can open the interpreter and do math. If only I needed the answer to 6*7 I'd be great. But, to your point, Python is installed and working.

    2. When I went to the shortcut and hit properties, the path was

    Target: C:\Python26\Lib\idlelib\idle.bat
    Start in: C:\Python26\

    I cd'd to C:\Python26\ at the command prompt and ran Lib\idlelib\idle.bat.

    It just reprints C:\Python26\ with no error or message. Looks like this:

    C:\Python26>Lib\idlelib\idle.bat
    C:\Python26>

    3. I created a simple file in Wordpad that prints a few lines. It is called Print.py but I'm not sure where the 'code' folder is. I'm not familiar enough with Python to locate a file from the Interpreter and open it.

    4. I also tried editing the PATH variable, which did have both versions in it, but with no success - same error.


    Thanks for your help...

    Grant


    On Sun, Oct 17, 2010 at 4:17 AM, Dave Angel wrote:
    On 10/16/2010 11:27 PM, Grant Andrew wrote:
    I hear that...God knows if I had a more complete question, I'd type it -
    basically, when I click the IDLE GUI icon from the Start Menu, there is a
    flash of a command prompt loading, then nothing happens.

    I've tried a number of things at the command prompt over the last two weeks
    and five versions. I went to ActiveState because I was thinking I had not
    configured something properly in the Python.org versions, however, the
    behavior is the same.

    I ran C:\>C:\python26\lib\idlelib\idle.py at the command prompt and that
    returned:

    <snip>

    You probably need to start with fundamentals. That means using a command prompt. As you've noticed, many times a program started from the start menu doesn't leave its command window open long enough to read the messages.

    I'm afraid I can't really help with Idle; I've never tried using it, till today. When I start if from ActiveState's menu, it flashes and exits for me as well. Perhaps because we both have Thinkpads. I notice the IBMTools directory in your traceback. Perhaps there's an old version of TCL there that's interfering with the one Idle needs. To start debugging it, figure out what the menu shortcut is doing, and do it yourself from a command window. In my case, StartIdle-right-click->properties->shortcut shows me:

    Target C:\Progfiles\ActivePython26\Lib\idlelib\idle.bat
    Start in: c:\progfiles\activePython26

    So you CD to the latter directory (or rather, to your equivalent one), and type lib\idlelib\idle.bat

    When I do that, I get an error message: "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking."

    But let's get your python itself working. ActivePython's install adds itself to your path, so you should be able to just type
    python
    or python26

    at the C: prompt, and get a Python interpreter prompt. Then do something like
    print 3*4
    to see if it's working.

    Next, write a small xxx.py program, in your code directory, and NOT in the Python install directory. From that code directory, type
    python xxx.py

    or whatever you called it. Let us know if it works.

    Only then should you worry about associations. You can check them with assoc and ftype, but people tell me that's not reliable if there is more than one user on the machine, or specifically if you have created user-specific associations, which take precedence over the ones in assoc and ftype.

    DaveA



    --
    http://mail.python.org/mailman/listinfo/python-list
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20101019/9c76b883/attachment-0001.html>
  • Dave Angel at Oct 19, 2010 at 10:33 pm

    On 10/19/2010 3:06 PM, Grant Andrew wrote:
    1. Okay, I can open the interpreter and do math. If only I needed the
    answer to 6*7 I'd be great. But, to your point, Python is installed and
    working.

    2. When I went to the shortcut and hit properties, the path was

    Target: C:\Python26\Lib\idlelib\idle.bat
    Start in: C:\Python26\

    I cd'd to C:\Python26\ at the command prompt and ran Lib\idlelib\idle.bat.

    It just reprints C:\Python26\ with no error or message. Looks like this:

    C:\Python26>Lib\idlelib\idle.bat
    C:\Python26>

    3. I created a simple file in Wordpad that prints a few lines. It is
    called Print.py but I'm not sure where the 'code' folder is. I'm not
    familiar enough with Python to locate a file from the Interpreter and open
    it.

    4. I also tried editing the PATH variable, which did have both versions in
    it, but with no success - same error.


    Thanks for your help...

    Grant

    <snip
    (You top-posted, so I'm removing all the stuff that's now out of order)

    Your PATH should never have two versions of the same program system in
    it. So if two different installs are in your system PATH, you should
    (using the control panel) remove the one you're not using. Remember
    that existing programs aren't affected by changes in the system PATH.

    The code directory is wherever you write your .py file(s). The point is
    it should not be in the middle of the installation directory, but
    somewhere else you chose.

    I use
    m:\programming\python\sources

    and then make a subdirectory under there. Only when a script is working
    reliably do I copy it to a place on my PATH, like m:\t\bin Once I do,
    it's as accessible as any other executable on the PATH.

    Wordpad creates rtf files by default, which are useless to the python
    interpreter. You want a text file. You can do it with the SaveAs
    dialog, by changing the "Save as type" from "Rich Text Format" to "Text
    Document".

    However, it'd be easier to just use a text editor, such as Notepad. Or
    one of dozens of other text editors, most free, that you can install.

    Anyway, once you've got a text file called print.py, in the
    c:\sourceCode directory, try the following:

    c:\someOtherPlace> cd \sourceCode
    c:\sourceCode> python print.py

    and see if it loads and runs correctly.

    If that works, then you can try typing:

    c:\sourceCode> print.py

    and if that works, you can try:

    c:\sourceCode> print

    Note that there's already a print.exe program in Windows, in the
    system32 directory, so this might not be a good name for this particular
    test.

    If this all works, and Idle doesn't, someone else will have to help.

    DaveA
  • Lawrence D'Oliveiro at Oct 18, 2010 at 11:13 pm
    In message <mailman.1791.1287310653.29448.python-list at python.org>, Dave
    Angel wrote:
    As you've noticed, many times a program started from the start menu
    doesn't leave its command window open long enough to read the messages.
    Windows needs an equivalent to ~/.xsession-errors.
  • Grant Andrew at Oct 19, 2010 at 10:23 pm
    Success - I worked with a friend who is Python-fluent to diagnose this issue
    and it turns out that in addition to the PATH variable, there were TCL and
    TK variables that were pointing toward an old install of Python.

    With these references pointed toward the correct folders in the current
    install, all is well.

    Now I can get to the work of learning Python, instead of bleeding through
    the eyes.

    Thanks for all of the help!!

    Grant


    On Sun, Oct 17, 2010 at 12:12 PM, Dennis Lee Bieber
    wrote:
    On Sat, 16 Oct 2010 21:27:11 -0600, Grant Andrew <gveggie at gmail.com>
    declaimed the following in gmane.comp.python.general:
    I ran C:\>C:\python26\lib\idlelib\idle.py at the command prompt and that
    returned: <snip>
    {C:\IBMTOOLS\Python22\tcl\tcl8.4} C:/IBMTOOLS/Python22/tcl/tcl8.5
    C:/Python2
    6/lib/tcl8.5 C:/lib/tcl8.5 C:/lib/tcl8.5 C:/library C:/library
    C:/tcl8.5.8/libra
    ry C:/tcl8.5.8/library
    And there is your answer... Your system apparently came with Python
    2.2 installed by IBM and IT is on the search path AHEAD of the Python2.6
    stuff.

    You probably need to edit the PATH environment variable for user
    account to not reference the factory installed Python/tcl

    Since my system didn't have a factory Python, I was able to put my
    install on the system PATH rather than the user PATH. (Hmm, I need to
    edit the system PATH -- regina is no longer on C:, and I seem to have
    duplicates of Roxio paths; only the last two items are my user account
    path)

    PATH=e:\Python25\; E:\GNAT\2008\bin; C:\WINDOWS\system32; C:\WINDOWS;
    C:\WINDOWS\System32\Wbem; C:\Program Files\SciTE; C:\Program
    Files\Java\jre1.6.0_03\bin ;C:\Program Files\Java\jdk1.6.0_03\bin;
    C:\Program Files\Common Files\Adobe\AGL; C:\Tcl\bin; C:\Program
    Files\Common Files\Roxio Shared\9.0\DLLShared\; C:\Program Files\Common
    Files\Roxio Shared\DLLShared\; c:\Regina; C:\Program
    Files\TortoiseSVN\bin; C:\PROGRA~1\MySQL\MySQL Server 5.0\bin;
    E:\GNAT\GtkAda\bin;C:\MSSQL7\BINN;c:\PROGRA~1
    \sdb\programs\bin; c:\PROGRA~1\sdb\programs\pgm; e:\python25\scripts;
    C:\WINDOWS\system32\WindowsPowerShell\v1.0; C:\Program Files\Common
    Files\Roxio Shared\DLLShared\; C:\Program Files\Common Files\Roxio
    Shared\9.0\DLLShared\; C:\Program Files\QuickTime\QTSystem\;
    C:\WINDOWS\system32\WindowsPowerShell\v1.0; c:\bin; e:\regina
    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed at ix.netcom.com HTTP://wlfraed.home.netcom.com/

    --
    http://mail.python.org/mailman/listinfo/python-list
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20101019/6198289e/attachment.html>

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedOct 16, '10 at 11:55p
activeOct 19, '10 at 10:33p
posts9
users4
websitepython.org

People

Translate

site design / logo © 2022 Grokbase