Amer Neely wrote:
> Bryan Olson wrote:
>> Amer Neely wrote:
>>> I don't have shell access but I can run 'which python' from a Perl
>>> script, and I will try the different shebang line you suggested.
>> And after trying it, Amer Neely reported:
>>
>>> I tried `which python` and `whereis python` an
Bryan Olson wrote:
> Amer Neely wrote:
>> I don't have shell access but I can run 'which python' from a Perl
>> script, and I will try the different shebang line you suggested.
>
> And after trying it, Amer Neely reported:
>
>> I tried `which python` and `whereis python` and got 0 back as a
>>
Amer Neely wrote:
> I don't have shell access but I can run 'which python' from a Perl
> script, and I will try the different shebang line you suggested.
And after trying it, Amer Neely reported:
> I tried `which python` and `whereis python` and got 0 back as a result.
> So it seems Python is n
Paddy wrote:
> On Sep 13, 1:30 am, Amer Neely <[EMAIL PROTECTED]> wrote:
>> I'm a complete newbie with Python, but have several years experience
>> with Perl in a web environment.
>>
>> A question I have, if someone here is familiar with Perl, does Python
>> have something like Perl's 'here documen
Bryan Olson wrote:
> Amer Neely wrote:
>> This seems to indicate that maybe my host needs to configure Apache to
>> run python scripts? But I didn't need to do anything with mine.
>
> Another possibility: If it works on Windows but not Unix, check
> the end-of-line characters. Windows ends each l
Bryan Olson wrote:
> Amer Neely wrote:
>> This seems to indicate that maybe my host needs to configure Apache to
>> run python scripts? But I didn't need to do anything with mine.
>
> Another possibility: If it works on Windows but not Unix, check
> the end-of-line characters. Windows ends each l
I V wrote:
> On Thu, 13 Sep 2007 23:49:32 -0400, Amer Neely wrote:
>> In trying to track down why this script would not run on my host, it has
>> to come to light that Python is installed, however the Apache module is
>> not. So, short story is - I was flogging a dead horse.
>
> Which Apache modul
Amer Neely wrote:
> This seems to indicate that maybe my host needs to configure Apache to
> run python scripts? But I didn't need to do anything with mine.
Another possibility: If it works on Windows but not Unix, check
the end-of-line characters. Windows ends each line with the two
character se
On Thu, 13 Sep 2007 23:49:32 -0400, Amer Neely wrote:
> In trying to track down why this script would not run on my host, it has
> to come to light that Python is installed, however the Apache module is
> not. So, short story is - I was flogging a dead horse.
Which Apache module? You don't need an
Amer Neely wrote:
> I'm a complete newbie with Python, but have several years experience
> with Perl in a web environment.
>
> A question I have, if someone here is familiar with Perl, does Python
> have something like Perl's 'here document'? I've just searched and read
> some postings on gener
On Sep 13, 1:30 am, Amer Neely <[EMAIL PROTECTED]> wrote:
> I'm a complete newbie with Python, but have several years experience
> with Perl in a web environment.
>
> A question I have, if someone here is familiar with Perl, does Python
> have something like Perl's 'here document'? I've just search
Tim Golden wrote:
> Amer Neely wrote:
>> Richie Hindle wrote:
[Amer]
#!/usr/bin/python
[...] On my home PC [...]
[Thu Sep 13 04:16:03 2007] [error] [client 0.0.0.0] (OS 2)The system
cannot find the file specified.
>>> That's because on your home PC Python is somewhere like
Amer Neely wrote:
> Richie Hindle wrote:
>>> [Amer]
>>> #!/usr/bin/python
>>> [...] On my home PC [...]
>>> [Thu Sep 13 04:16:03 2007] [error] [client 0.0.0.0] (OS 2)The system
>>> cannot find the file specified.
>> That's because on your home PC Python is somewhere like
>> C:\Python25\python.exe,
Amer Neely wrote:
> Richie Hindle wrote:
>>> [Amer]
>>> #!/usr/bin/python
>>> [...] On my home PC [...]
>>> [Thu Sep 13 04:16:03 2007] [error] [client 0.0.0.0] (OS 2)The system
>>> cannot find the file specified.
>>
>> That's because on your home PC Python is somewhere like
>> C:\Python25\python.e
Richie Hindle wrote:
>> [Amer]
>> #!/usr/bin/python
>> [...] On my home PC [...]
>> [Thu Sep 13 04:16:03 2007] [error] [client 0.0.0.0] (OS 2)The system
>> cannot find the file specified.
>
> That's because on your home PC Python is somewhere like
> C:\Python25\python.exe, not /usr/bin/python.
>
> [Amer]
> #!/usr/bin/python
> [...] On my home PC [...]
> [Thu Sep 13 04:16:03 2007] [error] [client 0.0.0.0] (OS 2)The system
> cannot find the file specified.
That's because on your home PC Python is somewhere like
C:\Python25\python.exe, not /usr/bin/python.
Are you sure /usr/bin/python is
Richie Hindle wrote:
> [Amer]
>> Can you or anyone see anything in the posted code that might be the
>> cause?
>
>> #!/usr/bin/python
>> import cgitb; cgitb.enable(display=0, logdir=".")
>> import sys
>> sys.stderr = sys.stdout
>> print "Content-Type: text/html"
>> print
>
> My guess would be th
[Amer]
> Can you or anyone see anything in the posted code that might be the
> cause?
> #!/usr/bin/python
> import cgitb; cgitb.enable(display=0, logdir=".")
> import sys
> sys.stderr = sys.stdout
> print "Content-Type: text/html"
> print
My guess would be that you don't have cgitb in your serv
Ben Finney wrote:
> Amer Neely <[EMAIL PROTECTED]> writes:
>
>> Well, I have checked everything I can but I'm getting '500 Internal
>> Server Error'.
>
> This is the HTTP response code saying that the program that should
> have served the response document instead exited with an error.
>
> To de
Amer Neely <[EMAIL PROTECTED]> writes:
> Well, I have checked everything I can but I'm getting '500 Internal
> Server Error'.
This is the HTTP response code saying that the program that should
have served the response document instead exited with an error.
To debug, you should first run the prog
Amer Neely wrote:
> TheFlyingDutchman wrote:
>> On Sep 12, 5:30 pm, Amer Neely <[EMAIL PROTECTED]> wrote:
>>> I'm a complete newbie with Python, but have several years experience
>>> with Perl in a web environment.
>>>
>>> A question I have, if someone here is familiar with Perl, does Python
>>> ha
TheFlyingDutchman wrote:
> On Sep 12, 5:30 pm, Amer Neely <[EMAIL PROTECTED]> wrote:
>> I'm a complete newbie with Python, but have several years experience
>> with Perl in a web environment.
>>
>> A question I have, if someone here is familiar with Perl, does Python
>> have something like Perl's '
Amer Neely <[EMAIL PROTECTED]> writes:
> print <
>
> Hello
>
>
> EndHTML
The equivalent in Python would be::
print """
Hello
"""
You can even use Python's standard textwrap module to indent your code
properly::
import textwrap
def foo(bar):
> On Behalf Of Amer Neely
> I saw that and I guess that is the closest thing. In Perl I can do ..
>
> print <
>
> Hello
>
>
> EndHTML
>>> data = dict(title="Python Rocks!",
content="I heart Python")
>>> template = """
%(title)s
%(content)s
"""
>>> print template % data
Pytho
TheFlyingDutchman wrote:
> On Sep 12, 5:30 pm, Amer Neely <[EMAIL PROTECTED]> wrote:
>> I'm a complete newbie with Python, but have several years experience
>> with Perl in a web environment.
>>
>> A question I have, if someone here is familiar with Perl, does Python
>> have something like Perl's '
On Sep 12, 5:30 pm, Amer Neely <[EMAIL PROTECTED]> wrote:
> I'm a complete newbie with Python, but have several years experience
> with Perl in a web environment.
>
> A question I have, if someone here is familiar with Perl, does Python
> have something like Perl's 'here document'? I've just search
Ben Finney wrote:
> Amer Neely <[EMAIL PROTECTED]> writes:
>
>> A question I have, if someone here is familiar with Perl, does Python
>> have something like Perl's 'here document'?
>
> I'm not sure exactly what behaviour you want, but Python accepts
> literal strings to be triple-quoted (i.e. del
Amer Neely <[EMAIL PROTECTED]> writes:
> A question I have, if someone here is familiar with Perl, does Python
> have something like Perl's 'here document'?
I'm not sure exactly what behaviour you want, but Python accepts
literal strings to be triple-quoted (i.e. delimited by """ pairs or
''' pai
28 matches
Mail list logo