Atom runner как запустить
Перейти к содержимому

Atom runner как запустить

  • автор:

Запустите код в редакторе кода Atom

Я прочитал множество статей о запуске кода в редакторе кода Atom, однако я не могу понять, как это можно сделать. Может ли кто-нибудь объяснить это проще?

Я хочу запустить свой код Python в нем, и я загрузил файлы «python-tools-0.6.5» и «atom- script -2.29.0» с веб-сайта Atom, и мне просто нужно знать, как чтобы заставить их работать.

3 ответа

Изображение 492111

От Atom > Настройки > Установить:

Найдите пакет atom-runner и установите его.

После установки пакета Atom-runner на Atom,

Создайте новый документ и скопируйте и вставьте свой код в новый документ и сохраните документ с расширением .py. Например myfile.py

Последний шаг выполнить атом-бегун, используя этот ярлык:

Нажмите Ctrl + R (Alt + R на Win/Linux), чтобы запустить бегун для активного окно.

Name already in use

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

This package will run various script files inside of Atom. It currently supports JavaScript, CoffeeScript, Ruby, Python, Go, Bash and PowerShell scripts. You can add more!

Example

  • Hit Ctrl+R (Alt+R on Win/Linux) to launch the runner for the active window.
  • Hit Ctrl+Shift+R (Alt+Shift+R on Win/Linux) to run the currently selected text in the active window.
  • Hit Ctrl+Shift+C to kill a currently running process.
  • Hit Escape to close the runner window.
  • A docked runner window with ANSI support and ESC keybinding to close.
  • PATH and environment variable detection on OSX.
  • Shebang executable detection in all source files.
  • Configurable commands based on file scope or filename matches.
  • Execute unsaved file buffers!

You can add more commands for a given language scope, or add commands by extension instead (if multiple extensions use the same syntax). Extensions are searched before scopes (syntaxes).

To do so, add the ‘runner’ configuration object to

/.atom/config.cson (or go to File -> Config. ) in the format provided below, which also represents the default configuration for this plugin:

IMPORTANT NOTE: Spaces are significant in the configuring of .cson files. You must follow the exact indentation provided in the example above using spaces (no tabs).

If a shebang is detected in the source code, that line will supersede the default registered command.

The mapping is SCOPE|EXT => EXECUTABLE , so to run JavaScript files through phantom, you would do:

Note that the source. prefix is ignored for syntax scope listings.

Similarly, in the extension map:

Note that the . extension prefix is ignored for extension listings.

FAQ And Known Issues

1. I keep getting spawn node ENOENT or Unable to find command errors. Why?

Atom-runner relies on your PATH environment variable to run executables through your shell. In order to correctly run executables, they must be in your PATH . In Mac OS X systems, running Atom.app from the Launchpad or Dock will not source your PATH directory additions from your

/.bashrc or other shell profile files, and you are likely not loading your full set of paths into your environment. In Windows systems, you configure your PATH environment through the Advanced System Settings panel.

In order to ensure that your PATH is correctly configured in OS X, it is recommended to load Atom only through an active terminal (i.e., the atom command).

2. I am hitting Alt+R (or Cmd+R) and nothing is happening.

It is possible that the language you are writing code in is not recognized by this plugin in its default configuration. See the configuring section above to add support for your language or file extension if it is not there.

3. This plugin is broken! Should I file a bug report?!

Before you open a bug report, please make sure that you have properly configured the plugin for your environment. There are a lot of external factors that can cause the plugin to fail that are dependent on the language you are using, the code you are writing, the OS you are on, and much more. Please be mindful that this plugin is developed for many different languages and third-party tools, and the details of a single environment may not be immediately obvious.

Opening a bug report that says the plugin is «not working» is not helpful and will likely end up being closed due to lack of reproduceability. Unfortunately it is not possible to provide detailed configuration instructions for each language and/or environment combination in the bug tracker.

