Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Line Based support for Python #155

Closed
adrianoesch opened this issue Jul 4, 2014 · 8 comments
Closed

Add Line Based support for Python #155

adrianoesch opened this issue Jul 4, 2014 · 8 comments

Comments

@adrianoesch
Copy link

line based runner for python would be cool. but cool thing here anyway ;)

@erran
Copy link
Collaborator

erran commented Jul 4, 2014

@adrianoesch "Line based" runs utilize the line number. If you want to execute a specific line (a selection) then you can highlight and run it. Is this what you're looking for or do you actually want to execute based on line number? If so, I haven't seen python via line number before.

@adrianoesch
Copy link
Author

I tried to run a single line and a selection of code ("run at line") with command+shift+j and the respond was "Line Based runner not available for Python". I usually run my scripts line by line for debugging, so this would be useful, but I'm new to atom and not sure whether it's worth the time to get used to it anyway. Also I'm not a real coder, so I'm not sure if this is the "right" way to do it as well ;)

@erran
Copy link
Collaborator

erran commented Jul 4, 2014

@adrianoesch "Run at line" is separate from the standard selection run which runs a code selection, it is meant to run code by the line number (which is admittedly a misleading name). If you select a line of code and use command+i you should see the line(s) you selexted run.

@erran
Copy link
Collaborator

erran commented Jul 4, 2014

Here is a screen capture showing the different functionality of the two. I show how in Python you always perform a file based run or selection based run (simply use "Script: Run" with or without text selected) and how to perform a line based run (using "Script: Run at Line" in a supported language).

line-based-vs-selection-based

Line based runs typically are used by languages that support running at a specific line number. Behat Feature, Gherkin, and RSpec are currently supported.

@adrianoesch
Copy link
Author

Ahaa, I see. Thanks a lot for you explanations!

One last thing I see as a disadvantage of atom, that you might be able to resolve easily: If I could play around with temporarily stored variables like in a shell, atom would definitely replace my previous editor. But it seems to me, that as soon as the script is done, all variables will be erased, right?

@erran
Copy link
Collaborator

erran commented Jul 4, 2014

@adrianoesch I'm not sure if you mean environment variables OR local variables within your script. #147 is being worked on to add ENV var support while local variables within your script is already supported.

@erran erran closed this as completed Jul 4, 2014
@adrianoesch
Copy link
Author

I think I mean environment variables then. Thanks again and have a good weekend ;)

@rgbkrk
Copy link
Member

rgbkrk commented Jul 5, 2014

This got mentioned in other issues (#118), but is roughly the same issue: REPL support in Atom. What you're looking for (and others) though is likely debugger support (pdb or ipdb) within Atom.

@erran erran changed the title Add support for Python Add Line Based support for Python Oct 1, 2014
@erran erran added the invalid label Oct 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants