path/commonName-i
path and common name can contain space or special characters (umlauts etc)
if p= path and x = commonName I would like to do
- Code: Select all
subprocess.Popen("rm "+p+x+"*",shell=True)
I works if there are no spaces or special characters, but
that does not work if there a blanks in the name. if I add ' around p+x the "*" does not work.
I also found that eg umlauts in the file name are different than in the unix shell.
I am using the same variables to create --
- Code: Select all
f=open("'"p+x+"-1'","w")
- Code: Select all
subprocess.Popen("rm '"+p+x+"-1'",shell=True)
Karl