• huub

    console.set_font sets the size of the OUTPUT font. I like that a lot as a larger font size is easier on my eyes. However, is there a way to increase the size of the font in the INPUT line ( the line above the keyboard)?

    posted in Pythonista read more
  • huub

    Thank you very much for this discussion, I understand a lot more abuot the mechanisms behind imports and sys.path and I believe that I can solve or at least work around most issues. However, I think it is a good idea to provide a bit more control about the contents of sys.path.

    Would it be possible to add a setting where you can check for each directory in your user space if it has to be included in sys.path?

    posted in Pythonista read more
  • huub

    Dgelessus was right, the directory from which the last script was run is the first entry in sys.path. This inspired the following workaround: put an empty script in the directory from which you want to import. Run it, and the directory is on the path. You can import modules from that directory!

    posted in Pythonista read more
  • huub

    No, Documents is not on the path at all. Strange that we have different paths... I was aware of site-packages but it is much easier to develop in anorher directory and import directly from there. When the module is complete it can be moved to site-packages.

    Thanks for the tip about os.path.expanduser! I considered adding a directory to sys.path but typing an absolute path is nearly impossible. Expanduser makes it possible.

    Thanks!

    posted in Pythonista read more
  • huub

    These are the directories in sys.path (slghtly edited to remove the prefix from root to app):

    /Documents/Examples/Animation
    /Documents/site-packages
    /Pythonista.app/Frameworks/PythonistaKit.framework/pylib
    /Pythonista.app/Frameworks/PythonistaKit.framework/pylib_ext
    /Pythonista.app/Frameworks/PythonistaKit.framework/pylib/site-packages
    /Pythonista.app/Frameworks/PythonistaKit.framework/pylib/site-packages/PIL_compat

    Documents itself is not on the path, neither are its subdirectories. Is this a bug? Is it possible to add directories to the path?

    posted in Pythonista read more
  • huub

    Hi,

    Although not at all new to programming, I am new to Python(ista). Let me state upfront that I am really impressed. There are only a few full fledged programming environments for iOS and Pythonista is one of the best. However, I have a few questions.

    If I understand correctly there is only little difference between scripts and modules. Both are files with a .py extension. Scipts contain definitions and executable statements (but there are exceptions) and modules contain only definitions (but there are exceptions).

    I used the script editor to create a .py file and tried to import it as a module in the interactive prompt. However I get an error message that no module with that name can be found.

    How can I define a module and import it in a script or in the interactive prompt?

    Thanks for any help!

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!