Forum Archive

Problem with console.write_link()

steffen84

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

ccc

Hi steffen, Can you please provide some sample code?

IETDPCTEP

steffen84

import console

print('Text before link')

console.write_link('http://www.google.com', 'Google')

print(' Text after link')

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'.

steffen84

Seems to be a threading problem. When I add

time.sleep(0.01)

before write_link() the problem doesn't appear.

omz

Thanks, I'll look into it.