OS commands

kaufman at lunarcorp.com kaufman at lunarcorp.com
Thu Sep 28 09:17:00 EDT 2000


In article <mailman.970072487.8899.python-list at python.org>,
  "Matthew Banham" <matb at photond.com> wrote:
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0050_01C028A7.A9124450
> Content-Type: text/plain;
> 	charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
>
> Hi all,
>
> Just a quickie from a python newbie (who couldn't find this easily in
the
> manual and is a bit lazy!). From the python interpreter command
prompt, how
> would I execute a DOS command? For example, I use MS Windows 2000 and
I want
> to be able to run the dos command "myprog.exe" (i.e. to run the file
> "myprog.exe"). Any ideas are extremely welcome :o)
>

I am not sure Win2000 has this utility, but check out the START.EXE
command. Under Win98SE it can be used in the os.system() call thusly:

os.system("start myprog.exe")

DUane
> Yours Sincerely,
> Matthew Banham
> ----------------------------------------------------------------------
------
> ----
> Matthew Banham, MSci
> Development Engineer & Technical Support Officer
>
> Photon Design                Tel:  +44 1865 395480
> 68 Church Way                Fax: +44 1865 395481
> Iffley, Oxford               Email: matb at photond.com
> OX4 4EF                      Web: www.photond.com
>
> ------=_NextPart_000_0050_01C028A7.A9124450
> Content-Type: text/x-vcard;
> 	name="Matthew Banham.vcf"
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: attachment;
> 	filename="Matthew Banham.vcf"
>
> BEGIN:VCARD
> VERSION:2.1
> N:Banham;Matthew;;Mr
> FN:Matthew Banham
> ORG:Photon Design
> TITLE:Development Engineer
> TEL;WORK;VOICE:+44 (0)1865 395480
> TEL;WORK;FAX:+44 (0)1865 395481
> ADR;WORK;ENCODING=3DQUOTED-PRINTABLE:;;68 Church =
> Way,=3D0D=3D0AIffley;Oxford;Oxfordshire;OX4 4EF;United Kingdom
> LABEL;WORK;ENCODING=3DQUOTED-PRINTABLE:68 Church =
> Way,=3D0D=3D0AIffley=3D0D=3D0AOxford, Oxfordshire OX4 =
> 4EF=3D0D=3D0AUnited King=3D
> dom
> URL:
> URL:http://www.photond.com
> EMAIL;PREF;INTERNET:matb at photond.com
> REV:20000927T162332Z
> END:VCARD
>
> ------=_NextPart_000_0050_01C028A7.A9124450--
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list