This is a helper routine for fetching files using an http url. It caches fetched files, uses cached files when available, and supports decompressing files.
Fetch a database entry with a specified id code and return a list of models. The models are not added to the scene. The allowed databases are those registered with the register_fetch_database() routine.
Register a database so that files can be fetched using the fetch_from_database() routine. The fetching function takes a single argument, the entry identifier (a string) and returns a list of models.
Return a list of file readers, each reader being represented by 3-tuple consisting of a file type name, a list of recognized suffixes, and a function that opens that file type give a path. The funtion returns a list of models which have not been added to the scene.
Open data files and add the models created to the scene. The file types are recognized using the file suffix as listed in the list returned by file_readers().
Open a density map file having any of the known density map formats.
Open a session file. The current session is closed.
Read a Python file and execute the code.
Save an image of the current graphics window contents.
Save a session file using the session file path of the last loaded session, or if no session has been loaded then show a dialog to get the save path.
Open an Autopack results files (.apr suffix) and create surfaces for each component of the model.
Read a Stockley-Wheal-Cannon (SWC) format traced neuron file and create a fake molecule model using atoms and bonds to represent the neuron.
Restore a session.
Save a session.
Create a dictionary representing a session including molecule models, surface models, density map models and scenes. This dictionary is written to a Python file as a session. It contains only basic Python types: numbers, strings, booleans, tuples, lists, dictionaries.