-
Notifications
You must be signed in to change notification settings - Fork 86
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
base: master
Are you sure you want to change the base?
Conversation
gc = 0 | ||
total = 0 | ||
else: | ||
gc += line.count('G') + line.count('C') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python2? why not python3? ;)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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)