i have built a small script that runs a simple shell utility called imapsync, with a bunch of variables taken from a dictionary, the command is as follows:
os.system("imapsync --host1 %s --user1 %s --password1 '%s' --host2 %s --user2 %s --password2 '%s' --ssl1 --no-modulesversion --ssl2" % (fromHost, emails, passwords, toHost, emails, passwords))
the deal is that passwords often contain special characters, example: djDJS*^%%%^&)
this imapsync tool allows such characters if enclosed in single quotes: 'djDJS*^%%%^&)'
what I am trying to achieve is post the single quotes in the command, itself.. I tried "'", backquotes - ``, escaped quotes - \'\', enclosing the command in single quotes, nothing worked thus far