• ccc

    In theory, with StaSH you should be able to cd anywhere in the file system and ls, cat, etc. tons of files that are normally hidden from iOS users.

    posted in Pythonista read more
  • ccc

    Please provide the code that you have so far.

    posted in Pythonista read more
  • ccc

    Yes. My point was about converting from Python datetimes to Objective C datetimes.

    posted in Pythonista read more
  • ccc

    To convert from Python datetimes...

    from datetime import datetime
    print(f'{datetime.now():%Y%m%d %H:%M}')
    

    posted in Pythonista read more
  • ccc

    Apple works hard to make sure that one iOS app can not "drive" another iOS app for security reasons.

    If you have the source code for both apps you can do things or if one app exposes URLs then the other can use those URLs to drive things.

    With iMessage, you can build a message from another app but you can NOT click the send button. This is a good thing from a security perspective.

    posted in General Discussion read more
  • ccc

    how to specify a specific calendar

    What exactly does that mean? Can you provides some sample code of what you have working so far with a description of how you want to change it?

    The Apple docs for this function call are at https://developer.apple.com/documentation/eventkit/ekeventstore/1507479-predicateforeventswithstartdate?language=objc

    posted in Pythonista read more
  • ccc

    You mean that packages that support both Python 2 and Python 3 (like requests) are not interesting?
    Also packages that have no trove classifiers are not interesting?
    Clearly there are more than 2,000 PyPI packages that are interesting.

    posted in General Discussion read more
  • ccc

    https://pypi.org currently hosts 250,000 packages so I doubt that anyone is going to write down the subset that is pure Python.

    posted in General Discussion read more
  • ccc

    Please provide some sample code that raises the error so that we can all see what you are seeing.

    posted in Pythonista read more
  • ccc

    1. Give us some code that generates this error --and/or--
    2. Give us the full multiline error message (stack trace) so we can understand the context of the error.

    We do not even know the datatype of object.

    posted in Pythonista read more
  • ccc

    object has no attr _suspend_updates

    https://docs.python.org/3/library/functions.html are cool things to study as you learn Python. One of those is dir(object) which lists all the variables and methods of object. The message above means that dir(object) does not contain _suspend_updates but some code is assuming that it does. Practice a lot with dir(object) because it will help you to anticipate bugs.

    posted in Pythonista read more
  • ccc

        def move_enemy(self):
            orient = ''
            for enemy in self.enemy_on_screen:
                if not self.can_shoot_laser(enemy):      
                    if enemy.allow_move == "y":
                        orient = 'down' if enemy.position.y > self.player.position.y else 'up'
                        self.enemy_moving(orient, enemy)
                    elif enemy.allow_move == "x":
                        orient = 'left' if enemy.position.x > self.player.position.x else 'right'
                        self.enemy_moving(orient, enemy)
    

    posted in Pythonista read more
  • ccc

    Can you please provide sample code of what you have so far?

    posted in Pythonista read more
  • ccc

    @Karina said:

    colors = ['purple', 'red', 'blue', 'orange', 'yellow', 'green', 'lightblue']
    sw = get_screen_size()[0]
    sh = get_screen_size()[1]

    colors = ‘purple red blue orange yellow green lightblue'.split()
    sw, sh = get_screen_size()

    posted in Pythonista read more
  • ccc

    https://bottlepy.org is built into Pythonista.

    posted in Pythonista read more
  • ccc

    Multiple sample Sudoku puzzles would help to achieve a robust solution.

    posted in Pythonista read more
  • ccc

    For completeness...

    def button3_tapped(sender):
        hypotenuse = float(v['hypotenuse'].text or 0)
        short = float(v['short'].text or 0)
        long = float(v['long'].text or 0)
        angle = float(v['angle'].text or 0)
        try:
            short, long, hypotenuse, angle = triangle(short, long, hypotenuse, angle)
        except ValueError:
            v['mess'].text = "Enter two fields"
            v['mess'].background_color = 'red'
            v['mess'].text_color = 'white'
            return
        v['short'].text = str(short)
        v['long'].text = str(long)
        v['hypotenuse'].text = str(hypotenuse)
        v['angle'].text = str(angle)
    

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!