Python interactive shell / interpreter in the Atom editor - python

I am programming in Python 3 and I recently found Atom editor. It looks amazing and has a great functionality. I want to ask, if there is a package or any way of having an interactive python shell in the Atom editor. And no, I am not looking for simple script executing package such as the script package or the Hydrogen package.
I need this:
(shell.jpg)
Thanks.

Been a while since I used Atom. There is a package (probably several) you can install that gives you a built in bash/cmd shell, simply execute "python" from that and you'll get an interactive python shell.

There is an Repl package that brings up a separate python shell console. I find it very useful and you can open the console for python2 or python 3.

Related

Is it possible to write command line in Spyder Ipyhton console?

I use Anaconda installed Spyder on Windows. I need to write a command-line for a package to work.
Could I write command-line code on Ipyhton Console of Spyder? Is it possible and how? If not where should I write command-line inside Spyder? Do I have to download a package? I am a beginner at computer science. Thanks for your help
Note: I have made an internet research, the most related article is below but it didn't work for Spyder Ipython console.
https://jakevdp.github.io/PythonDataScienceHandbook/01.05-ipython-and-shell-commands.html

Atom can't recognize Python scripts

Hello everyone and thanks for reading. Today I tried to open a python script with Atom but it doesn't recognize that it is written in Python. Also even if a make a new script and save it as .py the problem insists. Not recognizing it as python script doesn't allow Atom to change colors of fonts or suggest words when programming etc, but I can still run the script normally through cmd.. Atom just displays it as plain text. What is even more weird is that when I click the button (bottom right of Atom's IDE) which opens up the available language formats, I can see everything (Auto Detection, Plain Text, Java, C, ...) other than Python.. Atom IDE can't find python
I run Windows 10 64bit, I have python 3.6.3 (checked the path already and seems it is working since I can see the version through cmd), I have also downloaded pip, sklearn
Now for Atom, I have only installed 3 packages, which are all for running scripts through Atom (atom-runner, platform-ide-terminal, script). I have already reinstalled both Atom & Python. Note that I also have version 2 python in my computer, but haven't linked a path to my laptop's systems variables so I guess it is not an issue.
I would really appreciate any suggestions, I am stuck here 1 day now and I don't want to switch Atom for anything else.
"It has nothing to do with Python itself. The language-python Atom package does the syntax highlighting and some other things in Atom. It's a core package, so it should be installed by default. Can you try apm enable language-python?" from user: anothernode
This solved my issued

Is it possible to get code editors in virtualenv?

I recently downloaded virtualenv on my MacOSX Sierra (10.12.2). I'm not very experienced with virtualenv and I've been coding using the interactive interpreter in terminal and I was wondering if there was an alternate way that I could use an editor(IDLE, Sublime, etc.) and still use it in virtualenv. Would I just install an editor into virtualenv or am I limited to only the interactive shell?
You are not limited to only interactive shell. For your coding part you can download and install sublime text and open your project (any project irrespective of the language you use) and get started. Here is a quick guide for getting started in sublime text : sublime text getting started
You might also want to take a look at this post: SublimeREPL plugin
You can use atom editor, inside that you can use virtualenv plugin

Python code in OSX Terminal not compiling right

So I am trying to teach myself to program in Python while on spring break and I have run into a roadblock. I can get my code to compile in PyCharm, but I would really like to get it to compile correctly in Terminal because vim is my text-editor of choice. Does anyone have any idea of why my code may not be compiling correctly?
Here is my code compiling correctly in PyCharm
Here is my code compiling incorrectly in Terminal
Thank you in advance for any help.
Any recent OSX version comes with Python 2.7 as a standard. When you install Python 3.x, you have both versions on your system. The standard way of using python -command- in the terminal calls Python 2.7. You can call a command using python3 -command- instead to use Python 3.x. You could set an alias on python3 in .bash_profile to call it instead when you use python.
You have configured PyCharm to use an installed Python 3, but at the terminal you appear to be using Python 2. There is a difference in how the two versions output the results of print. Try modifying your terminal session to direct your path to use the installed Python 3 instead of the installed Python 2.

How can I run a python program in Komodo IDE like in IDLE(Python GUI) using Run Module feature?

Sorry I am a Python beginner and after several months with Python(GUI) I now want to move to Komodo IDE 8.5 (Suggested by posts on this forum), but I had trouble on configuring it to proper use. The main issue is how I can run a Python program in Komodo like in IDLE(Python GUI) using Run Module (pressing F5) feature?
When I pressed F5 in Komodo IDE 8.5, I got message "No Python interpreter is available".
I am using Python 3.30. Python.exe is in this path "D:\1_tools\python". Komodo.exe is in this path "D:\1_tools\komodo_IDE"
Thanks for any kind helpers. I have searched the forum but did not get any helpful info. Thanks again.
There is a thread on the Komodo Community Site that discusses this exact situation. (http://community.activestate.com/node/10113)
Sumarizing:
It seems that Komodo IDE defaults to using Python2 and since it can't find a Python2 interpreter, it complains.
Solution:
For existing files, the suggested solution is to tell Komodo IDE (via "Properties and Settings" on the Editor Tab) that the file uses the Python 3 interpreter.
If you create all new python source files using the Python3 template, the IDE will be able to run them. Beware: The first time you want to use the Python3 template you will have to create the new file using the menu: "File" -> "New" -> "File from Template", then select the Python 3 template.
Is Python on your PATH? That is, if you open a command prompt and type python by itself, does it run? In Komodo, look under Edit/Preferences/Languages/Python3 and check the configuration. If python.exe is not on your PATH you can provide the full path to it there

Categories

Resources