Association of Python files in Windows not working












2















On my system (Windows Vista Home Premium 64bit) Python files are associated with Python interpreter:



C:UsersPiotr>assoc .py
.py=Python.File
C:UsersPiotr>ftype Python.File
Python.File=c:python2.7python.exe "%1" %*


Nevertheless when I run any Python script from command line a window titled Open With pops up asking me to Choose the program you want to use to open this file.










share|improve this question













migrated from stackoverflow.com Aug 26 '11 at 0:46


This question came from our site for professional and enthusiast programmers.























    2















    On my system (Windows Vista Home Premium 64bit) Python files are associated with Python interpreter:



    C:UsersPiotr>assoc .py
    .py=Python.File
    C:UsersPiotr>ftype Python.File
    Python.File=c:python2.7python.exe "%1" %*


    Nevertheless when I run any Python script from command line a window titled Open With pops up asking me to Choose the program you want to use to open this file.










    share|improve this question













    migrated from stackoverflow.com Aug 26 '11 at 0:46


    This question came from our site for professional and enthusiast programmers.





















      2












      2








      2








      On my system (Windows Vista Home Premium 64bit) Python files are associated with Python interpreter:



      C:UsersPiotr>assoc .py
      .py=Python.File
      C:UsersPiotr>ftype Python.File
      Python.File=c:python2.7python.exe "%1" %*


      Nevertheless when I run any Python script from command line a window titled Open With pops up asking me to Choose the program you want to use to open this file.










      share|improve this question














      On my system (Windows Vista Home Premium 64bit) Python files are associated with Python interpreter:



      C:UsersPiotr>assoc .py
      .py=Python.File
      C:UsersPiotr>ftype Python.File
      Python.File=c:python2.7python.exe "%1" %*


      Nevertheless when I run any Python script from command line a window titled Open With pops up asking me to Choose the program you want to use to open this file.







      python windows file-association






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 25 '11 at 22:37









      Piotr DobrogostPiotr Dobrogost

      2,324134668




      2,324134668




      migrated from stackoverflow.com Aug 26 '11 at 0:46


      This question came from our site for professional and enthusiast programmers.









      migrated from stackoverflow.com Aug 26 '11 at 0:46


      This question came from our site for professional and enthusiast programmers.
























          3 Answers
          3






          active

          oldest

          votes


















          0














          Try Shift+Right Click on a .py file in explorer and selecting "open with..." and then manually selecting the python interpreter.






          share|improve this answer
























          • I have a couple of Python installations and I wrote batch files to switch among them. Manual procedure you describe is out of question.

            – Piotr Dobrogost
            Aug 26 '11 at 6:35











          • This breaks drag and drop, and argument passing

            – Eric
            Jul 5 '16 at 2:05



















          0














          no, Keltari's suggestion should work. there is another checkbox that asks whether to use the settings for all files of this type.



          Also, make sure your PATH (system/user environment variable) includes the path to your python executable.






          share|improve this answer































            -1














            Press right click on one of the codes you already have, and choose the IDE (or whatever else) you want to open the .py file with, and choose to make it the default app to open those files.
            Hope it helped.






            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f328146%2fassociation-of-python-files-in-windows-not-working%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              Try Shift+Right Click on a .py file in explorer and selecting "open with..." and then manually selecting the python interpreter.






              share|improve this answer
























              • I have a couple of Python installations and I wrote batch files to switch among them. Manual procedure you describe is out of question.

                – Piotr Dobrogost
                Aug 26 '11 at 6:35











              • This breaks drag and drop, and argument passing

                – Eric
                Jul 5 '16 at 2:05
















              0














              Try Shift+Right Click on a .py file in explorer and selecting "open with..." and then manually selecting the python interpreter.






              share|improve this answer
























              • I have a couple of Python installations and I wrote batch files to switch among them. Manual procedure you describe is out of question.

                – Piotr Dobrogost
                Aug 26 '11 at 6:35











              • This breaks drag and drop, and argument passing

                – Eric
                Jul 5 '16 at 2:05














              0












              0








              0







              Try Shift+Right Click on a .py file in explorer and selecting "open with..." and then manually selecting the python interpreter.






              share|improve this answer













              Try Shift+Right Click on a .py file in explorer and selecting "open with..." and then manually selecting the python interpreter.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Aug 26 '11 at 0:53









              KeltariKeltari

              51.2k18119170




              51.2k18119170













              • I have a couple of Python installations and I wrote batch files to switch among them. Manual procedure you describe is out of question.

                – Piotr Dobrogost
                Aug 26 '11 at 6:35











              • This breaks drag and drop, and argument passing

                – Eric
                Jul 5 '16 at 2:05



















              • I have a couple of Python installations and I wrote batch files to switch among them. Manual procedure you describe is out of question.

                – Piotr Dobrogost
                Aug 26 '11 at 6:35











              • This breaks drag and drop, and argument passing

                – Eric
                Jul 5 '16 at 2:05

















              I have a couple of Python installations and I wrote batch files to switch among them. Manual procedure you describe is out of question.

              – Piotr Dobrogost
              Aug 26 '11 at 6:35





              I have a couple of Python installations and I wrote batch files to switch among them. Manual procedure you describe is out of question.

              – Piotr Dobrogost
              Aug 26 '11 at 6:35













              This breaks drag and drop, and argument passing

              – Eric
              Jul 5 '16 at 2:05





              This breaks drag and drop, and argument passing

              – Eric
              Jul 5 '16 at 2:05













              0














              no, Keltari's suggestion should work. there is another checkbox that asks whether to use the settings for all files of this type.



              Also, make sure your PATH (system/user environment variable) includes the path to your python executable.






              share|improve this answer




























                0














                no, Keltari's suggestion should work. there is another checkbox that asks whether to use the settings for all files of this type.



                Also, make sure your PATH (system/user environment variable) includes the path to your python executable.






                share|improve this answer


























                  0












                  0








                  0







                  no, Keltari's suggestion should work. there is another checkbox that asks whether to use the settings for all files of this type.



                  Also, make sure your PATH (system/user environment variable) includes the path to your python executable.






                  share|improve this answer













                  no, Keltari's suggestion should work. there is another checkbox that asks whether to use the settings for all files of this type.



                  Also, make sure your PATH (system/user environment variable) includes the path to your python executable.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 23 '11 at 16:17









                  TimTim

                  1364




                  1364























                      -1














                      Press right click on one of the codes you already have, and choose the IDE (or whatever else) you want to open the .py file with, and choose to make it the default app to open those files.
                      Hope it helped.






                      share|improve this answer




























                        -1














                        Press right click on one of the codes you already have, and choose the IDE (or whatever else) you want to open the .py file with, and choose to make it the default app to open those files.
                        Hope it helped.






                        share|improve this answer


























                          -1












                          -1








                          -1







                          Press right click on one of the codes you already have, and choose the IDE (or whatever else) you want to open the .py file with, and choose to make it the default app to open those files.
                          Hope it helped.






                          share|improve this answer













                          Press right click on one of the codes you already have, and choose the IDE (or whatever else) you want to open the .py file with, and choose to make it the default app to open those files.
                          Hope it helped.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 4 '16 at 18:56









                          OphirBackOphirBack

                          1




                          1






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f328146%2fassociation-of-python-files-in-windows-not-working%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Список кардиналов, возведённых папой римским Каликстом III

                              Deduzione

                              Mysql.sock missing - “Can't connect to local MySQL server through socket”