diff options
author | Johannes Schauer <josch@debian.org> | 2015-10-10 00:55:44 +0200 |
---|---|---|
committer | Johannes Schauer <josch@debian.org> | 2015-10-10 00:55:44 +0200 |
commit | a4f43aea0f0af03190e95a431a96722325d8ee9e (patch) | |
tree | a780de0e239b4645c0aee1c9d85be7f01f885e73 /examples/find_pdfrw.py | |
parent | a1959ba9c0c9f3881c3e593e5aef1046750880f2 (diff) |
import new upstream version 0.2
Diffstat (limited to 'examples/find_pdfrw.py')
-rw-r--r-- | examples/find_pdfrw.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/examples/find_pdfrw.py b/examples/find_pdfrw.py deleted file mode 100644 index f69d412..0000000 --- a/examples/find_pdfrw.py +++ /dev/null @@ -1,33 +0,0 @@ -''' - find_xxx.py -- Find the place in the tree where xxx lives. - - Ways to use: - 1) Make a copy, change 'xxx' in package to be your name; or - 2) Under Linux, just ln -s to where this is in the right tree - - Created by Pat Maupin, who doesn't consider it big enough to be worth copyrighting -''' - -import sys -import os - -myname = __name__[5:] # remove 'find_' -myname = os.path.join(myname, '__init__.py') - -def trypath(newpath): - path = None - while path != newpath: - path = newpath - if os.path.exists(os.path.join(path, myname)): - return path - newpath = os.path.dirname(path) - -root = trypath(__file__) or trypath(os.path.realpath(__file__)) - -if root is None: - print - print 'Warning: %s: Could not find path to development package %s' % (__file__, myname) - print ' The import will either fail or will use system-installed libraries' - print -elif root not in sys.path: - sys.path.append(root) |