This question already has answers here:
Sublime Text 2 console input [duplicate]
(2 answers)
Closed 9 years ago.
Hi everyone I'm new to programming.
I am learning Python and I want to use Sublime Text as an IDE.
I've searched and found that it is impossible to run python code from sublime text2 without having the "eofError".
Now, I want to know if it was possible to launch the .py via a keyboard shortcut directly from sublime text, instead of saving it, and then returning to windows explorer and then double clicking on it.
I want it to open in a windows like this : http://image.noelshack.com/fichiers/2013/16/1366399189-nnnnn.png
Thanks.
I just found a solution here that does basically the same job as the "F5" key in IDLE.
Thanks everyone.
Great editor. Here is a resource for creating macros in Sublime Text 2:
http://webdesign.tutsplus.com/tutorials/workflow-tutorials/quick-tip-banish-repetitive-tasks-with-sublime-text-2-macros/
This previous post might also have what you are looking for:
Running Python interactively from within Sublime Text 2
Related
This question already has answers here:
How to execute Python code from within Visual Studio Code
(34 answers)
Closed 4 years ago.
When using Python IDLE I find the Python shell, with the >>> prompt very useful for testing syntax. Is there a way of getting a Python shell integrated in VS Code?
Maybe the answer is just to open Python IDLE in another window.
Apparently this is a duplicate of another question, but I did several searches on the words Python shell and didn't find anything that seemed relevant. Sorry.
Many thanks to Jaxi for the answer that you need to type Python in the Terminal Window.
stated here you can use ctrl+backtick to open a terminal window, then from there just type python and it will give you the python shell:
https://code.visualstudio.com/docs/editor/integrated-terminal
This question already has answers here:
How do you run your own code alongside Tkinter's event loop?
(5 answers)
Closed 6 years ago.
I am currently working on making a program using tkinter that when pressing a button it opens the Python program, however I am having some problems with it. I have tried using os.system('filename.py'). That opens the file, but then crashes the GUI, making the user have to restart the GUI. I have also tried importing it as a module but that just does the same as when using os.system.
Can anyone possibly help me open a Python file in a completely new window/terminal?
The problem is filename.py will not be recognised by your os.
Instead of that use:
os.system('python filename.py')
This will successfully open your python file inside your GUI
Hope this helps
This question already has answers here:
How do you run a python script from within notepad++? [duplicate]
(6 answers)
Closed 7 years ago.
I'm having trouble executing my programs in Notepad++. I'm currently operating on Windows 7.
When attempting to run the program in the the interpreter, I have to jump through numerous hoops to actually get my program to execute. In Notepad++, I'm unable to provide additional text if I'd like to run a sys.argv command, or need to write in a name for a function.
Are there any solutions? Any easier way to run my code?
Run your code from command interpreter.It will look like this
C:\Python27\python.exe programe_name.py
change directory where your program is save before the command.I recommend you to download IDLE editor.It is easy way to learn python.
What I have been doing is this:
Press F5 to run.
Paste this | C:\Python27\python.exe "$(FULL_CURRENT_PATH)"
Replace Python27 with whatever version you use.
Then run.
It should take what you're writing and run it, make sure to select Python as the current language too.
Sorry if this isn't what you're looking for, I'm just starting too!
There are better editors which can run python without a problem. Github's atom can do this easily and is a great free solution and Sublime Text 2 is also both free and paid.
However, if you absolutely have to run on NotePad++, do click Run on the Menu and then Run again. Now, type in the shell command you would like to run (Path-to-python.exe + Path-To-File) and click run
This question already has answers here:
Create a single executable from a Python project [closed]
(3 answers)
Closed 9 years ago.
Is there a way to make python an executable file on a mac, windows, or unix?
Nothing fancy in a GUI, but open a terminal window or a console window and run like somebody executed the application through terminal.
If there's no easy way to do this, can someone direct me to any reading material? Thank you!
You can use PyInstaller (http://www.pyinstaller.org/), there is also py2exe (http://www.py2exe.org/).
My experiences with PyInstaller on Linux show that it tends to place a lot of shared libs which may sometimes clash with your distribution so it's sometimes necessary to trim it down a bit afterwards.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Where can I find my .emacs file for Emacs running on Windows?
I am a total newbie to emacs.
I know I can edit a configuration file to change the behavior of my emacs editor and customize it for python editing. but I can't seem to find it.
Any help would be appreciated.
I'm on windows XP. But inside emacs i can open it using:
C-x C-f ~/.emacs
or
C-x C-f ~/.emacs.d/init.el
You then can also see to what ~ autocompletes to locate it.
I think GNU Emacs puts it in the Documents folder '_emacs'. I'm not at a Win 7 box right now to double check.