• daveaiello

    I'm generally upset about how many of my comments on this Forum are failing to get by Akismet. I have written several replies of moderate length that I can't figure out how to post.

    posted in General Discussion read more
  • daveaiello

    @scj643 Yes, I know that. I was asking if Dash for iOS was a good solution, considering that I am comfortable with Dash 3 on MacOS.

    posted in General Discussion read more
  • daveaiello

    Thanks! I was thinking I could create a gist.

    I just thought that 17 lines of code could be inlined in a comment, because I had previously posted 11 of these lines of code and that hadn't been an issue.

    posted in General Discussion read more
  • daveaiello

    In case anybody has a similar issue to mine, here's a link to a gist showing the completed script: add-contact.py.

    posted in Pythonista read more
  • daveaiello

    When I am coding on my Mac, I use Dash to quickly review language and API reference material. I find that I need the same materials when I am using Pythonista, but the Pythonista documentation seems to be APIs only.

    What is the most effective / useful iOS-based reference material for the Python language?

    posted in General Discussion read more
  • daveaiello

    I wanted to post a block of Python code as a response to a Pythonista forum thread, but I was unable to do it. The site responded:

    Error
    
    Post content was flagged as spam by Akismet.com.
    

    How do I work around this?

    posted in General Discussion read more
  • daveaiello

    Thank you so much Ole!

    I'm on the road right now, but I will try to incorporate your example into my script when I return.

    posted in Pythonista read more
  • daveaiello

    I'm brand new to Pythonista, and a fairly new Workflow user.

    I'm trying to create a contact by passing certain data elements on the clipboard from a running workflow. Someone on the Workflow subreddit said that running a Pythonista script was the best way to do it, and offered the following code in a gist:

    import contacts
    import clipboard
    import webbrowser
    
    name = clipboard.get().split(',')
    pers = contacts.Person()
    pers.first_name = name[0]
    pers.last_name = name[1]
    contacts.add_person(pers)
    contacts.save()
    webbrowser.open('workflow://')
    

    My use is focused on creating contacts that exclusively contain information about businesses. So what I want to do is create a Person() that contains:

    • organization
    • work address
      ** street
      ** city
      ** state
      ** zip
    • phone
      ** main_phone
    • URL

    My modified code begins as follows:

    import contacts
    import clipboard
    import webbrowser
    
    name = clipboard.get().split('|')
    pers = contacts.Person()
    pers.organization = bytes(name[0], encoding='UTF-8')
    

    But then I get hung up on how to create an address, because I don't understand how to create Person.address from just reading the docs and reading through this forum.

    Thanks for any guidance you can provide.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!