Re: Using Python with a website

2018-07-05 Thread Alister via Python-list
On Wed, 04 Jul 2018 23:25:14 +, Adrian Taylor wrote:

> G'day All,
> 
> I have just discovered Python and thanks to a script by Ethan I can read
> a foxpro database and change the required values.
> However my next big step is to be able to use this python feature within
> a website.
> 
> Basically I want to be able to click on a button and call the script.
> This would in turn display some information on the webpage but do what
> it needs to do on the server.
> I have setup Apache and it all works on the server, my stumbling block
> is calling it from a website.
> 
> I am using Server 2012 R2 Python 3.7 Apache 2.4 I can run the Python
> scripts from the command line prompt.
> 
> Can anyone help?
> 
> Regards,
> Adrian Taylor InfoHub - ICT - Helpdesk
> 
> 
> 
> A : 5 Faith Avenue, Plainland , QLD 4341 T : 07 5466 9900 E :
> atay...@faithlc.qld.edu.au
> W : www.faithlc.qld.edu.au
> 
> [cid:image005.png@01D2CD7E.0F6F4710]
> 
> 
> 
> The information contained in this e-mail message and any attached files
> may be confidential information, and may also be the subject of legal
> professional privilege. If you are not the intended recipient any use,
> disclosure or copying of this e-mail is unauthorised. If you have
> received this e-mail in error, please notify the sender immediately by
> reply e-mail and delete all copies of this transmission together with
> any attachments.

start by looking up uwsgi




-- 
Sun in the night, everyone is together,
Ascending into the heavens, life is forever.
-- Brand X, "Moroccan Roll/Sun in the Night"
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Using Python with a website

2018-07-04 Thread Ben Finney
Adrian Taylor  writes:

> I have just discovered Python […]

Welcome. The Python community has a starter page for beginners at
https://wiki.python.org/moin/BeginnersGuide>.

> However my next big step is to be able to use this python feature
> within a website.

Good. Be aware, though, that running a program on the public internet is
a very complicated thing. Partly this is because your program needs to
be on a web site, which itself needs to play nicely with the rest of the
internet.

And, an even more important part, is that the internet is a very wild
place with a continual noise of malicious parties trying to compromise
any site. So you need to do a lot of things just to defend against that.

All of which is to say: There is a huge increase in complexity from “my
simple program which accepts input and produces output”, to a website
that will do the same thing.

See the community guides on web frameworks, which let you wrap your
feature in a whole lot of code that will take care of the “be a website”
job https://wiki.python.org/moin/WebFrameworks/>.

For general purpose use, I recommend Django which has excellent help
https://www.djangoproject.com/>.

-- 
 \  “If sharing a thing in no way diminishes it, it is not rightly |
  `\  owned if it is not shared.” —Augustine of Hippo (354–430 CE) |
_o__)  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list