-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
fstwn
committed
Apr 21, 2020
1 parent
fde695a
commit 3f179b8
Showing
7 changed files
with
115 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# PYTHON STANDARD LIBRARY IMPORTS ---------------------------------------------- | ||
from __future__ import absolute_import | ||
from __future__ import print_function | ||
|
||
# LOCAL MODULE IMPORTS --------------------------------------------------------- | ||
from . import Exceptions | ||
|
||
# CHECKING FOR RHINO DEPENDENCY AND ENVIRONMENT -------------------------------- | ||
try: | ||
import Rhino | ||
ISRHINOINSIDE = False | ||
except ImportError: | ||
try: | ||
import rhinoinside | ||
rhinoinside.load() | ||
import Rhino | ||
ISRHINOINSIDE = True | ||
except: | ||
raise Exceptions.RhinoNotPresentError() | ||
|
||
def IsRhinoInside(): | ||
""" | ||
Check if Rhino is running using rhinoinside. | ||
""" | ||
return ISRHINOINSIDE == True | ||
|
||
# CHECKING FOR NETWORKX DEPENDENCY AND VERSION --------------------------------- | ||
try: | ||
import networkx | ||
NXVERSION = networkx.__version__ | ||
if not NXVERSION == "1.5": | ||
raise Exceptions.NetworkXVersionError() | ||
except ImportError: | ||
raise Exceptions.NetworkXNotPresentError() | ||
|
||
def NetworkXVersion(): | ||
""" | ||
Return the version of the used networkx module. | ||
""" | ||
return NXVERSION | ||
|
||
# ALL DICTIONARY --------------------------------------------------------------- | ||
__all__ = [ | ||
"IsRhinoInside", | ||
"NetworkXVersion" | ||
] | ||
|
||
# MAIN ------------------------------------------------------------------------- | ||
if __name__ == '__main__': | ||
pass |
This file contains 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
This file contains 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
This file contains 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
This file contains 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