Created
March 30, 2020 22:03
-
-
Save BishopGIS/b5e37e7e068d98109b0352dc9932bd63 to your computer and use it in GitHub Desktop.
test numpy exists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
for path_item in sys.path: | |
try: | |
items = os.listdir(path_item) | |
for item in items: | |
if item == 'numpy': | |
print('numpy directory present in path: {}'.format(path_item)) | |
# cut some lines from __init__.py | |
full_path = os.path.join(path_item, item, '__init__.py') | |
with open(full_path) as f: | |
for i in range(155): | |
if i < 150: | |
qq = f.next() | |
continue | |
else: | |
print(f.next()) | |
except: | |
pass | |
print('finished') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment