Skip to content Skip to sidebar Skip to footer

Os.system (old Python) And Arguments With Parameters

I trying to write simple code that execute os command with parameters #!/usr/bin/env python # -*- coding: utf-8 -*- import os target = 'i586' build = os.system('/usr/bin/hsh --ta

Solution 1:

build = os.system('/usr/bin/hsh --target="%s"' % target)

or

build = os.system('/usr/bin/hsh --target="' + target + '"')

Post a Comment for "Os.system (old Python) And Arguments With Parameters"