Many thanks to some very bright and helpful gentlemen.
On Fri, Jun 28, 2019 at 9:24 AM Mats Wichmann wrote:
> On 6/27/19 11:24 PM, Mayo Adams wrote:
> > I have for some time been flummoxed as to the significance of setting
> > environment variables, for example in order to run a Flask applicatio
On 6/27/19 11:24 PM, Mayo Adams wrote:
> I have for some time been flummoxed as to the significance of setting
> environment variables, for example in order to run a Flask application.
> What are these environment variables, exactly, and why is it necessary to
> set them? "Googling" here simply lea
On 28Jun2019 09:34, Alan Gauld wrote:
Environment variable have fallen out of favour for user settings
and config files are now preferred. But some things are a bit
easier via en environment variable - especially where you spawn
new sub-processes and don't want the sub-process to have
to re-read
On 28/06/2019 06:24, Mayo Adams wrote:
> What are these environment variables, exactly, and why is it necessary to
> set them?
When you run a program under an operating system the OS sets up an
"environment" (or context) for the program to run in. (This
includes the OS shell that the user intera
I have for some time been flummoxed as to the significance of setting
environment variables, for example in order to run a Flask application.
What are these environment variables, exactly, and why is it necessary to
set them? "Googling" here simply leads me into more arcana, and doesn't
really help
> since user variables override system variables, why we need do
> anything related to python in the system variables? Why not delete
> the
> value in the system variable and add to it to define the user
> variable?
System variables apply to all users, so if you want every user
of the computer to
Hi there,
I found the following paragraph in the web:
environment variables on Windows come in two flavors: user variables
and system variables. In particular, if there is a system variable
PYTHONPATH and you are adding this as a user variable, start with the
value in the system variable and add to
> print "Hi there, ",os.environ["USERNAME"]
Oops, sorry, I said os.getenv(), looks like
my C background showing through :-)
Alan g.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
> I tried to do this:
>
> import os
> import cgitb; cgitb.enable()
> print "Content-type: text/html\n\n"
> print "Hi there, ",os.system("echo %USERNAME%")
If you ignore the environment variable bit, does
it work with a hard coded name?
If so then try using the function os.getenv() to
fetch the va
> Anyway, I got to the Using Environment Variables chapter that is in
> this page: http://www.oreilly.com/openbook/cgi/ch02_02.html.
> This is UNIX environment variables (as I understand), and I guess
they
> will not work on Windows...
They should work on both.
THere are some variables that are di
script itself...
I tried to do this:
import os
import cgitb; cgitb.enable()
print "Content-type: text/html\n\n"
print "Hi there, ",os.system("echo %USERNAME%")
But I don't get anything in the browser (500 error - Internal Server
Error) and when I run the script in IDLE I get:
Hi there, 0
I guess
> Morning Mark,
>
> Happy New Year, Merry Christmas, and a jolly Winter Solstice Season!
>
> Whenever you're talking about how to do something in Windows it REALLY
> helps when you include WHICH windows you're working with.
>
> I believe the following will allow you to manipulate windows
> envir
Mark Kels wrote:
Hello to all :-)
I'm writing a CGI script (one of my first ever CGI programs and I'm
using this tutor to learn CGI: http://www.oreilly.com/openbook/cgi/
This isn't a python tutor, but the introductions says that any
language will be good for this tutor.
Anyway, I got to the Using E
Hello to all :-)
I'm writing a CGI script (one of my first ever CGI programs and I'm
using this tutor to learn CGI: http://www.oreilly.com/openbook/cgi/
This isn't a python tutor, but the introductions says that any
language will be good for this tutor.
Anyway, I got to the Using Environment Varia
14 matches
Mail list logo