Another SimpleXMLRPCServer question.

2006-04-18 Thread Jose Carlos Balderas Alberico
Let's hope this is my last question on the matter. I'm implementing a SimpleXMLRPCServer, and last week I had a problem John helped me solve. The thing is that my server is to be called from a remote machine, so when declaring the instance, the line ("localhost", 8000) wouldn't work because it woul

Working with files in a SimpleXMLRPCServver

2006-03-31 Thread Jose Carlos Balderas Alberico
I'm setting up a server accepting XML-RPC calls using the SimpleXMLRPCServer class. Basically, what I have to do is send a zip-compressed file to the server, have the server unzip it and process it, after processing it the server is supposed to zip the file again, and send it back to the client.  

Re: Working with files in a SimpleXMLRPCServer

2006-03-31 Thread Jose Carlos Balderas Alberico
Oops, I'm afraid I replied to Brian only instead of to the whole distribution list. I copy the message I sent to him so that everyone can read it:I'm afraid I cannot use the zlib library provided by Python, since the ZIP files I'm supposed to send must be password-protected, and I haven't been able

Sending a file to a remote server.

2006-04-02 Thread Jose Carlos Balderas Alberico
Hi. I posted a message in the list a couple of days ago about sending a file to a remote SimpleXMLRPCServer. Well. my doubt still remains, so I come to you again in search of a clearer answer.The thing is I want to send a ZIP file to a server, and what I basically do is enclose the file data into a

Problem connecting Python with PostgreSQL

2006-04-05 Thread Jose Carlos Balderas Alberico
Hello. I have a problem connecting to a PostgreSQL database and I don't know where the problem lays.   A bit of background:   I installed the psycopg module yesterday (it was a bit of a pain to do it since I installed the wrong version and it didn't work). I got to install it in the end anyway.  

Handling IP addresses with SimpleXMLRPCServer.

2006-04-06 Thread Jose Carlos Balderas Alberico
Hello. I' m trying to use the client's IP address in a method defined inside the SimpleXMLRPCServer. Up till now I'm able to verify that the client's IP is an authorised one (I do this before calling the _dispatch method). I can redefine the _dispatch method extending the SimpleXMLRPCHandler class,

Converting Integer to String

2006-04-06 Thread Jose Carlos Balderas Alberico
Hello. I'm trying to turn an integer into a string, and the "repr" function doesn't work the way I want.   The repr function inserts a '\n' at the end of the string, and I need to get the string representation without the '\n', since I need to insert the stringed data into a sql query.   I get "SEL

Re: Converting Integer to String

2006-04-06 Thread Jose Carlos Balderas Alberico
7;t know, but I don't get the \n when I execute str or repr in the python command shell.   It's weird...        2006/4/6, Wesley Brooks <[EMAIL PROTECTED]>: Jose Carlos,str(234) gives '234'Is that what your after?Wesley. On 06/04/06, Jose Carlos Balderas Alberico < [

Re: Converting Integer to String

2006-04-06 Thread Jose Carlos Balderas Alberico
ves '234'Is that what your after?Wesley. On 06/04/06, Jose Carlos Balderas Alberico < [EMAIL PROTECTED]> wrote: Hello. I'm trying to turn an integer into a string, and the "repr" function doesn't work the way I want.   The repr function inserts a '

Beginner question. Exceptions

2006-04-12 Thread Jose Carlos Balderas Alberico
Hello. I'm having my way with exceptions in a little program I've done, and I'm wondering... What is a decent way of dealing with them? By a decent way I mean, what should I do when I see that an exception has occurred? I've seen that Python's default action is to print a stack trace. As far as I k

Can't connect to SimpleXMLRPCServer. Help needed.

2006-04-12 Thread Jose Carlos Balderas Alberico
Up till now I've been setting up my server and client in the same machine, using the "localhost" address for everything. Once I've made it work, I need to move my client application to the computer where it'll be run from, and for some reason, I get a socket.error: (111, 'connection refused').   Th

Re: Can't connect to SimpleXMLRPCServer. Help needed.

2006-04-12 Thread Jose Carlos Balderas Alberico
at a loss here. Thank you very much for your attention.   Jose Carlos.       2006/4/12, John Abel <[EMAIL PROTECTED]>: Your server is only listening on 127.0.0.1.Jose Carlos Balderas Alberico wrote: > Up till now I've been setting up my server and client in the same> machine, usin

Re: Can't connect to SimpleXMLRPCServer. Help needed.

2006-04-12 Thread Jose Carlos Balderas Alberico
n for this?   Thank so much.   Jose Carlos   2006/4/12, Jose Carlos Balderas Alberico <[EMAIL PROTECTED]>: Thank you for the quick reply John... Is there a way to sort this out? Should I specify another address here:   server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost", 800