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

No shebang handling #189

Closed
Atcold opened this issue Feb 24, 2019 · 2 comments
Closed

No shebang handling #189

Atcold opened this issue Feb 24, 2019 · 2 comments

Comments

@Atcold
Copy link

Atcold commented Feb 24, 2019

The conversion notebook to py script does not handle shebangs (commenting them out).
It is common (to me, at least) to create a new folder with ! mkdir my_dir instead of typing import os and os.mkdir('my_dir').
Therefore, I'd recommend to treat ! as % at the beginning of each line.

@mwouts
Copy link
Owner

mwouts commented Feb 24, 2019

Hello @Atcold , good remark! Well... I was not aware that there could be a space between the ! and the command. I will fix that when time permits, unless you want to add spaces to the RE yourself here.

Meanwhile, removing the space, or the ! altogether should work (as mkdir is among the magic commands).

@Atcold
Copy link
Author

Atcold commented Feb 25, 2019

Hmm, anything following a ! is going to be a Bash command. Not sure there is any "magic" involved.
Oh, also for the ? I usually add a space after it, to make it nicer to read.

@mwouts mwouts added this to the 1.0.2 milestone Feb 25, 2019
@mwouts mwouts closed this as completed in c173f75 Feb 27, 2019
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