Newbie Q

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Newbie Q

Victor Subervi
Hi;
I found out about this tool posting to python-list. I have an AS3 script that calls a python script to send an email. I got the AS3 online. I think it works because when I try to send an email in my Mac laptop, the AS3 script complains that it can't communicate with the server; however, when I try it online, it simply posts "sending message" and hangs there. On the python side, I can run the script from the command line and an email is sent off. So I need to try to figure out if the AS3 script is communicating with the python script. Ideally, I'd see something in a shell session with my server. How do I do this?
TIA,
Victor

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Newbie Q

Nick Joyce

On Saturday, 5 March 2011 at 3:29 AM, Victor Subervi wrote:

Hi;
I found out about this tool posting to python-list. I have an AS3 script that calls a python script to send an email. I got the AS3 online. I think it works because when I try to send an email in my Mac laptop, the AS3 script complains that it can't communicate with the server; however, when I try it online, it simply posts "sending message" and hangs there. On the python side, I can run the script from the command line and an email is sent off. So I need to try to figure out if the AS3 script is communicating with the python script. Ideally, I'd see something in a shell session with my server. How do I do this?
TIA,
Victor
Hi,

How does the AS3 'call' the python script?

If it uses AMF then you can use an http proxy like Charles - charlesproxy.com - which will give you all the debugging information you require. This will show you if the AS3 running in the browser is actually connecting to the Python server.

If you're using a PyAMF gateway, you can supply a logging.Logger instance to the keyword arg logger, e.g.:

import logging
from pyamf.remoting.gateway.wsgi import WSGIGateway

services = {}
logging.basicConfig()

gw = WSGIGateway(services, logger=logging)

Hope that helps.

Nick

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Newbie Q

Victor Subervi
Thank you. "Charles" is now a friend of mine ;)
Beno

On Fri, Mar 4, 2011 at 7:06 PM, Nick Joyce <[hidden email]> wrote:

On Saturday, 5 March 2011 at 3:29 AM, Victor Subervi wrote:

Hi;
I found out about this tool posting to python-list. I have an AS3 script that calls a python script to send an email. I got the AS3 online. I think it works because when I try to send an email in my Mac laptop, the AS3 script complains that it can't communicate with the server; however, when I try it online, it simply posts "sending message" and hangs there. On the python side, I can run the script from the command line and an email is sent off. So I need to try to figure out if the AS3 script is communicating with the python script. Ideally, I'd see something in a shell session with my server. How do I do this?
TIA,
Victor
Hi,

How does the AS3 'call' the python script?

If it uses AMF then you can use an http proxy like Charles - charlesproxy.com - which will give you all the debugging information you require. This will show you if the AS3 running in the browser is actually connecting to the Python server.

If you're using a PyAMF gateway, you can supply a logging.Logger instance to the keyword arg logger, e.g.:

import logging
from pyamf.remoting.gateway.wsgi import WSGIGateway

services = {}
logging.basicConfig()

gw = WSGIGateway(services, logger=logging)

Hope that helps.

Nick

_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users



_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Loading...