• ccc

    Even better...

    grid = [['.', '.', '.', '.', '.', '.'],
            ['.', 'O', 'O', '.', '.', '.'],
            ['O', 'O', 'O', 'O', '.', '.'],
            ['O', 'O', 'O', 'O', 'O', '.'],
            ['.', 'O', 'O', 'O', 'O', 'O'],
            ['O', 'O', 'O', 'O', 'O', '.'],
            ['O', 'O', 'O', 'O', '.', '.'],
            ['.', 'O', 'O', '.', '.', '.'],
            ['.', '.', '.', '.', '.', '.']]
    
    for row in grid:
        print('  '.join(row))
    
    print()
    

    posted in Pythonista read more
  • ccc

    I tend to just avoid regex like the plague that it is...

    s.replace('\n\n', '<<<!?!>>>').replace('\n', ' ').replace('<<<!?!>>>', '\n\n')
    

    posted in Editorial read more
  • ccc

    More Pythonic to write...

    grid = [['.', '.', '.', '.', '.', '.'],
            ['.', 'O', 'O', '.', '.', '.'],
            ['O', 'O', 'O', 'O', '.', '.'],
            ['O', 'O', 'O', 'O', 'O', '.'],
            ['.', 'O', 'O', 'O', 'O', 'O'],
            ['O', 'O', 'O', 'O', 'O', '.'],
            ['O', 'O', 'O', 'O', '.', '.'],
            ['.', 'O', 'O', '.', '.', '.'],
            ['.', '.', '.', '.', '.', '.']]
    
    for column in grid:
        print()
        for row in column:
            print(row)
    
    print()
    

    posted in Pythonista read more
  • ccc

    @scotttmiller I would be happy to pay you the $10 back if you create a working version of Pandas in an iOS app and publish it to the AppStore for $10. Please let me know.

    posted in Pythonista read more
  • ccc

    It would be an awesome idea if @omz released a new version of Pythonista with all/most modules upgraded to their current versions.

    posted in Pythonista read more
  • ccc

    This is awesome work!!! Thanks to all involved.

    StaSh now supports python 3, though some commands still need to be ported.

    Is there a list somewhere of those commands that still need to be ported?

    posted in Pythonista read more
  • ccc

    Are you sure you are running on Python 3?

    posted in Pythonista read more
  • ccc

    Why not provide us with the code that you have written so far? That would help us to see what you are seeing without having to rewrite it.

    str.replace(substr, ‘’) might be part of the solution.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!