List Colors: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 15: Line 15:
</source>
</source>


[[Category:Scripting_Script_Library|List Colors]]
[[Category:Script_Library|List Colors]]

Revision as of 16:24, 6 May 2005

#
# This is how to do it from the PyMOL command line or .pml script:
#
iterate all, print color

#! /usr/bin/python
#
# and this in a Python script
#
import pymol
pymol.color_list = []
cmd.iterate('all', 'pymol.color_list.append(color)')
print pymol.color_list