Association of Python files in Windows not working
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
migrated from stackoverflow.com Aug 26 '11 at 0:46
This question came from our site for professional and enthusiast programmers.
add a comment |
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
migrated from stackoverflow.com Aug 26 '11 at 0:46
This question came from our site for professional and enthusiast programmers.
add a comment |
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
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
python windows file-association
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.
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Try Shift+Right Click on a .py file in explorer and selecting "open with..." and then manually selecting the python interpreter.
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
add a comment |
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.
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Try Shift+Right Click on a .py file in explorer and selecting "open with..." and then manually selecting the python interpreter.
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
add a comment |
Try Shift+Right Click on a .py file in explorer and selecting "open with..." and then manually selecting the python interpreter.
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
add a comment |
Try Shift+Right Click on a .py file in explorer and selecting "open with..." and then manually selecting the python interpreter.
Try Shift+Right Click on a .py file in explorer and selecting "open with..." and then manually selecting the python interpreter.
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
add a comment |
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Sep 23 '11 at 16:17
TimTim
1364
1364
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Dec 4 '16 at 18:56
OphirBackOphirBack
1
1
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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