• Ro

    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
        if color == "[44": # parsing
        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 read more
  • Ro

    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 “” 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 read more
  • Ro

    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 read more

Internal error.

Oops! Looks like something went wrong!