I've some Python scripts which i operate on my desktop let's focus on dicing files. I wish to place them web write an easy front-finish in PHP in which a user uploads personal files which is passed being an argument to some python script on the internet server which is prepared in portions and also the user can re-download the portions.

I understand a respectable amount of PHP, but I don't see:

  1. How you can mix PHP and Python programmatically

  2. Can you really possess a web page in python that may just call the python script? Is one able to possess a GUI page that's like zzz.com/text.py as example

  1. For http demands, you have to set your internet server to give certain request to PHP yet others to Python. From inside PHP's scripts, if you want to call some Python executable scripts, play one of PHP's spend functions. e.g. professional()

  2. Yes it's possible. The djangobook is a fairly tutorial that covers this within the earlier sections. It demonstrates how to operate python like a cgi or with apache.

On the personal note, for those who have time for you to search much deeper into Python, I'd strongly encourage you to definitely perform the whole factor inside it, instead of mix things with PHP. My experience informs me that you will find most likely more cases when a PHP application needs some Python support as opposed to the reverse.

When the supporting language can perform exactly what the primary language does, what's the purpose of while using primary language?