Panda3d and python-based web framework

Hi
I have some experiences with python and pyramid, and now i just start to learn panda3d.
But i wanna know is it possible to use python standard (or even 3rd party) libraries to make connection between a p3d file (which plays in web) and server side application written in pyramid or another python web framework?
i.e. p3d get current session user name from server variable and show it in 3d way.
Thanks.

Yes, but this has little to do with Panda. You’ll do well to study a Javascript or AJAX tutorial, since that’s the technology you’ll be most likely using.

The reason it doesn’t really involve Panda is that your p3d file is running in a Python process locally on the client computer, which is a different computer than the server. So there’s no direct communication between client and server. Instead, you have to go through the web interfaces, and AJAX might be the easiest way to do this.

David

Yeah, i’m familiar with js and ajax, but i’m more curious about p3d side and the way i could pass js variable into it.
In a swf for example there is socket or external interface package to communicate with javascript or server.

—Edit—
Ok, i think i found the answer:

Thanks.

Right, and there’s also base.appRunner.dom, which might be even more convenient for the purpose of calling into JavaScript from Python.

David