If you believe you have found a legitimate bug and can provide reliable reproduction steps to show the issue, please file a bug report. Please make sure that you provide detailed steps and include your environment (OS), language, and, if relevant, any source code you executed when running into the issue. Without this information, it is not always possible to know what is broken, and this will slow down the ability to provide a quick patch for any bugs.

Thanks for cooperating!

This package is Copyright (c) Loren Segal 2014 and is licensed under the MIT license.

About

This package will run various script files inside of Atom. It currently supports JavaScript, CoffeeScript, Ruby, and Python. You can add more.

Настройка Atom от GitHub для работы с PHP, Python и некоторыми другими языками программирования

Изначально считаем что у Вас установлена поддерживаемая операционная система, Node.JS и Atom. В примерах мы работаем в OpenSUSE (13.1) в нём (и вообще в дистрибутивах *nix) уже «из коробки» обычно есть не только Python но PHP и другие языки программирования. Так же исправно работает на Ubuntu (>12.04). Если у Вас Windows 7 или 8, а раньше Вы с ними (языками) не работали то их предварительно необходимо скачать и установить.
Примечание: перед началом работы желательно запускать Atom под root.
опыт показывает — работает стабильнее

Linter

Идеология Atom к подсветке в том, что основным пакетом для работы с синтаксисом и его анализа будет Linter, который является верхним уровнем в API для других линтеров кода. Это сделано для прекращения «войны между плагинами» (The idea is to stop the linter plugins war, by providing a top level API for linters to parse and display errors in the Atom editor). Тем не менее, не все сторонние разработчики придерживаются этой идеологии и пишут свои плагины.

  • linter-php , для PHP `php -l`
  • linter-phpcs , для PHP, `phpc`
  • linter-phpmd , для PHP, `phpmd`
  • linter-pylint , для Python, `pylint`
  • linter-pyflakes , для python, `pyflakes`
  • linter-pep8, для python, `pep8`
  • linter-flake8, для python, `flake8`
  • linter-javac , для Java, `javac`
  • linter-jshint , для JavaScript and JSON, `jshint`
  • linter-jscs , для JavaScript, `jscs`
  • linter-scss-lint , для SASS/SCSS, `scss-lint`
  • linter-coffeelint , для CoffeeScript, `coffeelint`
  • linter-csslint , для CSS, `csslint`
  • linter-rubocop , для Ruby and Ruby on Rails, `rubocop`
  • linter-tslint , для Typescript, `tslint`
  • linter-xmllint , для XML, `xmllint`
  • linter-shellcheck , для Bash, `shellcheck`
  • linter-scalac , для Scala, `scalac`
  • linter-clang , для C / C++, `clang`
  • linter-ruby , для ruby, `ruby -wc`
  • linter-lua , для Lua, `luac -p`
Пакет Script: запуск программ из Atom

Script — пакет для запуска кода в atom.

Установка пакета Script, возможна из командной строки:

или меню
Packages->Settings View->Install->Packages

Каждый язык работает, при наличии предварительно установленного компилятора / интерпритатора.
Пакет Script обновляется довольно часто. Например поддержка Swift появилась менее двух недель назад. Так что скорее всего в ближайшее время появится поддержка новых языков.

Для запуска программы необходимо выбрать
Packages—>Script—>Run

