• runjaj

    Sometime ago I created a workflow to create a quick and easy presentation using markdown and Remark. Just create the presentation using markdown and use this workflow to view it. No need to install anything.

    The Remark syntax is really easy and is available in the Remark website.

    posted in Editorial read more
  • runjaj

    Documentation could be improved, no questions here.

    Tips for a beginner (like me)?

    1. Read the documentation twice. Many times this won't solve your doubts (I know it doesn't solve mine).

    2. Check the Examples folder. I have learnt more than a few things reading them.

    3. Look for answers here and make questions. Probably you will get an answer.

    I have said in this forum that I would like that Ole wrote better documentation and would happily participate in a crowdfunding, if he organized it. I understand that writing good documentation requires time and time is money...

    posted in Pythonista read more
  • runjaj

    Hi!

    I'm the guy who asked https://forum.omz-software.com/topic/4930/use-the-numeric-keyboard-easily

    I have posted there how to change the type of keyboard using the UI Designer. It's super easy (once you know how to do it. I had to ask Ole).

    I hope it helps.

    Javier

    posted in Pythonista read more
  • runjaj

    Hi!

    I contacted Ole via Twitter and he solved the problem. It's really easy, but there are a couple of things that are not so evident (at least, for me).

    To use a numeric keyboard with a textField created using the UI Designer you need to write in the Custom Attributes field:

    {"keyboard_type": ui.KEYBOARD_DECIMAL_PAD}

    Alternatively, you can write:

    dict(keyboard_type=ui.KEYBOARD_DECIMAL_PAD)

    I think the second is easier to write in iOS. The first one has one problem: the quotation marks. By default iOS changes the straight " " to typographic ones. The problem is that Pythonista cannot understand typographic quotation marks. You can get straight quotation marks by tapping and holding the ["] key.

    I hope it's clear now (and that you could understand my not-so-good English).

    Javier

    Edit (27 June 2018): It's possible to change several attributes in one line. For example, here we change the keyboard to a decimal pad and make the Clear Button visible always:

    {"keyboard_type" : ui.KEYBOARD_DECIMAL_PAD, "clear_button_mode" : "always"}

    posted in Pythonista read more
  • runjaj

    Hello!

    I've created a very simple app to solve an small problem I have. The app works really well.

    The app has a couple of text fields. These fields are numbers and I would like to use a numeric keyboard instead of the regular keyboard. I have created the ui using the UI Designer. Is there an easy way to do it? If it is too difficult (more than two lines of code), it isn't a big deal to change the keyboard when I'm using the app...

    Sadly, my knowledge is very limited and I'm not able to understand half of the help. I have searched the forum and the internet looking for examples I could use, but no luck.

    Thanks!

    Javier

    posted in Pythonista read more
  • runjaj

    Hi!

    My knowledge of Python and Pythonista is frankly low. Maybe you'll find this too easy and evident, but I've needed sometime to understand hoy to use pytest in Pythonista.

    Here is an script showing how to use it:

    import pytest
    
    def cuadrado(x):
        return x*x
    
    def test():
        assert(cuadrado(2)==5)
        
    pytest.main()
    

    Just import pytest and import or define your functions. Then, define your test and, finally, put pytest.main() to run the tests. That last line was the thing I couldn't find when I was reading the pytest tutorial.

    Javier
    Ps. Sorry for the bad English.

    posted in Pythonista read more
  • runjaj

    Hi!

    If Ole organized a crowdfunding to get some money to write the book, I'll be more than happy to pay a reasonable amount.

    Javier

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!