It's possible: mmApi via Python 3.x

It's possible: mmApi via Python 3.x

Anonymous
Not applicable
1,514 Views
9 Replies
Message 1 of 10

It's possible: mmApi via Python 3.x

Anonymous
Not applicable

News for mmApi users:

mmApi Python interface was built meant to be used on Python 2.7. Python2 development and support will end soon...

Now I managed to setup an interface based on current SWIG 4.0 and PCRE 8.43 supporting current Python 3.7.4 on my macOS system (Not sure if that upgrade to SWIG 4.0 and PCRE 8.43 is needed at all but I tried latest/most common versions)

 

Until now things seem to work fine simply converting 2.7 codes via 2to3-auto conversion (also there might be some still unknown glitches) .

 

Python 3 support allows to use up to date third party libraries and/or to link MM to other applications using Python 3 scripting (e.g. Fusion 360).

 

Anyone (maybe a better coder) willing to join the porting party?

 

Here's a shot running examples/demo_06 via Python Shell 3.7.4:

Ohne Titel.jpeg

 

 

 

1,515 Views
9 Replies
Replies (9)
Message 2 of 10

rafaluis
Contributor
Contributor

Muito bom !!!

0 Likes
Message 3 of 10

The3rdIcon
Participant
Participant

I know @Anonymous  your primarily a mac user but I wanted to know if you've heard anyone begin able to do this on Windows. I currently have mmapi working with python 2.716 on Windows 10 and don't want to mess it up. 

0 Likes
Message 4 of 10

Anonymous
Not applicable

Not that sure about a concrete WIN 10 mmApi build... But I think to remember a post here where Python3 was used... though I can't find it...

Did you saw my post at mmApi where I documented what I did to build it at macOS? Basically it should work to modify the .bat files in a similar manner.

0 Likes
Message 5 of 10

hfcandrew
Advisor
Advisor

Ya that was probably me somewhere:

 

Win10 Python2

Win10 Python3

 

Use at own risk, I don't really know what I'm doing and got it working for some stuff by nothing more than chance. haha!

0 Likes
Message 6 of 10

markarenillo023
Community Visitor
Community Visitor
Is there some malware embedded in this? I just downloaded mmapi for python 3 yet the _mmapi.pyd keeps disappearing. This seems suspicious.
0 Likes
Message 7 of 10

hfcandrew
Advisor
Advisor

No malware, I promise. Just unverified scripts get dinged by google drive and windows sometimes.

0 Likes
Message 8 of 10

markarenillo023
Community Visitor
Community Visitor
Unfortunately, it wasn't dinged. It always disappears without prior notice. :<
0 Likes
Message 9 of 10

hfcandrew
Advisor
Advisor

Right click on it and DL it separately.

0 Likes
Message 10 of 10

markarenillo023
Community Visitor
Community Visitor
I just uninstalled my antivirus and now it works. Thanks for your response!
0 Likes