File: open

package info (click to toggle)
python-aiomusiccast 0.14.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 496 kB
  • sloc: python: 2,965; makefile: 152
file content (22 lines) | stat: -rwxr-xr-x 336 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys


COMMANDS = {
    'linux': "open",
    'win32': "cmd /c start",
    'cygwin': "cygstart",
    'darwin': "open",
}


def run(path):
    command = COMMANDS.get(sys.platform, "open")
    os.system(command + ' ' + path)


if __name__ == '__main__':
    run(sys.argv[-1])