xmlrpc and auth-digest
Hi all, this may have been asked before, but as a newbie with xmlrpc i can't find any suitable info on that. Sorry. I am trying to write a simple xmlrpc-client in python and the server i am trying to receive data from requires http auth digest. The info on xmlrpclib covers auth basic thrugh url econding such as "user:[EMAIL PROTECTED]", but no auth digest. Is there any other library i could use for that or can i write some sort of wrapper around this using a differnt library like urllib? TIA, Tom -- http://mail.python.org/mailman/listinfo/python-list
xmlrpc an auth-diget
Hi all, this may have been asked before, but as a newbie with xmlrpc i can't find any suitable info on that. Sorry. I am trying to write a simple xmlrpc-client in python and the server i am trying to receive data from requires http auth digest. The info on xmlrpclib covers auth basic thrugh url econding such as "user:[EMAIL PROTECTED]", but no auth digest. Is there any other library i could use for that or can i write some sort of wrapper around this using a differnt library like urllib? TIA, Tom -- http://mail.python.org/mailman/listinfo/python-list
newby question: Splitting a string - separator
Hi all, i am having a textfile which contains a single string with names. I want to split this string into its records an put them into a list. In "normal" cases i would do something like: > #!/usr/bin/python > inp = open("file") > data = inp.read() > names = data.split() > inp.close() The problem is, that the names contain spaces an the records are also just seprarated by spaces. The only thing i can rely on, ist that the recordseparator is always more than a single whitespace. I thought of something like defining the separator for split() by using a regex for "more than one whitespace". RegEx for whitespace is \s, but what would i use for "more than one"? \s+? TIA, Tom -- http://mail.python.org/mailman/listinfo/python-list
Re: newbie question concerning formatted output
Hi all, thanks for all your answers. Is see that there are - as ususal - several ways to accomplish this. I decided to go for the way Frederik suggested, because it looked as the most straight forward method for that kind of data. Thanks again, ./Tom -- http://mail.python.org/mailman/listinfo/python-list
newbie question concerning formatted output
Hello all, i am having some hard time to format the output of my small script. I am opening a file which containes just a very long string of hexdata seperated by spaces. Using split() i can split this string into single words and print them on stdout. So far so good. But i want to print always three of them in a single line and after that a linebreak. So instead of: 3905 3009 4508 f504 3707 5a07 etc... i'd like to have: 3905 3009 4508 f504 3707 5a07 etc... This is the codesnippet i am using: #!/usr/bin/python import string inp = open("xyplan.nobreaks","r") data = inp.read() for words in data.split(): print words inp.close() Any hints? TIA, ./Tom -- http://mail.python.org/mailman/listinfo/python-list