marshalling python data structures in php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sridhar R

    marshalling python data structures in php

    Hi,

    I have written in network project in python. the client sends a
    dictionary by pickling it over the socket and the server unpickles it.
    I also need a webclient for this. So I am wondering how to create
    python dictionary in PHP and pickle it and send it to the server
    running in python.

    any thoughts?
  • Jon-Pierre Gentil

    #2
    Re: marshalling python data structures in php

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Sridhar R wrote:
    | Hi,
    |
    | I have written in network project in python. the client sends a
    | dictionary by pickling it over the socket and the server unpickles it.
    | I also need a webclient for this. So I am wondering how to create
    | python dictionary in PHP and pickle it and send it to the server
    | running in python.
    |
    | any thoughts?

    Sounds utterly hard. You'd have to implement the Pickle module in PHP
    and devise a way to convert a PHP associative array into a pickled
    Python dictionary.

    Instead what I would suggest that you do is to write your webclient in
    Python using mod_python/Zope/Twisted.Web/etc...

    - --
    :: Jon-Pierre Gentil
    :: PGP Key ID 0xA21BC30E
    :: Jabber: jgentil@jabber. org
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)
    Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

    iEYEARECAAYFAkB pGLoACgkQOrVFma Ibww5k7ACgkpQ+T cbKQXoqo2JtAWW6 dN4U
    cokAn2hppk37ilK cM1hAu7J9X4N2Q4 8r
    =8OAg
    -----END PGP SIGNATURE-----

    Comment

    • Diez B. Roggisch

      #3
      Re: marshalling python data structures in php

      > any thoughts?

      Use xmlrpc or soap or corba - these are designed for inter-language
      operations. There is no need to reinvent the wheel.

      --
      Regards,

      Diez B. Roggisch

      Comment

      Working...