Re: Comm. between Python and PHP

2005-02-23 Thread Nils Emil P.Larsen
Hello

Python is perfectly capable of generating HTML.  You don't have to demean
yourself by working in PHP.

Thanks for the tip about using Python instead of PHP to generate web
pages. I may follow it.

Nils Emil
--
My reply-address is valid.   www.bios-flash.dk
Min svar-adresse er gyldig.  Redning af døde BIOS'er
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Comm. between Python and PHP

2005-02-23 Thread Nils Emil P.Larsen
Hello

Sorry for not being too exact in my request!

If the data you want to pass is structured then you might consider
XML-RPC which is a cross platform way of passing structured data

XML-RPC looks like something very suitable for my needs. It seems
Python handles the remote procedure calls very easily (almost like
local functions).
It also works quite well in PHP. I didn't recompile anything but
downloaded Keith Devens XML-RPC Library (500 lines code). With this I
can call RPC-functions almost as easily as with Python. It took me
just about an hour to get it working...

Thanks everybody!

Nils Emil P. Larsen


--
My reply-address is valid.   www.bios-flash.dk
Min svar-adresse er gyldig.  Redning af døde BIOS'er
-- 
http://mail.python.org/mailman/listinfo/python-list


Comm. between Python and PHP

2005-02-22 Thread Nils Emil P.Larsen
Hello

I'm building a daemon in Python. It will measure and control some
physical devices on a serial bus. Since it is a daemon, it will never
terminate and I can't interfere with the regulation of the devices by
using command line parameters. I want to control the regulation by
using a Internet browser.

What is the easiest way to make my threaded Python daemon communicate
with a PHP-script running from Apache2 on localhost?

Thank you so far!

Nils Emil P. Larsen
--
My reply-address is valid.   www.bios-flash.dk
Min svar-adresse er gyldig.  Redning af døde BIOS'er
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Keyboard problems with Python shell over SSH

2005-01-24 Thread Nils Emil P.Larsen
Hello Stian

Your Python installation is probably compiled without readline support. 
It is the readline library that enables arrow keys and Ctrl-R and stuff 
to work.
Try import readline - you will probably get an error.

You are indeed right. import readline generated an error.

I downloaded, compiled and installed GNU readline.
Then I downloaded Python 2.4 source and configured it with
./configure --with-readline
make
make install

This did the trick!
Thank you!

Nils Emil P. Larsen
--
My reply-address is valid.   www.bios-flash.dk
Min svar-adresse er gyldig.  Redning af døde BIOS'er
-- 
http://mail.python.org/mailman/listinfo/python-list


Keyboard problems with Python shell over SSH

2005-01-23 Thread Nils Emil P.Larsen
Hello

I'm not sure this is Python-related but it might be since Bash and vim
works perfectly.

I connect to my server using SSH and then run 'python' to enter the
shell.  I can't use the arrow buttons (up, down, left and right).
Instead I get this ^[[A , ^[[B,  ^[[C or  ^[[D.

How do I get my arrow buttons to work?

Sorry if this is offtopic.

Nils Emil P. Larsen

--
My reply-address is valid.   www.bios-flash.dk
Min svar-adresse er gyldig.  Redning af døde BIOS'er
-- 
http://mail.python.org/mailman/listinfo/python-list