Can I have a console window to see the results of python code ? Sorry if this is straightforward I’m beginning to get into Atom over sublime after a long break.
Yes it is possible.
Look at these: https://atom.io/packages/search?q=terminal
Be warned - you may need to invoke the same commands as if running from you OS native terminal / shell.
More then one line of code atleast four to six lines at minimum that I can say off hand.
See if the following package works for you -
I am no expert,
this one is the closest to what I think script running should be like.
In other words: run script and also have a terminal.
The package does not function on my computer, for some reason.
I am yet to see something that compares with the built-in terminal available in Visual Studio Code.
More ideas look at (https://atom.io/packages/search?utf8=✓&q=script-runner&commit=Search)… note the number of installations. Do know that some of those do not have a terminal in the traditional sense. The following code line will not be possible for most on the linked list (excluding
_name = input('What is your name? ')
Is it possible to programmatically generate syntax highliting, without using a grammar?
I couldn’t get script-runner to install either ? Any or all script runners / test runners, specifically in the link you posted will run code regardless of language ?
What error do you see?
script-runner is that it opens into a terminal window like you said, whereas
hydrogen do not.
It’s a long error; want me to post it ? I’ve attempted installing though Atom, this being the forth time; same error more or less.
Absolutely. Make sure to wrap it in code tags (highlight it and press the
</> button above the editor) for readability.
![image|677x500](upload://fA9qL8FPAnHNUgJCnC3dNudIyzV.png)> firstname.lastname@example.org install C:\Users\CHRIST~1\AppData\Local\Temp\apm-install-dir-11788-138560-1jczk95.jy94ahh0k9\node_modules\script-runner\node_modules\node-pty > node scripts/install.js C:\Users\CHRIST~1\AppData\Local\Temp\apm-install-dir-11788-138560-1jczk95.jy94ahh0k9\node_modules\script-runner\node_modules\node-pty>if not defined npm_config_node_gyp (node "C:\Users\Christopher\AppData\Local\atom\app-1.19.7\resources\app\apm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\Christopher\AppData\Local\atom\app-1.19.7\resources\app\apm\bin\\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. MSBUILD : warning MSB4010: The "*.tasks" files could not be successfully loaded from their expected location "C:\Windows\Microsoft.NET\Framework\v2.0.50727". Default tasks will not be available. [C:\Users\CHRIST~1\AppData\Local\Temp\apm-install-dir-11788-138560-1jczk95.jy94ahh0k9\node_modules\script-runner\node_modules\node-pty\build\binding.sln] MSBUILD : error MSB4036: The "Message" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v2.0.50727" directory. [C:\Users\CHRIST~1\AppData\Local\Temp\apm-install-dir-11788-138560-1jczk95.jy94ahh0k9\node_modules\script-runner\node_modules\node-pty\build\binding.sln] C:\Users\CHRIST~1\AppData\Local\Temp\apm-install-dir-11788-138560-1jczk95.jy94ahh0k9 `-- (empty) gyp ERR! build error gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\Christopher\AppData\Local\atom\app-1.19.7\resources\app\apm\node_modules\node-gyp\lib\build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Windows_NT 10.0.15063 gyp ERR! command "C:\\Users\\Christopher\\AppData\\Local\\atom\\app-1.19.7\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Christopher\\AppData\\Local\\atom\\app-1.19.7\\resources\\app\\apm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\CHRIST~1\AppData\Local\Temp\apm-install-dir-11788-138560-1jczk95.jy94ahh0k9\node_modules\script-runner\node_modules\node-pty gyp ERR! node -v v6.9.5 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\CHRIST~1\AppData\Local\Temp\apm-install-dir-11788-138560-1jczk95.jy94ahh0k9\package.json' npm WARN apm-install-dir-11788-138560-1jczk95.jy94ahh0k9 No description npm WARN apm-install-dir-11788-138560-1jczk95.jy94ahh0k9 No repository field. npm WARN apm-install-dir-11788-138560-1jczk95.jy94ahh0k9 No README data npm WARN apm-install-dir-11788-138560-1jczk95.jy94ahh0k9 No license field. npm ERR! Windows_NT 10.0.15063 npm ERR! argv "C:\\Users\\Christopher\\AppData\\Local\\atom\\app-1.19.7\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Christopher\\AppData\\Local\\atom\\app-1.19.7\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\Christopher\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\Christopher\\.atom\\.apmrc" "install" "C:\\Users\\CHRIST~1\\AppData\\Local\\Temp\\d-11788-138560-1wkzwg7.b58ahmpldi\\package.tgz" "--runtime=electron" "--target=1.6.9" "--arch=x64" "--global-style" npm ERR! node v6.9.5 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! email@example.com install: `node scripts/install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the firstname.lastname@example.org install script 'node scripts/install.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the node-pty package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node scripts/install.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs node-pty npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls node-pty npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\Users\CHRIST~1\AppData\Local\Temp\apm-install-dir-11788-138560-1jczk95.jy94ahh0k9\npm-debug.log npm ERR! code 1
What do you see when you type
python --version? Apparently that can cause issues with
Sorry where do I enter in that command within Atom ?
From a terminal package. You can also do it from the command prompt outside of Atom, and the results should be the same, but for best reliability, checking from within Atom will dispel all doubt about which version Atom can access.
Alternatively: do you have Python installed globally? If not, you should download
2.7, install it, and reopen Atom.
I installed two packages, one called python-debugger the other; run-python-simply. Python-Debugger is more or less what I want or is hoping for in a package to run python code from within Atom.Although when clicking run from within python-debugger; the snippet of code doesn’t run, not sure if this how this package work ?
While, I think run-python-simply needs a source file ?
I haven’t used either of those packages, but I’m more interested in the answer to my last question: do you have Python installed? If not, then none of the aforementioned packages will work.
I have Python 2.7 & 3.6 installed
I also see this error, I have python 3.5.2 installed. In the documentation for the script-runner package it says to do this before installing the package.
apm config set python $(which python2.7)
I have only been using Atom for a couple of days (BTW, really do like it!) and I don’t know how to execute this command within Atom.
If you want to execute terminal commands from within Atom, you can use one of the terminal packages that don’t require
termination). However, it may be faster to execute it from the normal command prompt window.
When running the command you posted, it asked for node.js; which I don’t have installed ? I’m going to check the error outputted within Atom, not sure if that will be today but within the next 48 hrs.
The package python-debugger is how I would like to be able to run Python code, as a console window below the code then execute the code all within Atom, although unless I’m wrong but python-debugger doesn’t do as I want ?