dos box appears when clicking .pyc

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Philippe C. Martin

    #1

    dos box appears when clicking .pyc

    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
    Secure the right domain name for your business or website today. Custom tailored payment plans available to fit any budget.

    *************** ************

  • Larry Bates

    #2
    Re: dos box appears when clicking .pyc

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

    Larry Bates


    Philippe C. Martin wrote:[color=blue]
    > 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
    >
    >
    >
    >
    >[/color]

    Comment

    • Peter Hansen

      #3
      Re: dos box appears when clicking .pyc

      Larry Bates wrote:[color=blue]
      > Change the association for .pyc files to pythonw.exe
      > from python.exe.[/color]

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

      c:\>assoc .pyc
      ..pyc=Python.Co mpiledFile

      c:\>ftype Python.Compiled File
      Python.Compiled File="C:\a\pyth on24\python.exe " "%1" %*

      c:\>assoc .pyw
      ..pyw=Python.No ConFile

      c:\>ftype Python.NoConFil e
      Python.NoConFil e="C:\a\python2 4\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

      Comment

      • Tim Roberts

        #4
        Re: dos box appears when clicking .pyc

        "Philippe C. Martin" <philippecmarti n@sbcglobal.net > wrote:[color=blue]
        >
        >For a few months now, I have been used .pyc script under XP without
        >getting the "DOS" box.[/color]

        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.NoC onFile

        (Actually, you should type "assoc .pyw" to make sure that is its file
        type.)
        --
        - Tim Roberts, timr@probo.com
        Providenza & Boekelheide, Inc.

        Comment

        Working...