[Tutor] Python-windows command prompt interaction?

Juzzy Dee juzzydee at gmail.com
Wed Jun 11 08:10:16 CEST 2008


On Wed, Jun 11, 2008 at 3:11 PM, Trey Keown <trey at opmstech.org> wrote:

> Hey all,
>  I'm creating a program that will copy a user's internet history from
> Internet Explorer, and I'm having a bit of trouble.
>
> I need to get python to either initiate a command via the command prompt,
> or open a file with its default program (in this case, a .bat file with
> cmd.exe).
>
> I've been googling a bit, but I can't seem to find any answers.
>
> Thanks for any help.
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>

-------------------

I think os.system should do the trick in running something from the command
line.

e.g

os.sytem('dir')

Will run the dir command. I'm not sure if that's what you're looking for but
it sounds about right.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080611/226f6b28/attachment.htm>


More information about the Tutor mailing list