Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Solved
    • Unsolved
    • Search
    1. Home
    2. jens
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    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")
      
      posted in General Discussion
      jens
      jens
    • 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
      
      posted in General Discussion
      jens
      jens
    • RE: Recursive Tree example

      0_1515594698280_Bildschirmfoto 2018-01-10 um 15.31.22.png
      This is 20 levels deep. It took a while ๐Ÿ™‚

      posted in Code snippets
      jens
      jens