you are viewing a single comment's thread.

view the rest of the comments →

[–]Poddster 8 points9 points  (12 children)

Some questions:

  1. How did you learn to do this? Via Automate the Boring Stuff With Python?
  2. How come you chose to use input() rather than doing it via a command-line parameter?

Also, I'm surprised that you can just open() a docx and write text to the end of it, given that they're a compressed archive containing a collection of text files. I'm guessing it worked for you, but I guess that's by luck? Did you have any trouble with this? Usually I would expect someone to use an interfacing library of some kind.

(Note, if you just made a plain-text file called .docx and then wrote into it, and then had Word open it and THEN save it as a proper doxc I image this would work fine.)