CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 07 Aug 2025 07:09:09 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20071208115719
location: https://web.archive.org/web/20071208115719/https://wiki.python.org/moin/WorkingWithProcesses
server-timing: captures_list;dur=3.043788, exclusion.robots;dur=0.023031, exclusion.robots.policy;dur=0.014915, esindex;dur=0.011066, cdx.remote;dur=6.552276, LoadShardBlock;dur=141.403807, PetaboxLoader3.datanode;dur=46.996719
x-app-server: wwwb-app201
x-ts: 302
x-tr: 172
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app201; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Thu, 07 Aug 2025 07:09:10 GMT
content-type: text/html;charset=utf-8
x-archive-orig-date: Sat, 08 Dec 2007 11:57:19 GMT
x-archive-orig-server: Apache/2.0.54 (Debian GNU/Linux) mod_fastcgi/2.4.2
x-archive-orig-connection: close
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sat, 08 Dec 2007 11:57:19 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 10 Oct 2006 08:04:38 GMT", ; rel="prev memento"; datetime="Tue, 10 Oct 2006 08:04:38 GMT", ; rel="memento"; datetime="Sat, 08 Dec 2007 11:57:19 GMT", ; rel="next memento"; datetime="Fri, 12 Aug 2011 02:38:54 GMT", ; rel="last memento"; datetime="Sat, 13 Jul 2024 11:19:11 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_1_20071208104348_crawl102-c/52_1_20071208115619_crawl107.arc.gz
server-timing: captures_list;dur=0.558176, exclusion.robots;dur=0.026017, exclusion.robots.policy;dur=0.015415, esindex;dur=0.011795, cdx.remote;dur=4.611753, LoadShardBlock;dur=244.557075, PetaboxLoader3.datanode;dur=117.802575, PetaboxLoader3.resolve;dur=233.477039, load_resource;dur=153.490053
x-app-server: wwwb-app201
x-ts: 200
x-tr: 467
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
WorkingWithProcesses - PythonInfo Wiki
WorkingWithProcesses
These are just some notes about working with processes in Python.
The module of interest is os. (os module documentation)
Environment variables are accessed through a dictionary, os.environ.
Processes are created with os.popen, described in os 6.1.2.
1 import os
2
3 # Export an environment variable
4 os.environ["FOO"] = "BAR"
5
6 # Make sure environment variable set for child processes
7 for line in os.popen("bash -c 'env'").read().splitlines():
8 if line.startswith("FOO="):
9 print line
10
11 # Since environment variable "FOO" is exported, and since child
12 # processes inherit environment variables from their parents, this
13 # works.
EditText (last edited 2005-09-27 00:02:37 by LionKimbro)
DeleteCache (cached 2007-09-01 22:09:41)- Login
- Navigation
- Actions
- Your recent pages