Why does Python compile libraries that are used in a script, but not the script being called itself?
For instance,
If there is main.py and module.py, and Python is run by doing python main.py, there will be a compiled file module.pyc but not one for main.  Why?
Edit
Adding bounty. I don't think this has been properly answered.

If the response is potential disk permissions for the directory of main.py, why does Python compile modules? They are just as likely (if not more likely) to appear in a location where the user does not have write access. Python could compile main if it is writable, or alternatively in another directory.
If the reason is that benefits will be minimal, consider the situation when the script will be used a large number of times (such as in a CGI application).
Nobody seems to want to say this, but I'm pretty sure the answer is simply: there's no solid reason for this behavior.
All of the reasons given so far are essentially incorrect:

There's nothing special about the main file.  It's loaded as a module, and shows up in sys.modules like any other module.  Running a main script is nothing more than importing it with a module name of __main__.
There's no problem with failing to save .pyc files due to read-only directories; Python simply ignores it and moves on.
The benefit of caching a script is the same as that of caching any module: not wasting time recompiling the script every time it's run.  The docs acknowledge this explicitly ("Thus, the startup time of a script may be reduced ...").

Another issue to note: if you run python foo.py and foo.pyc exists, it will not be used.  You have to explicitly say python foo.pyc.  That's a very bad idea: it means Python won't automatically recompile the .pyc file when it's out of sync (due to the .py file changing), so changes to the .py file won't be used until you manually recompile it.  It'll also fail outright with a RuntimeError if you upgrade Python and the .pyc file format is no longer compatible, which happens regularly.  Normally, this is all handled transparently.
You shouldn't need to move a script to a dummy module and set up a bootstrapping script to trick Python into caching it.  That's a hackish workaround.
The only possible (and very unconvincing) reason I can contrive is to avoid your home directory from being cluttered with a bunch of .pyc files.  (This isn't a real reason; if that was an actual concern, then .pyc files should be saved as dotfiles.)  It's certainly no reason not to even have an option to do this.
Python should definitely be able to cache the main module.
Why does Python compile modules but not the script being run?