• Cook92

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

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

    Yeah that did it! Thanks!

    posted in Pythonista read more
  • Cook92

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

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

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

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

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

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

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

Internal error.

Oops! Looks like something went wrong!