omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. nealtz

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 8
    • Posts 21
    • Best 0
    • Controversial 0
    • Groups 0

    nealtz

    @nealtz

    0
    Reputation
    1268
    Profile views
    21
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    nealtz Unfollow Follow

    Latest posts made by nealtz

    • RE: Pythonista 2.0: Pipista does not work after update!?

      Thanks for the help!

      You are right, I tried to run a script in a folder, but this worked without any problems before the update.

      Now I moved pipista into site-packages and the import from the script in the folder worked, but when the script tries to import a module from the pypi-modules folder I got the same error.

      I moved the pipy-modules folder into the site-packages folder but this doesn't change anything ... but wait I forgot that that site-packages folder has to be reload or something like that ... I will try now ...

      Edit: After reloading everything in the site-packages folder importing from pypi-modules is working again.

      Thanks for the help!

      posted in Pythonista
      nealtz
      nealtz
    • Pythonista 2.0: Pipista does not work after update!?

      After I upgraded to Pythonista 2.0 every script and even the console show the following error after the command "import pipista":

      >>> import pipista
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
      ImportError: No module named pipista
      

      The pipista.py script is still in the main directory and all modules are in the "pypi-modules" folder.

      Any hints to get get pipista support back?

      posted in Pythonista
      nealtz
      nealtz
    • Problems installing reportlab module: 'No module named future_buildins'

      I want to generate PDFs from SQLite output and found the ReportLab Toolkit. A search let me found this thread: Other ways to convert Markdown/HTML to PDF in iOS where hvmhvm wrote that he installed the reportlab module in Editorial. I thought this must also be possible with Pythonista and installed the module with the help from pipista and shellista.

      Then I tried to run the example script from the documentation:

      Edit: ! This testscript got messed up !

      import pipista
      from reportlab.pdfgen import canvas
      
      def hello(c):
        c.drawString(100,100,"Hello World")
      
      c = canvas.Canvas("hello.pdf")
      c.showPage()
      hello(c)
      

      In line 2 I got an 'ImportError: No module named future_buildins'

      I can't find a way to install the future_builtins module.

      Has anyone an idea how I can get reportlab working?

      posted in Pythonista
      nealtz
      nealtz
    • RE: Problems installing reportlab module: 'No module named future_buildins'

      Aaaargh!

      I don't know how it happend, but somehow my testscript got messed up. It should be:

      import pipista
      from reportlab.pdfgen import canvas
      
      def hello(c):
        c.drawString(100,100,"Hello World")
      
      c = canvas.Canvas("hello.pdf")
      hello(c)
      c.showPage()
      c.save()
      

      This script works with the 2.7 Version of reportlab and creates the 'hello.pdf' file ... :-) !

      posted in Pythonista
      nealtz
      nealtz
    • RE: Problems installing reportlab module: 'No module named future_buildins'

      I now realized that the user hvmhvm installed Version 2.7 of the reportlab module while I installed the actual Version 3.1.8. After I deleted Version 3.1.8 and installed Version 2.7 the testscript runs without any errormessages. But I can't find the 'hello.pdf' file that should be saved by the script.

      posted in Pythonista
      nealtz
      nealtz
    • RE: Moves API

      OK, here is my 'scrappy' script ;-) : Moves2DayOne.py

      I only extract location data from known locations and no transportation or other movement data because that's all I need.

      If anyone is interested in modifying the script:

      • API Documentation - Moves for Developers
      • Moves API–Google Groups
      posted in Pythonista
      nealtz
      nealtz
    • RE: Moves API

      I'm also a python newbie, but I already got a working script that extracts my daily location data from Moves and pushes it to Day One. I didn't published my script because I got my authentication working with a lot of trial and error and so I can work with my token, but I have no idea how to implement the authentication process in the script.

      posted in Pythonista
      nealtz
      nealtz
    • RE: Help installing pipista module in pythonista

      If your problem is that you can't import any new module in your code, you have to tell pythonista where to find it: The Module Search Path

      When you are using pipista, one simple way is to import pipista first in your code, after that the interpreter will automatically also search for modules in the 'pipista-modules' directory.

      posted in Pythonista
      nealtz
      nealtz
    • RE: Help installing pipista module in pythonista

      Did you already check the information in this thread 'Using pipista'?

      If the answer is 'Yes', please describe your problem more precisely. What exactly did you do to get this error massage (code or command examples)?

      posted in Pythonista
      nealtz
      nealtz
    • Problem with installing new module: pytz

      Because I need a way to convert time from CET (or CEST) to PST I want to use the pytz module. I'm a python beginner and after searching and trying a little bit with pipista and shellista I already downloaded and extracted the pytz module in pythonista.

      But I'm not sure if I've done everything right.

      After unzipping the pytz-2014.2.zip file I got a
      pytz (folder)
      pytz-egg-info (folder)
      and some other files.

      When I move everything in the pypi-modules folder my testscript doesn't work.

      import pipista
      from datetime import datetime
      from pytz import timezone
      
      fmt = "%Y-%m-%d %H:%M:%S %Z%z"
      
      # Current time in UTC
      now_utc = datetime.now(timezone('Europe/Berlin'))
      print now_utc.strftime(fmt)
      
      # Convert to US/Pacific time zone
      now_pacific = now_utc.astimezone(timezone('US/Pacific'))
      print now_pacific.strftime(fmt)
      
      # Convert to Europe/Berlin time zone
      now_berlin = now_pacific.astimezone(timezone('Europe/Berlin'))
      print now_berlin.strftime(fmt)
      

      When I run the script I get an UnknownTimeZoneError: 'Europe/Berlin' for line 8 (same happens if I use US/Pacific).

      Do I have to do anything else to 'install' the module?

      PS: I assume that it is possible to use pytz in pythonista because I found this statement.

      posted in Pythonista
      nealtz
      nealtz