omz:forum

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

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

    Cook92

    @Cook92

    1
    Reputation
    449
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Cook92 Unfollow Follow

    Best posts made by Cook92

    • Secondary display

      I have an idea rattling in my brain and one of the big pieces of it is about UI.

      With UI in Pythonista, is it possible to have a secondary presentation shown on an external display (projector, TV) via Lightning to HDMI/VGA adapter?

      So one potential application would be having a grid of slides on your iPad UI with a projector only showing the currently selected slide.

      This is a possible thing in iOS. I have some apps that have a "presentation mode." (Keynote for example does this (by default?) when connected to an external display).

      Anyway- wondering if it's possible! Thanks!

      posted in Pythonista
      Cook92
      Cook92

    Latest posts made by Cook92

    • Secondary display

      I have an idea rattling in my brain and one of the big pieces of it is about UI.

      With UI in Pythonista, is it possible to have a secondary presentation shown on an external display (projector, TV) via Lightning to HDMI/VGA adapter?

      So one potential application would be having a grid of slides on your iPad UI with a projector only showing the currently selected slide.

      This is a possible thing in iOS. I have some apps that have a "presentation mode." (Keynote for example does this (by default?) when connected to an external display).

      Anyway- wondering if it's possible! Thanks!

      posted in Pythonista
      Cook92
      Cook92
    • RE: Secondary display

      Okay- thanks for your input. I really was wondering if it's possible- of course getting there is always the interesting part.

      For now I'll put this on the shelf. I don't have the beta and I'm really just a beginner at Python - trying to add in objective C makes things sound very complicated.

      Perhaps someday I'll try at this one! I have a lot of use for something like that- (a lot of presentations)!

      posted in Pythonista
      Cook92
      Cook92
    • RE: Hide keyboard

      Yeah that did it! Thanks!

      posted in Pythonista
      Cook92
      Cook92
    • RE: Hide keyboard

      I also would like to know how to do this. After entering text into a text field, pressing "done" or "enter" ...how to hide the keyboard?

      posted in Pythonista
      Cook92
      Cook92
    • ui.webview.load_html()

      I'm just fiddling with something....would appreciate some input.
      If I have some HTML code with CSS and put it into ui.webview.load_html() it seems it cannot handle all CSS parameters.
      I don't know the scope of CSS that it can handle, but I found that table properties don't seem to work.

      Simple Example to use as html to pass to load_html():

      <html><style>table {border-width:1px}</style><table><tr><td>This table should have a border</td></tr></table></html>
      

      It won't have a border. At least from what I've tried!

      However, the below method will provide a border, however this is poor way to go about things in html:

      <html><table border = 1><tr><td>This table should have a border</td></tr></table></html>
      

      Is there something I should do to get that working....?

      Also note: ui.Webview itself handles CSS properly if I load an actual webpage (load_url).

      posted in Pythonista
      Cook92
      Cook92
    • RE: ui.webview.load_html()

      You're right about all of those things.

      CSS can be used in three ways - externally linked, internal <head><style>...</style>, and in the tag <table style="...">

      For what I'm doing right now- the internal style sheet is sufficient and arguably easier(?). I'm scraping some html and then showing it in webview.
      Could do re.sub but I'm just adding a bunch of stringy html code and that's easy enough!

      posted in Pythonista
      Cook92
      Cook92
    • RE: ui.webview.load_html()

      sorry- it seems I can't delete this.... I answered my own question:
      (hrm...seems I need to read up on my css!)

      {border: 1px solid black;}

      posted in Pythonista
      Cook92
      Cook92
    • Regex

      First off, hi! I'm pretty new to Python- having a lot of fun figuring things out. I check this forum often so thank you all for your help.

      Here's my question:

      Has anyone successfully installed and been able to use the regex module? USE is the key word...!

      I was able to do the different steps: download from PyPi...unpack...move
      I actually had to install it on my PC using In order to get a file that is generated from the setup.

      Anyway after all that, lots of errors. Mainly import errors.
      It seems as though some modules don't play nicely in pythonista.

      I wanted to get this working because I'm trying to work with Japanese characters and the re module apparently doesn't cut it (which is true- I got some wacky matches using findall)

      So- any success? If so, what did you do?

      posted in Pythonista
      Cook92
      Cook92
    • RE: Regex

      Okay it seems to work now after using unicode().

      Basically I was doing a (?<=)[dog]+(?=) search on a list of words- but with Japanese characters and different lookahead/behind. The aim is to find words that use those characters.

      Without making Unicode strings I got (false positive?) results like this: 中=丸. Very weird! The list I have has 140,000+ entries so there were a lot of false matches.

      Thanks again for your help!

      posted in Pythonista
      Cook92
      Cook92
    • RE: Regex

      Okay thanks...great responses!

      I didn't know that regex also had C code! :)

      Some of those things I knew about Unicode in Python, some I didn't. I'll try later and see what happens!

      posted in Pythonista
      Cook92
      Cook92