omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. OTPSkipper

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 10
    • Best 0
    • Controversial 0
    • Groups 0

    OTPSkipper

    @OTPSkipper

    0
    Reputation
    730
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    OTPSkipper Unfollow Follow

    Latest posts made by OTPSkipper

    • RE: Background Operation

      I think just keeping the iPad active will be enough. I don't really need it to run in the background. Thanks!

      posted in Pythonista
      OTPSkipper
      OTPSkipper
    • Background Operation

      Is there a way to enable operation in the background?

      I have an app that receives a data stream from a socket over wifi from my sailboat. The problem is I am not interacting with the app all the time. I want to be able to put it down but still collect the data.

      When I close the top on my iPad right now it gets an io error on the socket after about 150 seconds.

      posted in Pythonista
      OTPSkipper
      OTPSkipper
    • RE: Scene nube problems

      Got it. There is setter code in the library and I was overriding it. Here is the fixed code:

      from scene import Scene, SpriteNode, run, EffectNode
      
      class pt(SpriteNode):
          
          def __init__(self, **kargs):
              SpriteNode.__init__(self, 'plf:HudX', **kargs)
              self.scale = 0.5
              
      class plot (SpriteNode):
          def __init__(self, **kargs):
              SpriteNode.__init__(self, **kargs)
              self.anchor_point = (0, 0)
              self.color = '#8989ff'
          
      class test(Scene):
          
          def setup(self):
              clip = EffectNode(parent=self)
              clip.crop_rect = (0, 0, self.size.x / 2, self.size.y / 2)
              pane = plot(parent=clip)
              pane.size = (self.size.x / 2, self.size.y / 2)
              clip.position = (50, 50)
              
              for x in (50, 100, 150, 200, 250, 300, 350, 400):
                  p = pt(parent=pane)
                  p.position = (x, x)
                  
      if __name__ == '__main__':
          tst = test()
          run(tst)
              
              ```
      posted in Pythonista
      OTPSkipper
      OTPSkipper
    • RE: Running a socket together with scene

      Thanks. That is working for me.

      posted in Pythonista
      OTPSkipper
      OTPSkipper
    • RE: How to save a log file to Pythonista file system

      It was something stupid. Spelled the reference to the file Handel wrong.

      Thanks!!

      posted in Pythonista
      OTPSkipper
      OTPSkipper
    • Scene nube problems

      Here is my test case:

      from scene import Scene, SpriteNode, run, Point
      
      class pt(SpriteNode):
          
          def __init__(self, **kargs):
              SpriteNode.__init__(self, 'plf:HudX', **kargs)
              
          scale_x = 0.5
          scale_y = 0.5
              
      class plot (SpriteNode):
          anchor_point = Point(0,0)
          color = '#8989ff'
          
      class test(Scene):
          
          def setup(self):
              pane = plot(parent=self)
              pane.size = (self.size.x / 2, self.size.y / 2)
              pane.position = (50,50)
              
              for x in (50, 100, 150, 200, 250, 300):
                  p = pt(parent=pane)
                  p.position = (x, x)
                  
      if __name__ == '__main__':
          tst = test()
          run(tst)
      

      Questions:

      1. Why doesn't the color work on my plot class?
      2. Why isn't the plot 50 px from the lower left corner?
      3. Why are the x gifs not half size?
      4. Why doesn't the plot Sprite clip its children?
      posted in Pythonista
      OTPSkipper
      OTPSkipper
    • RE: How to save a log file to Pythonista file system

      Simple enough. Logfile_out is set to "log.txt"

        if self.logfile_out is not None:
              self._of = open(self.logfile_out, mode='w', encoding='utf-8')
      

      It has to be something stupid.

      posted in Pythonista
      OTPSkipper
      OTPSkipper
    • RE: How to save a log file to Pythonista file system

      Hmmm. Tried that and it didn't seem to work. No file showed up.

      posted in Pythonista
      OTPSkipper
      OTPSkipper
    • How to save a log file to Pythonista file system

      How can I save a log file to my pythonista file system?

      posted in Pythonista
      OTPSkipper
      OTPSkipper
    • Running a socket together with scene

      I am writing an app that receives data over a tcp socket and displays the data graphically with some user interaction too.

      I can't just call "run" for scene support because I need to poll the socket too.

      Will threads work?

      posted in Pythonista
      OTPSkipper
      OTPSkipper