Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
So I am running python 3.6.5 on a school computer the most things are heavily restricted to do on a school computer and i can only use python on drive D. I cannot use batch either. I had python 2.7 on it last year until i deleted all the files and installed python 3.6.5 after that i couldn't double click on a .py file to open it as it said continue using E:\Python27\python(2.7).exe I had the old python of a USB which is why it asks this but know i would like to change that path the the new python file so how would i do that in windows
Go to your Windows Settings --> Standard-Apps for Filetyp. There you can choose with wich program you want to open a specific filtyp, in this case ".py".
Let me know if this works :)
Just open your Python IDE and open the file manually.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 months ago.
This post was edited and submitted for review 4 months ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
I have a MacBook air and have tried opening Python in terminal but when I open it, it opens Python interactive mode. Does anyone know how to open Python script mode please.
I’ve tried typing in things such as Python or Python 3 like safari suggests but that didn’t work.
When you open the terminal, you need to type python or python3 and then press enter. After that, you are in the "python mode" and can use python commands.
If this also doesn't help you, you need to specify in more detail what youÄve done so far.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I need to run a python file, but I want to do it without using the command line. Is there any way to do this from the python shell or something?
You can, of course, use an Integrated Development Environment (IDE) that has a graphical "run" button.
Popular choices include:
Pycharm
IDLE
Spyder
PyDev
Atom
This can be done in Python Shell
Use execfile for Python 2:
>>> execfile('C:\\test.py')
Use exec for Python 3
>>> exec(open("C:\\test.py").read())
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to create a stand-alone program from a Python project.
Part of my data is saved in xml files, so I need them to be a part of the build
Wich program can help me do so?
Thanks,
Avishay
You can use Pyinstaller to create a stand-alone executable program. If your program depends of other files, you can include it in the program using the Pyinstaller spec files. Spec files contains all the instructions to create your program, including additional data files or missing modules that Pyinstaller cann't find. I strongly recommend you to use it.
You can build your program using Pyinstaller with your script:
pyinstaller myprogram.py
And a spec file will be automatically generated, then you can edit it and use it for new builds.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I was wondering what language are windows programs coded in? Can a python program run on windows if the computer doesn't have python installed?
I would recommend reading into this:
https://en.wikipedia.org/wiki/Portable_Executable
An EXE is a bundle of machine code. Take a look in a hex editor and grab an opcode manual. You probably won't be able to make sense of it without a lot of studying, but they're basically micro instructions.
To your other question, though. Yes, you can make an exe from a Python script. This works by bundling the python runtime with the script itself. Take a look at pyinstaller:
http://www.pyinstaller.org/
EDIT: As pointed out in the comments, use pyinstaller instead of py2exe. It is more actively maintained.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have a working Python ecosystem on Ubuntu.
Now I want to try Enthought Canopy. Will that installation mess up or interfere somehow with my current system?
Two examples to illustrate my confusion:
will this installation overwrite libraries in my current setup?
which python will start if I invoke ipython in a terminal?
No it wont:
http://docs.enthought.com/canopy/quick-start/install_linux.html
If the check box for making Canopy your default Python environment is checked the following line will be added your .bash_profile or .profile files:
source ~/Enthought/Canopy_32bit/User/bin/activate
But you can always uncheck the box.