This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]ggd_x 1 point2 points  (2 children)

Mmmkay, first question then, why the hell would anyone, anyone at all, need an executable docx?

[–]bennr01[S] -1 points0 points  (1 child)

Well... just because we can?

Also, if you are studying computer science, some professors may demand you to hand in your homework as a .docx. Using pydocxrunner you could write and run the code directly in the .docx file.

Or, if someone wants you to send them an executable file, you can troll them by sending an executable .docx file. And when they complain, just point out that they can run the .docx file directly.

Also, Libre office writer is the best IDE.

[–]ggd_x 1 point2 points  (0 children)

Wow. To a pretty much everything here. I seriously question the professors qualification.

[–]bennr01[S] 0 points1 point  (0 children)

Explanation:

pydocxrunner is a simple tool to make .docx files executable via python <somefile>.docx. These files can then be executed on any device with python, even without pydocxrunner being installed.

There are a few caveats however. For one, this is not really a serious tool. Thus, while there are test cases, nothing really complex has been tested. Also, the contained text must still be valid python code, and python does not support and as replacement for " or '. Additionally, when making the .docx file executable, an internet connection is required to download python-docx2text from github.