Skip to content

Commit 471d1df

Browse files
authored
Merge pull request #31 from wrobell/owlrl-cleanup
Remove sys.path modifications
2 parents d117a89 + 3aca55b commit 471d1df

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

scripts/owlrl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
#!/usr/bin/env python3
22

33
import os
4-
import sys
5-
6-
# prevent accidentally importing `_this_` file when calling
7-
# `from owlrl import ...` below.
8-
HERE_DIR = os.path.abspath(os.path.dirname(__file__))
9-
if HERE_DIR in sys.path:
10-
sys.path.remove(HERE_DIR)
11-
12-
# Add 'owlrl' module from the parent directory into the path if it exists.
13-
PARENT_DIR = os.path.dirname(HERE_DIR)
14-
parent_dir_list = os.listdir(PARENT_DIR)
15-
if 'owlrl' in parent_dir_list:
16-
possible_owlrl = os.path.join(PARENT_DIR, 'owlrl')
17-
if os.path.isdir(possible_owlrl):
18-
sys.path.append(possible_owlrl)
19-
204
from optparse import OptionParser
215
from owlrl import convert_graph, RDFXML, TURTLE, JSON, AUTO, RDFA
226

0 commit comments

Comments
 (0)