omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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.


    Problem with console.write_link()

    Pythonista
    3
    5
    3090
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • steffen84
      steffen84 last edited by

      Hi all,

      In Pythonista 1.4 I have problems with console.write_link(). Sometimes it doesn't use the previously set font and color. Sometimes, when mixed with print(), the link is printed before a previously printed text.

      Can someone confirm this? Is there a solution?

      iOS 7.0.4 on iphone4

      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by

        Hi steffen, Can you please provide some sample code?

        IETDPCTEP

        1 Reply Last reply Reply Quote 0
        • steffen84
          steffen84 last edited by

          <code>import console

          print('Text before link')<br>
          console.write_link('http://www.google.com', 'Google')<br>
          print(' Text after link')
          </code>

          Normally it works the first time when this script is started. When I hit clear and start the script again, the link appears before the 'Text before link'.

          1 Reply Last reply Reply Quote 0
          • steffen84
            steffen84 last edited by

            Seems to be a threading problem. When I add

            <code>time.sleep(0.01)</code>

            before write_link() the problem doesn't appear.

            1 Reply Last reply Reply Quote 0
            • omz
              omz last edited by

              Thanks, I'll look into it.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB Forums | Contributors