Many thanks toward you both! Now it works with: os.system(command) #Simon: well that was just an example... i was looking for a syntax in order to be able to execute certain dos commands, which is possible, like Graeme advised me correctly, with the the above command. Solomon ________________________________
Von: python-win32-bounces+solomon.zewdie.altek=zf....@python.org im Auftrag von King Simon-NFHD78 Gesendet: Fr 06.03.2009 15:45 An: python-win32@python.org Betreff: Re: [python-win32] executing dos commands > -----Original Message----- > From: python-win32-bounces+simon.king=motorola....@python.org > [mailto:python-win32-bounces+simon.king=motorola....@python.or > g] On Behalf Of Graeme Glass > Sent: 06 March 2009 12:08 > To: python-win32@python.org > Subject: Re: [python-win32] executing dos commands > > On Fri, Mar 6, 2009 at 1:29 PM, <solomon.zewdie.al...@zf.com> wrote: > > > > Hi folkz, > > just a simple question for a python guru:-) > > > > How can I execute dos commands via python? > > The command exec("chdir \Dir1\dir2\..") doesn't do it. > > > > Many thanks in advance! > > > > Solomon > > > > _______________________________________________ > > python-win32 mailing list > > python-win32@python.org > > http://mail.python.org/mailman/listinfo/python-win32 > > > Hi Solomon, > I think you are looking for either os.system(command) or the > subprocess module. > > Take a look at http://docs.python.org <http://docs.python.org/> , very > comprehensive and a great > helpful tutorial. > HTH > > Graeme ...although it is worth pointing out that if you are just trying to change your current working directory, you really want the os.chdir function Simon _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32 _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32