Forums

Direct hosting of XMLRPC?

Hi all, I've got an XMLRPC app written in Python 3 that works pretty well when launched as a script and given the external hostname (i.e. foo.bar.com) and a port number: it launches and listens on that port and serves as usual for the builtin SimpleXMLRPCServer class. I tried launching from a bash console on port 9999 which is outside the reserved list, and it couldn't bind.

Do I have to rewrite the code to fit into a wsgi script (which I don't have the energy to do) in order to host it publicly on pythonanywhere? My only other option at this stage is to use a localhost->subdomain tunnelling service.

For reasons of making-a-point I wrote the code to be as brief and crunchy as possible: while this is great and all for proving a point, it's a nightmare to refactor, so fitting it into a web application framework isn't worth the bother.

Hello,

At this point I don't think PA supports binding apps to external ports, any communication needs to be through a WSGI wrapper.

But I'm sure the developers can give you a more complete answer

rcs1000 is completely correct. If you did manage to bind to a free port you still wouldn't see any of the incoming traffic. It's already going to be dropped at the edge of our network.

Though if you wanted to post the code I bet one of us could turn it into a flask/bottle application in a couple of minutes...

Welcome to PA cathalgarvey...It's good to have you here.

rcs1000 is right, but the PA staff have talked about the possibility of adding such an ability in the future. Perhaps you should ask to have it up voted if you want it...☺

Ack...I cross-posted with hansel. I guess I'm too slow today!!

Hi all, Thanks for your help! I've since hosted the script instance through pagekite, but I'd be delighted to see a wsgi-mod of the script if anyone who speaks wsgi is keen. It's all GNU Affero, and the repositories are here: https://github.com/cathalgarvey/tinystatus https://gitorious.org/tinystatus/tinystatus

I've got a testbed server on https://tinystatus.pagekite.net if anyone's interested. :)

I've just had a look at your code. You're a sick individual. That's not taking me 15 minutes. My only question is: Why didn't you just write it in Brainfuck?

I was going to say, hey Hansel, that's a bit harsh... But then I looked at the code ;-)

Oh yes, don't take it the wrong way cathalgarvey! It was intended as a compliment to your obviously fiendish skills of making something as brief and crunchy as possible :-)

Seeing obfuscated Python is a bit like seeing graffiti on a beautiful statue... Sniff. (^_^)

damn, i'm asshamed of my code now, lol