dos box appears when clicking .pyc

Discussion in 'Python' started by Philippe C. Martin, Feb 11, 2005.

  1. Hi,


    For a few months now, I have been used .pyc script under XP without
    getting the "DOS" box.

    I just re-installed the scripts on another XP box and am now getting the
    DOS box !

    Something to do with the registry ?

    Regards,

    Philippe





    --
    ***************************
    Philippe C. Martin
    SnakeCard LLC
    www.snakecard.com
    ***************************
    Philippe C. Martin, Feb 11, 2005
    #1
    1. Advertising

  2. Philippe C. Martin

    Larry Bates Guest

    Change the association for .pyc files to pythonw.exe
    from python.exe.

    Larry Bates


    Philippe C. Martin wrote:
    > Hi,
    >
    >
    > For a few months now, I have been used .pyc script under XP without
    > getting the "DOS" box.
    >
    > I just re-installed the scripts on another XP box and am now getting the
    > DOS box !
    >
    > Something to do with the registry ?
    >
    > Regards,
    >
    > Philippe
    >
    >
    >
    >
    >
    Larry Bates, Feb 11, 2005
    #2
    1. Advertising

  3. Philippe C. Martin

    Peter Hansen Guest

    Larry Bates wrote:
    > Change the association for .pyc files to pythonw.exe
    > from python.exe.


    This might help further (taken from a properly configured
    machine):

    c:\>assoc .pyc
    ..pyc=Python.CompiledFile

    c:\>ftype Python.CompiledFile
    Python.CompiledFile="C:\a\python24\python.exe" "%1" %*

    c:\>assoc .pyw
    ..pyw=Python.NoConFile

    c:\>ftype Python.NoConFile
    Python.NoConFile="C:\a\python24\pythonw.exe" "%1" %*


    Note "pythonw" for ".pyw" files, and just "python" for
    ".pyc" files. If you want .pyc files NOT to open up
    the DOS box, you need to change the association to
    what the .pyw files use, which is not the default and
    possibly will not always do what you want.

    -Peter
    Peter Hansen, Feb 12, 2005
    #3
  4. Philippe C. Martin

    Tim Roberts Guest

    "Philippe C. Martin" <> wrote:
    >
    >For a few months now, I have been used .pyc script under XP without
    >getting the "DOS" box.


    You don't usually click on .pyc scripts. You click on .py and .pyw
    scripts. .pyw files will not bring up a DOS box.

    If you really want .pyc files to run without a DOS box, bring up a command
    shell and type

    assoc .pyc=Python.NoConFile

    (Actually, you should type "assoc .pyw" to make sure that is its file
    type.)
    --
    - Tim Roberts,
    Providenza & Boekelheide, Inc.
    Tim Roberts, Feb 13, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kate
    Replies:
    2
    Views:
    304
    Oliver Wong
    Apr 26, 2006
  2. Ben Fairbank
    Replies:
    2
    Views:
    5,405
  3. john san
    Replies:
    19
    Views:
    730
    Diez B. Roggisch
    Feb 18, 2005
  4. tomhr
    Replies:
    27
    Views:
    1,402
    Mike Wahler
    Jan 12, 2006
  5. Muddy Coder

    Hide DOS console for .pyc file

    Muddy Coder, Sep 11, 2010, in forum: Python
    Replies:
    6
    Views:
    884
    Jonathan Hartley
    Sep 13, 2010
Loading...

Share This Page