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

writing_appliance script example: smiting perl from yet one more place #705

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NickSto
Copy link
Member

@NickSto NickSto commented Jun 28, 2017

The example script in https://planemo.readthedocs.io/en/latest/writing_appliance.html#wrapping-a-script was fine, but it was written in Perl (gasp). Why not Python, I thought?

Full disclosure: I haven't tested it, since I the build environment hasn't worked yet on my machine. But it's just a change in existing docs, what could go wrong? (famous last words)

gc = 0
total = 0
else:
gc += line.count('G') + line.count('C')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not case insensitive, unlike the perl version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, true. Didn't know if it was more important to be complete or keep it simple. I can make the edit if you guys want.

@@ -0,0 +1,20 @@
#!/usr/bin/env python2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python2? why not python3? ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, I'd love to, but I figured let's not go crazy here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this made me do some research.. can OS X people confirm whether python2 is on your PATH?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, no. At least only python is on the $PATH on macOS Sierra 10.12.5, not python2.

$ uname
Darwin
$ which python2
$ python2
-bash: python2: command not found
$ which python
/usr/bin/python
$ python --version
Python 2.7.10

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

Successfully merging this pull request may close these issues.

3 participants