• djorge

    @cvp thanks. Will install the previous version

    posted in Pythonista read more
  • djorge

    Hi,
    I have the latest beta installed.
    I already installed pythonista keyboard and game him full access.

    The problem is that the keyboard does not appear whenever i choose pykeys in the keyboard selector.

    I had no problem in the previous beta.

    Thanks in advance
    David

    posted in Pythonista read more
  • djorge

    @tomkirn
    Thank you
    You save my day

    posted in Pythonista read more
  • djorge

    Hi,
    I have sent a html file to pythonista to inspect the html and now whenever I open pythonista I can see the tab with the imported file but the UI becomes unresponsive and pythonista crashes after some secconds.

    Is there anything I can do to fix this without deleting and installing again? I didn't backup some scripts.

    Thanks in advance
    David

    posted in Pythonista read more
  • djorge

    @cvp it worked. Thanks

    posted in Pythonista read more
  • djorge

    @cvp
    Thanks for the tip. I will try that.

    posted in Pythonista read more
  • djorge

    Hi,
    I have a little script which takes csv from input and appends its content to a csv file selected with pick_document (csv file belongs to an external source- fe file explorer pro).

    I can open the file selected with pick_document but I can't append to it. Is this a ios limitation?

    I noticed that the selected file is being read from ......tmp/com.omz-software.Pythonista3.PythonistaAction3-Inbox/transactions_201810.csv

    So, that means that the file is a copy of the file from the selected source?

    append to: /private/var/mobile/Containers/Data/PluginKitPlugin/5C643C43-8EF4-45EC-B978-04E6EE7503FC/tmp/com.omz-software.Pythonista3.PythonistaAction3-Inbox/transactions_201810.csv

    Thanks in advance
    David

    posted in Pythonista read more
  • djorge

    @cvp
    Thats weird. I'm importing appear and using webbrowser.open with that URL and it doesn't complain.

    posted in Pythonista read more
  • djorge

    Hi,
    I was trying to check whether it is possible to use the requests module in widget but somehow the widget displays an error saying that there was an error loading the widget.

    I though the problem was with my widget but I get the same error if I add the module requests to then widget example Launcher that comes with pythonista.

    Is this not supported?

    To overcome this problem I was trying to run a script called from the widget itself (that use the requests module). Does anyone knows how to do it without using 'webbrowser.open' which opens pythonista in the foreground?

    posted in Pythonista read more
  • djorge

    @cvp thanks for sharing

    posted in Pythonista read more
  • djorge

    Hi,
    Where can i get some of those pythonista extension like Import Any File or Import file from web?

    Thanks,
    David

    posted in Pythonista read more
  • djorge

    @zrzka thanks a lot

    posted in Pythonista read more
  • djorge

    Hi,
    In the UI editor after selecting and copying 2 ui items I am not able to paste them. The menu paste does not appear.

    I was able to paste in the previous version.
    Can someone confirm this problem?

    I'm using the latest version from the app store.

    David

    posted in Pythonista read more
  • djorge

    @cvp this solution also solved my problem. Thank you

    posted in Pythonista read more
  • djorge

    @Phuket2 adding w+ solved the problem. Thank you very much to all.

    posted in Pythonista read more
  • djorge

    Hi,
    I'm struggling with a weird problem with saving xml a file.
    I tested this in a pc and the file is created with the xml.

    In pythonista the file is created but it is empty.
    What might be the problem?

    Here is the simple code:

    #coding: utf-8
    #!python2
    
    import xml.etree.ElementTree as et
    
    substring_xml_file = u"Category_Substring_test.xml"
    cat = "Compras"
    descricao_str_r = "Supermercado"
    
    root = et.Element("root")
    
    
    a = et.SubElement(root, u"CategoryEntry")
    a.set(u"Category", cat)
    a.set(u"Payee", " ")
    a.set(u"SubString", descricao_str_r)
    
    f = open(substring_xml_file, "w")
    
    tree = et.ElementTree(root)
    tree.write(f, encoding=u"UTF-8", xml_declaration=True)
    
    #Category_Substring_test.xml content should be:
    '''
    <?xml version='1.0' encoding='UTF-8'?>
    <root><CategoryEntry Category="Compras" Payee=" " SubString="Supermercado" /></root>
    '''
    

    posted in Pythonista read more
  • djorge

    Solved my problem.
    Added a new method to set the new data to existing widget.

    My update view method is the one that uses the new data.

    def set_data(self,new_data):
        self.dia= new_data
        self.update_view()
          
      def refresh_data(self,sender):
        shelve_file  = shelve.open('data')
        dia = shelve_file['dia']
        self.set_data(dia)
    

    David

    posted in Pythonista read more
  • djorge

    Hi,

    What is the best way to update the content load by a widget?

    Let me explain:

    I have a script that parses a pdf file and creates a file with data that is then loaded by my widget.

    Whenever a receive a newer pdf file I parse it but I need to refresh my widget with the new data.

    What I am doing is:

    def refresh_data(self,sender):
      shelve_file = shelve.open('data')
      dia = shelve_file['dia']
      v = appex.get_widget_view()
      v = EmentaView(dia)
    

    When this code is executed I get a message ‘could not load’, then I tap again the widget ant it refreshes the data.

    In the end my widget appear refreshed but this is not the correct way due to the error message.

    posted in Pythonista read more
  • djorge

    Hi, thanks for your answer.

    I did solve my problem some time ago. In my case the problem was related with a module called holidays.

    Somehow this was causing the 'could not load' problem. What I did was to import the module in other place and since thenni never got that message again.

    David

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!