Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #100105

Understanding Python from a PHP coder's perspective

X-Received by 10.50.3.98 with SMTP id b2mr4137687igb.8.1449522461513; Mon, 07 Dec 2015 13:07:41 -0800 (PST)
X-Received by 10.50.83.38 with SMTP id n6mr117645igy.4.1449522461498; Mon, 07 Dec 2015 13:07:41 -0800 (PST)
Path csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!mv3no10333309igc.0!news-out.google.com!f6ni16637igq.0!nntp.google.com!mv3no13075288igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Mon, 7 Dec 2015 13:07:40 -0800 (PST)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=63.87.61.108; posting-account=6SHxpgkAAAB_x4-0MMbhgqMiKAmh3U6u
NNTP-Posting-Host 63.87.61.108
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <f39f97f5-d7a1-4d7c-a7ac-527c2ffff76b@googlegroups.com> (permalink)
Subject Understanding Python from a PHP coder's perspective
From villascape@gmail.com
Injection-Date Mon, 07 Dec 2015 21:07:41 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.python:100105

Show key headers only | View raw


Hello all!  Just started getting into Python, and am very excited about the prospect.

I am struggling on some general concepts.  My past experience with server-side code is mostly limited to PHP and websites.  I have some file called "whatever.php", the browser accesses it, and PHP parses it and returns HTML, JSON, etc.  Every now and then, I need to run some background PHP script, or have some PHP script initiated by a CRON job, or have some PHP script initiated by the command line running in an endless loop, and while it works, feel other languages might be more appropriate.

So, my interest in Python...

I've read up on Python, and while some aspects seem similar to PHP, some don't.  I have learned how to create Python script, have run it from the command line, and have even accessed it with Apache by placing http://example.com/myscript.py in the browser.  I am used to seeing .php extensions, but never .py extentions, and even visited multiple sites which I knew were written in Python, but never saw the browser expose the .py extensions.  I am obviously missing something.

Why don't I see the .py extension in my browser?

Is Python event driven like PHP, or is it somehow different?

How should I view Python differently than PHP?

Thank you

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Understanding Python from a PHP coder's perspective villascape@gmail.com - 2015-12-07 13:07 -0800
  Re: Understanding Python from a PHP coder's perspective villascape@gmail.com - 2015-12-07 13:21 -0800
    Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 09:00 +1100
      Re: Understanding Python from a PHP coder's perspective villascape@gmail.com - 2015-12-07 14:27 -0800
        Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 10:09 +1100
          Re: Understanding Python from a PHP coder's perspective villascape@gmail.com - 2015-12-07 17:00 -0800
            Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 14:26 +1100
        Re: Understanding Python from a PHP coder's perspective Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-07 16:10 -0700
        Re: Understanding Python from a PHP coder's perspective Cameron Simpson <cs@zip.com.au> - 2015-12-08 10:07 +1100
        Re: Understanding Python from a PHP coder's perspective Tim Chase <python.list@tim.thechases.com> - 2015-12-07 21:11 -0600
        Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 14:47 +1100
  Re: Understanding Python from a PHP coder's perspective Cameron Simpson <cs@zip.com.au> - 2015-12-08 08:33 +1100
  Re: Understanding Python from a PHP coder's perspective Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-07 14:37 -0700
  Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 08:40 +1100
  Re: Understanding Python from a PHP coder's perspective Terry Reedy <tjreedy@udel.edu> - 2015-12-07 16:53 -0500
  Re: Understanding Python from a PHP coder's perspective Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-07 14:59 -0700
  Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 09:03 +1100
  Re: Understanding Python from a PHP coder's perspective Tim Chase <python.list@tim.thechases.com> - 2015-12-07 16:28 -0600
  Re: Understanding Python from a PHP coder's perspective villascape@gmail.com - 2015-12-07 20:11 -0800
  Re: Understanding Python from a PHP coder's perspective Peter Otten <__peter__@web.de> - 2015-12-08 10:24 +0100
  Re: Understanding Python from a PHP coder's perspective Chris Angelico <rosuav@gmail.com> - 2015-12-08 20:40 +1100

csiph-web