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

allowing shebang #! when converting to script #1059

Closed
pfarndt opened this issue Jul 3, 2019 · 2 comments · Fixed by #1076
Closed

allowing shebang #! when converting to script #1059

pfarndt opened this issue Jul 3, 2019 · 2 comments · Fixed by #1076
Labels
format:Script pertains to exporting to the script/python formats

Comments

@pfarndt
Copy link

pfarndt commented Jul 3, 2019

My first notebook cell starts with a shebang, e.g.:

#!/usr/bin/env julia
versioninfo()

When I convert this notebook to a --to=script the output starts with a new line followed by the she bang:


#!/usr/bin/env julia
versioninfo()

However the newline prevents the shebang to be interpreted as such. The first new line (0x0a) should be omitted.

@t-makaro
Copy link
Contributor

t-makaro commented Jul 3, 2019

Similar too: #376

It's an issue with this template.

Gobbling some of the whitespace might work. Like:

{%- extends 'null.tpl' -%}

{%- block input -%}
{{ cell.source }}
{% endblock input %}

@pfarndt
Copy link
Author

pfarndt commented Jul 4, 2019

If this would do the trick it would be cool!

t-makaro added a commit to t-makaro/nbconvert that referenced this issue Jul 30, 2019
@t-makaro t-makaro added the format:Script pertains to exporting to the script/python formats label Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format:Script pertains to exporting to the script/python formats
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants