Page 1 of 1

Use of in macro

PostPosted: Fri Jul 23, 2021 7:16 am
I'm trying to use the lib in a macro but it's not working.

here is an exemple of the code:
Code: Select all

import subprocess['print("hello")'],shell=True)             

I got this message:
MagicDraw cannot execute the Jython macro, please make sure that the md:\\_19_0_2_e670268_1627040463662_130879_79761 is correct. null java.lang.IncompatibleClassChangeError: java.lang.IncompatibleClassChangeError: Found class com.kenai.jffi.InvocationBuffer, but interface was expected in md:\\_19_0_2_e670268_1627040463662_130879_79761 at line number 2

I tried it on a pyhton IDE it's working
Does anyone know why?

Thank you by advance,

Re: Use of in macro

PostPosted: Thu Jul 29, 2021 12:49 am
The subprocess module present in Python(both 2. x and 3. x) is used to run new applications or programs through Python code by creating new processes. It also helps to obtain the input/output/error pipes as well as the exit codes of various commands.
Lowes Life

Re: Use of in macro

PostPosted: Mon Aug 09, 2021 12:36 am
Ok thank you for the precision.
Do you know if there is a way to use it within Cameo ?

Re: Use of in macro

PostPosted: Tue Sep 07, 2021 5:09 am
This works really well for us, thank you!

aces etm