need advice on building core code for python and PHP

Szabolcs Nagy nszabolcs at gmail.com
Thu May 24 13:33:21 EDT 2007


> Is there a way I could code the base (core) code in Python and have
> PHP call it?  I've really liked using SQLAlchemy and there are other

* quick and dirty solution:
in a shell:
  $ python yourscript.py <pipe_in >pipe_out
in the php script:
  fwrite(pipe_in, input_data);
  results = fread(pipe_out, sizeof_results);

* simple and nice solution:
  do not ever use php




More information about the Python-list mailing list