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

Copy cells to file #6976

Open
hottwaj opened this issue Aug 9, 2019 · 5 comments
Open

Copy cells to file #6976

hottwaj opened this issue Aug 9, 2019 · 5 comments
Milestone

Comments

@hottwaj
Copy link

hottwaj commented Aug 9, 2019

Hi there guys, thanks for the fantastic tool!

Feature request: it would be useful to be able to copy code from several selected cells into a python file (for example). Currently when I copy cells in one Jupyterlab notebook tab I can paste them into another notebook tab, but not into a file tab.

Use case: I tend to develop code in Jupyter lab, then move pieces into python files as they become stable enough for re-use elsewhere.

Thanks!

@jasongrout
Copy link
Contributor

You can drag multiple cells into a file and it will paste the code into the file.

@hottwaj
Copy link
Author

hottwaj commented Aug 9, 2019

Aha great thanks, sorry I hadn't seen that (I now see it is documented here: https://jupyterlab.readthedocs.io/en/stable/user/notebook.html)

I guess I wasn't expecting drag&drop functionality like that be available, hence resorting to good old copy paste via the Edit menu

Happy for you to close if you think that the Edit menu route is not needed.

Cheers

@jasongrout
Copy link
Contributor

Happy for you to close if you think that the Edit menu route is not needed.

I think the fact that you tried it as a first resort points to the edit menu route being useful, if it's technically feasible. You mean the Edit menu in jlab, not the browser edit menu?

@hottwaj
Copy link
Author

hottwaj commented Aug 9, 2019

Yes exactly the Jupyterlab Edit menu is where I looked.

Obviously the "Copy cells" item works when you use it in the source notebook, but when you get to a .py file "Paste cells" is disabled.

If its complex to implement the current feature is more than sufficient :)

@jasongrout
Copy link
Contributor

I'll leave this open as a feature request nonetheless. Maybe there's something we can do that's easy to implement :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants