Running files with the associated program...

Discussion in 'Python' started by E-Lo, Feb 6, 2008.

  1. E-Lo

    E-Lo Guest

    Hello all,

    How can I start a file (on Windows) with the associated program,

    Like if I want to open a bmp file, I want to to be shown in the
    program that all bmp files are associated with.

    I need a python code to do this.

    Thanks,
    E-Lo, Feb 6, 2008
    #1
    1. Advertising

  2. En Tue, 05 Feb 2008 22:34:59 -0200, E-Lo <> escribió:

    > How can I start a file (on Windows) with the associated program,


    http://docs.python.org/lib/os-process.html#l2h-2760

    startfile(path[, operation])
    Start a file with its associated application.
    When operation is not specified or 'open', this acts like double-clicking
    the file in Windows Explorer, or giving the file name as an argument to
    the start command from the interactive command shell: the file is opened
    with whatever application (if any) its extension is associated.

    --
    Gabriel Genellina
    Gabriel Genellina, Feb 6, 2008
    #2
    1. Advertising

  3. E-Lo

    E-Lo Guest

    On Feb 6, 6:09 am, "Gabriel Genellina" <> wrote:
    > En Tue, 05 Feb 2008 22:34:59 -0200, E-Lo <> escribió:
    >
    > > How can I start a file (on Windows) with the associated program,

    >
    > http://docs.python.org/lib/os-process.html#l2h-2760
    >
    > startfile(path[, operation])
    > Start a file with its associated application.
    > When operation is not specified or 'open', this acts like double-clicking
    > the file in Windows Explorer, or giving the file name as an argument to
    > the start command from the interactive command shell: the file is opened
    > with whatever application (if any) its extension is associated.
    >
    > --
    > Gabriel Genellina


    thanks, it worked :)
    E-Lo, Feb 6, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rajarshi Guha
    Replies:
    2
    Views:
    260
    Robert Kern
    Oct 4, 2005
  2. Replies:
    1
    Views:
    348
    Muhammad Naveed Yaseen
    Mar 10, 2007
  3. Replies:
    7
    Views:
    277
    Gabriel Genellina
    Apr 28, 2008
  4. gparsons
    Replies:
    4
    Views:
    88
    Daniel Lucraft
    May 30, 2007
  5. Replies:
    5
    Views:
    457
    Wolf Behrenhoff
    May 15, 2009
Loading...

Share This Page