Skip to content

Commit

Permalink
Cleaned up "#!" declarations
Browse files Browse the repository at this point in the history
Removed them from modules that aren't designed to be executed.
I didn't do a very deep analysis, just common sense and looking for
the existence of a '__name__ == "__main__"' check in the module.

Ask for "python2" as interpreter instead of just "python", see PEP 394
for details.
  http://www.python.org/dev/peps/pep-0394/

Set executable flag on the modules that kept "#!".
  • Loading branch information
mthuurne committed Feb 9, 2014
1 parent 177f1f0 commit edc5aa1
Show file tree
Hide file tree
Showing 17 changed files with 2 additions and 31 deletions.
2 changes: 1 addition & 1 deletion app.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

import sys, os, locale, re, pickle, wx, platform
import metrics
Expand Down
1 change: 1 addition & 0 deletions buildapp.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python2
#
# This builds an .app out of Twine for use with OS X.
# Call this with this command line: buildapp.py py2app
Expand Down
2 changes: 0 additions & 2 deletions fseditframe.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# FullscreenEditFrame
# This opens a modal fullscreen editor with some text. When the user's done,
Expand Down
2 changes: 0 additions & 2 deletions geometry.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# This module has basic utilities for working with wx.Rects
# and Lines (which are tuples of wx.Points).
Expand Down
2 changes: 0 additions & 2 deletions header.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/python

import os, imp
from collections import OrderedDict
from random import shuffle
Expand Down
2 changes: 0 additions & 2 deletions images.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# Images
#
Expand Down
2 changes: 0 additions & 2 deletions metrics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# Metrics
# This module offers advice on how to size the UI appropriately
Expand Down
2 changes: 0 additions & 2 deletions passageframe.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# PassageFrame
# A PassageFrame is a window that allows the user to change the contents
Expand Down
2 changes: 0 additions & 2 deletions passagesearchframe.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# PassageSearchFrame
# This allows a user to do search and replaces on a PassageFrame.
Expand Down
2 changes: 0 additions & 2 deletions passagewidget.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# PassageWidget
# A PassageWidget is a box standing in for a proxy for a single
Expand Down
2 changes: 0 additions & 2 deletions prefframe.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/python

#
# PreferenceFrame
# This allows the user to set their preferences. Changes automatically update as
Expand Down
2 changes: 0 additions & 2 deletions searchpanels.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/python

import re, wx
import metrics

Expand Down
2 changes: 0 additions & 2 deletions statisticsdialog.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# StatisticsDialog
# A StatisticsDialog displays the number of characters, words,
Expand Down
2 changes: 0 additions & 2 deletions storyframe.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# StoryFrame
# A StoryFrame displays an entire story. Its main feature is an
Expand Down
2 changes: 0 additions & 2 deletions storypanel.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# StoryPanel
# A StoryPanel is a container for PassageWidgets. It translates
Expand Down
2 changes: 0 additions & 2 deletions storysearchframes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/python

#
# StoryFindFrame
# This allows the user to search a StoryPanel for a string of text.
Expand Down
2 changes: 0 additions & 2 deletions tweelexer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

#
# TweeLexer
# This lexes (or syntax highlights) Twee syntax in a wx.StyledTextCtrl.
Expand Down

0 comments on commit edc5aa1

Please sign in to comment.