Re: [Tutor] unicode ordinals to/from utf8

2009-12-26 Thread Kent Johnson
On Sat, Dec 26, 2009 at 10:41 AM, spir wrote: > OK, I'll answer myself ;-) > Found needed information at http://www1.tip.nl/~t876506/utf8tbl.html > See below new version, I'm not at all sure what you are trying to do here. Is it more than conversion between unicode and utf-8? It looks like you ha

Re: [Tutor] using mechanize to authenticate and pull data out of site

2009-12-26 Thread David Abbott
On Sat, 2009-12-26 at 16:46 +0100, Norman Khine wrote: > Hello, > > I am trying to authenticate on http://commerce.sage.com/Solidarmonde/ > using urllib but have a problem in that there are some hidden fields > that use javascript to create a security token which then is passed to > the submit but

Re: [Tutor] interactive questions

2009-12-26 Thread Alan Gauld
"rick" wrote Somehow you are picking up an older v2 interpreter. How are you running the script? Could geany be calling the 2.6 interpreter, even with v3 in the first line? oh my, that is unexpected, just tried it. #!/usr/bin/python3 import sys print(sys.version) from geany yields: 2.6.

Re: [Tutor] oo design/interaction quandary

2009-12-26 Thread Alan Gauld
"Brian Jones" wrote My app launches threads that each consume messages from a queue, send them to a processor object, and then the processor needs to return the message to the main thread -- if the processing was successful -- and then the main thread puts the message into a different queue.

[Tutor] using mechanize to authenticate and pull data out of site

2009-12-26 Thread Norman Khine
Hello, I am trying to authenticate on http://commerce.sage.com/Solidarmonde/ using urllib but have a problem in that there are some hidden fields that use javascript to create a security token which then is passed to the submit button and to the header. Here is the output of the LiveHeader during

Re: [Tutor] unicode ordinals to/from utf8

2009-12-26 Thread spir
OK, I'll answer myself ;-) Found needed information at http://www1.tip.nl/~t876506/utf8tbl.html See below new version, Denis la vita e estrany http://spir.wikidot.com/ = # coding: utf8 import sys ; end = sys.exit # constant max_co

Re: [Tutor] Error writing to file...

2009-12-26 Thread ALAN GAULD
> The docs say > > "write( str) - Write a string to the file." > > Only a string. Regardless of mode. > Mode mostly affects interpretation of line ends. Thats true of course, you need to encode the binary data with struct to write it as binary. Alan G.