small generic fixes

This commit is contained in:
2021-04-13 20:39:22 +02:00
parent c5dfaf6127
commit 885b91c33d
4 changed files with 48 additions and 10 deletions

View File

@ -121,10 +121,11 @@ class DXFDWGImport(inkex.EffectExtension):
self.arg_parser.add_argument("--XLINE", type=inkex.Boolean, default=True)
def openExplorer(self, temp_output_dir):
DETACHED_PROCESS = 0x00000008
if os.name == 'nt':
subprocess.Popen(["explorer",temp_output_dir], close_fds=True)
subprocess.Popen(["explorer", temp_output_dir], close_fds=True, creationflags=DETACHED_PROCESS).wait()
else:
subprocess.Popen(["xdg-open",temp_output_dir], close_fds=True)
subprocess.Popen(["xdg-open", temp_output_dir], close_fds=True, start_new_session=True).wait()
def effect(self):
#get input file and copy it to some new temporary directory