I'm looking for suggestions on how to deal with a problem I'm running into with how I'm using Sphinx and autodoc, although the software itself is working just fine.
I'm working on materials for a Python training class. For exercises, there are some Python scripts, which are incomplete and which the students are supposed to make complete, based on what they've learned. The exercise description for each script is given in its module docstring. I want to use Sphinx and autodoc to pull together a nice-looking handout of the exercise descriptions. The problem I'm running into is that because the scripts are incomplete, they may give errors when autodoc imports them to read the docstring. Making them able to be imported without errors may require either giving away the answer, or introducing constructs that haven't been introduced at that point in the class. For example, there is one script that opens a file, located in the same directory as the script. This is not a problem for the student running the script from that directory, but it is a problem for Sphinx, running from a higher-level directory. To fix this, I can use a try/except block (not introduced yet), or create an absolute path using os.path (not introduced yet). The point of this particular exercise is not on the file operations; it is on manipulating the data in the file. Any ideas? Thanks, Janet --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---
