omz:forum

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

    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 2
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    Ro

    @Ro

    0
    Reputation
    943
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Ro Unfollow Follow

    Latest posts made by Ro

    • In-Line Color Markup Support Script

      Recently I had a great idea that would allow Pythonista users to be able to use colorama (or other color markup) in their programs rather than using console functions!

      How it would work

      The program would run in the background as a thread and would intercept new stdout messages! Rather then being printed, the program would parse the message and check for color tags (eg. \033[44m)! If the program detects a color tag it could then change the color of the corrisponding text at the segment of the tag[1]!

      With this: more PC python programs that can run on pythonista and use in-line color tags!!!

      
      # [1] Example
      
      ...
      if r"\033" in message: # check for \033 colors
      	color = parse_colors(message) # needed function
      	sys.stdout.write(text_before_colorized)
      	if color == "[44": # parsing
      		console.set_color(0,0,1)
      		sys.stdout.write(text_after_colorized)
      	sys.stdout.write("\n") # ending print
      	...
      
      # There are many flaws with this example code but it shows the basic idea of how some of it would work!
      
      # ToDo: Parse multiple color codes in string
      # ToDo: Ignore r"messages"
      # ToDo: Ignore non-strings
      # ToDo: Make thread immune to KeyboardInturrupt
      # ToDo: Add kill method to thread
      # ToDo: Support multiple color markups
      # Error: >>> print "message",
      # would not remove the "\n" are parsing
      
      # End Result:
      
      # >>> print "normal color \033[44m blue color"
      # normal color  blue color
      #               ^        ^ this would be blue
      
      

      I wanted to share this idea with the community because I can't find time to make it and rather than just let the good idea die: I would like to share it with people who may be intrested in using it!

      posted in Pythonista
      Ro
      Ro
    • Deadly Crash

      A deadly error has occurred while I was using the latest version of Pythonista 3 on an iPhone 6 using iOS 11.2.2! After creating a md file called “127.0.0.2.md” with “os.mkfifo” and opening the file, I was unable to edit anything in the file; then everything froze and the app crashed. But now, every time I open the app, Pythonista 3 shows the logo and crashes. I’ve tried holding power & home to do a reset which didn’t work; I’ve tried doing a shutdown which did let me do some things, but if I try to look at other files or change the file name, it will crash; and I have tried using the shortcut “pythonista3://“ but that also results in a crash.
      This deeply worries me because I was working on a huge project and now the app is not going to function.
      Update: This affects more then just Pythonista, it also kills your keyboard and you cant get your keyboard to pop up in certain apps.

      Here is the error log from my device: https://ghostbin.com/paste/oyf27

      Update: Pythonista 3 has a safe mode which fixed everything! THANK F*CKING GOD THATS A FEATURE! I would have cried if that didn’t exist

      posted in Pythonista
      Ro
      Ro
    • RE: DLNA server

      I found a working DLNA Controller & Server that can run on Pythonista: https://github.com/cherezov/dlnap/blob/master/dlnap/dlnap.py

      posted in Pythonista
      Ro
      Ro