• bennr01

    @ccc I also oppose dropping python 2 from pythoniststa 3 for several reasons.

    1. I still have a huge amount of py2 code which i do not want to port
    2. I do not want to be forced to adapt py3. While i am slowly, but steadily switching over to py2 and py3 compatible source and later to only py3, i want to do this on my own pace and not suddenly because one of my most used apps dropped support for py2.
    3. Pythonista 3 is advertised on the appstore as being both py2 and py3 compatible. Some people, including me, probably would not have bought pythonista3 if it did not support py2. Before @omz announced that pythonista3 would support both versions, I had not even considered buying pythonista3. Chances are, that a few people may be outraged if py2 was dropped. You may argue that they do not have to update, but maybe some people have automatic updates on and will know py2 was dropped before it is too late. And i do not want to see that shitstorm.
    4. Why should we even drop py2? Just because it is officialy EOL does not mean we have to drop support for py2. While it would be nice if we would have a faster start-up time, a simple do not load py2/py3 switch would also do the job.
    5. I sometimes work on py2 code on my iPhone and like it.
    6. Py3 is an abomination which i will fight until my very last breath.

    Well, in the end it is the decision of @omz .

    posted in Pythonista read more
  • bennr01

    @sendog3c could you please provide a bit more information about your problem?

    But I have problem with parameter, data gotten from sender (str, int).

    What exactly do you mean? sender.title should always be a str. If you want to convert a str to an int, use int(text_here). If you want to convert a int to a str, use str(int_here).

    def button_tapped(sender):
        #if  button_tapped == b_top1.title('SUM'):
        #itexto1 = 'Hello World'
        texto1 = sender.title
        #else:
        #texto1 = str(300)  
        return texto1
    

    You can not return something from a callback. Instead, do the operation directly in the callback.
    An example:

    def button_tapped(sender):
        a = ...  # value for a here
        b = ...  # value for b here
        action = sender.title
        if action == "SUM":
            result = a + b
        # .. other operations
        txt_field1.text = str(result)
    

    Also, the following will not work:

    txt_field1.text = button_tapped()
    

    If i understand correclty, you want to change the text when a button was pressed. However, button_tapped() will be evaluated right in this line, before the UI is presented. Instead, modify the text in the callback as shown above.

    posted in Pythonista read more
  • bennr01

    @Robert-Buckley said:

    because once those controls have been used, they disappear and don't come back.

    Uhmm... what? This is not supposed to happen...

    posted in Pythonista read more
  • bennr01

    The option for cursor color is called tint color (or something like that). Also, like @ccc said, restart the app after making changes.

    posted in Pythonista read more
  • bennr01

    @Robert-Buckley there is also the easy_config command, which allows changing the colors

    posted in Pythonista read more
  • bennr01

    @shtek said:

    why not merged yet?

    It is now merged.

    it's utf8 everywhere, why stick to python 2

    If your question is "why is StaSh still py2 and not yet py3?", then there are two reasons:

    1. Large codebase, some of it using py2-only or outdated dependencIes (e.g.g git)
    2. The person who did most of the current port to py3 finally understood that py3 is an abomination which needs to be fought until our very last breath

    posted in Pythonista read more
  • bennr01

    @headsphere You could try disabling wheels for the installation using pip --verbose install --no-binary :all: attrs.

    posted in Pythonista read more
  • bennr01

    Hi, have you checked the physical mute switch on your phone? There should be a switch near the volume buttons, which, wenn activated, mutes specific sounds including most of pythonista sounds.

    posted in Pythonista read more
  • bennr01

    @JonB said:

    BTW, iirc, monkeylord in stash has the capability to "mount" Google drive folder.

    The mount-command currently only supports dropbox, ftp, zipfiles and other directories. I am thinking about rewriting it to use pyfilesystem2 instead, but this may still take a while.

    @FarmerPaco said:

    I did check the site packages and saw the Stash running 2.7 installs a more updated version of pyasn1 (v. 2.1) where as stash runing at 3.6 installs an earlier version of pyasn1 (v.1.7). This seemed strange.

    Interesting... Are you using StaSh version 0.7.2? I recently changed pip to respect the python version when installing new packages, but pyasn1 should work for both... Also, are you sure about the version of pyasn1? According to pypi the most recent version is 0.4.5.

    posted in Pythonista read more
  • bennr01

    @djl said:

    "-s d blabla" are necessary arguments in this example . I cannot figure out how to do the same thing from the Pythonista console.

    You can long-press the run-Button to add arguments

    Regarding the SyntaxError: Maybe you run StaSh in a different python version than the console?

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!