Дополнительные опции можно найти в документации либо на страницах Atom`а или проекта.

Для функционирования должен быть создан рабочий каталог.
Путь к нему нужно прописать здесь:
Packages—>Script—>Configure Script—>Current Working Directory
Заявку разработчикам на поддержку нового языка можно оставить здесь (отвечают быстро)

И немного юмора от разработчиков пакета Script,
у которых, судя по всему, спрашивают всё на свете:

первод: Атом не может найти Нод | Руби | Питон | Мои носки

Python

Поддержка подсветки этого языка идёт изначально. Пакеты для работы с синтаксисом и отладки:
Linter + Language Python + Linter Python Pep8 + Script

Script запускает код на Python, а Linter и Linter Python Pep8 покажут синтаксические ошибки.
Возможно Вам, для работы с Python также поможет Atom Python Debugger.
Подсветка ошибок и запуск после установки будут выглядеть так:

Swift
  • пакет Swift Playground
  • и уже описанный пакет Script.

Терминал

Для запуска исполняемого кода С, C++, Java иногда проще использовать сторонний пакет (не пакет Atom, а пакет вашего дистрибутива), который запускается через терминал, поскольку сам Atom поддерживает большое количество языков. Если Atom выступает в качестве редактора кода, a терминал рядом запускает его — это очень удобно для нас, поскольку терминал не имеет такое преимущество редактирования, как Atom.
Для запуска терминала в окне Atom установите пакет Term. Для запуска терминала в окне Atom выбрать
Packages—>Command Palette—>Toggle и Term
с нужными параметрами.

В заключении ещё один интересный кликабельный анимационный gif от разработчиков script, ссылки.

Sunsetting Atom

We are archiving Atom and all projects under the Atom organization for an official sunset on December 15, 2022.

Sunsetting Atom

January 30, 2023 Update: Update to the previous version of Atom before February 2

On December 7, 2022, GitHub detected unauthorized access to a set of repositories used in the planning and development of Atom. After a thorough investigation, we have concluded there was no risk to GitHub.com services as a result of this unauthorized access.

A set of encrypted code signing certificates were exfiltrated; however, the certificates were password-protected and we have no evidence of malicious use. As a preventative measure, we will revoke the exposed certificates used for the Atom application. Revoking these certificates will invalidate some versions of Atom.

These versions of Atom will stop working on February 2. To keep using Atom, users will need to download a previous Atom version.

  • 1.63.1
  • 1.63.0

Read more on our blog, including next steps for impacted Desktop users.

November 16, 2022 Update: We’ve since updated our blog post to include additional information about what you can expect after the sunset of Atom on December 15, 2022. See below for specifics.

When we introduced Atom in 2011, we set out to give developers a text editor that was deeply customizable but also easy to use—one that made it possible for more people to build software. While that goal of growing the software creator community remains, we’ve decided to retire Atom in order to further our commitment to bringing fast and reliable software development to the cloud via Microsoft Visual Studio Code and GitHub Codespaces.

On June 8, 2022, we announced that we will sunset Atom and archive all projects under the organization on December 15, 2022.

Why are we doing this?

Atom has not had significant feature development for the past several years, though we’ve conducted maintenance and security updates during this period to ensure we’re being good stewards of the project and product. As new cloud-based tools have emerged and evolved over the years, Atom community involvement has declined significantly. As a result, we’ve decided to sunset Atom so we can focus on enhancing the developer experience in the cloud with GitHub Codespaces.

This is a tough goodbye. It’s worth reflecting that Atom has served as the foundation for the Electron framework, which paved the way for the creation of thousands of apps, including Microsoft Visual Studio Code, Slack, and our very own GitHub Desktop. However, reliability, security, and performance are core to GitHub, and in order to best serve the developer community, we are archiving Atom to prioritize technologies that enable the future of software development.

What happens next?

We recognize that Atom is still used by the community and want to acknowledge that migrating to an alternative solution takes time and energy. We are committed to helping users and contributors plan for their migration.

  • On June 8, 2022, we announced the sunset date six months out
  • Through December 15, we’ll continue to inform Atom users of the sunset
  • On December 15, 2022, we will archive the atom/atom repository and all other repositories remaining in the Atom organization

If I’m using Atom, what changes can I expect after the sunset?

  • Pre-built Atom binaries can continue to downloaded from the atom repository releases
  • Atom package management will stop working
  • No more security updates
  • Teletype will no longer work will no longer work

Thank you

GitHub and our community have benefited tremendously from those who have filed issues, created extensions, fixed bugs, and built new features on Atom. Atom played an integral part in many developers’ journeys, and we look forward to building and shaping the next chapter of software development together.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *