This is 20 levels deep. It took a while
jens
@jens
4
Reputation
3
Posts
399
Profile views
1
Followers
0
Following
Best posts made by jens
Latest posts made by jens
-
RE: Detect if a module is imported from a DrawBot script?
OK, I think I got it:
try: from drawBot.drawBotDrawingTools import _drawBotDrawingTool strokeWidth = _drawBotDrawingTool.strokeWidth except ImportError: print("... must be used either inside RoboFont or inside DrawBot")
-
Detect if a module is imported from a DrawBot script?
I have an external module that can be imported from commandline, or from inside RoboFont, or from inside DrawBot. How can the module detect itβs being imported from DrawBot?
For RoboFont, this works:
try: from mojo.drawingTools import * inRoboFont = True except: inRoboFont = False