简体   繁体   中英

How to run .exe file (created in Windows) in python

I have a.exe file containing a skeletonization funtion. What i have to do is running the command and giving the inputs (the input image + some parameters) and getting the skeleton like this:

system Skel_current.exe input-image 'outputimage.png' 'param1' 'param2'

The problem is that my jupyter notebook can't point the.exe file. After several trials, I get a first solution by installing wine and I was able to execute the command in the script Shell. But could'nt execute it in the jupyter notebook. When running this command in the jupyter notebook:

wine Skel_current.exe class1 'image.png' '4.00000' '0.01000'

I got this error:

=002b:fixme:msvcrt:type_info_name_internal_method type_info_node parameter ignored wine: Unhandled page fault on read access to 0000000000000000 at address 00000001400293D3 (thread 002b), starting debugger... 002d:fixme:dbghelp:elf_search_auxv can't find symbol in module...002d:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6

I found the correct command finally !!

subprocess.run(["wine","Skel_current.exe", 'image.png','skel.png','param1','param2'])

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM