directory wildcard

Diez B. Roggisch deets at
Mon Nov 16 21:54:36 CET 2009

hong zhang schrieb:
> List,
> I try to assign value to force_mcs sitting in a wildcard subdirectory /sys/kernel/debug/ieee80211/phy*, but python does not work for that such as:
> os.system("echo %i > /sys/kernel/debug/ieee80211/phy*/iwlagn/data/force_mcs" % mcs)
> Any right way to do it?

Don't use os system. Use subprocess. Which incidentially is mentioned in 
the docs for os.system:

Then you can pass the "use_shell=True" parameter - which should work in 
your case.


More information about the Python-list mailing list