Code Search for Developers
 
 
  

mnginfo.py from Thousand Parsec at Krugle


Show mnginfo.py syntax highlighted

#! /usr/bin/env python
"""\
Displays information about the MNG file.
"""
if __name__ == "__main__":
	import sys
	import os.path

	if len(sys.argv) != 2 or sys.argv[1] in ("--help", "-h"):
		print __doc__

	fn = sys.argv[1]
	if not os.path.exists(fn):
		print "No such file found...."
		sys.exit(1)
	
	try:
		from mng import MNG
	except ImportError, e:
		print e
		print "The libmng library doesn't appear to work :/"
		sys.exit(1)

	a1 = MNG(sys.argv[1])
	print "filename\t\t",			fn
	print "filesize\t\t",			os.path.getsize(fn), "bytes"
	print "---------------------------------------"
	print "sigtype\t\t\t",			a1.sigtype
	print "type\t\t\t",				a1.type
	print "width\t\t\t",			a1.width, "pixels"
	print "height\t\t\t",			a1.height, "pixels"
	print "ticks\t\t\t",			a1.ticks
	print "framecount\t\t",			a1.framecount
	print "layercount\t\t",			a1.layercount
	print "playtime\t\t",			a1.playtime
	print "simplicity\t\t",			a1.simplicity
	print "bitdepth\t\t",			a1.bitdepth
	print "colortype\t\t",			a1.colortype
	print "compression\t\t",		a1.compression
	print "filter\t\t\t",			a1.filter
	print "interlace\t\t",			a1.interlace
	print "alphabitdepth\t\t",		a1.alphabitdepth
	print "alphacompression\t",		a1.alphacompression
	print "alphafilter\t\t",		a1.alphafilter
	print "alphainterlace\t\t",		a1.alphainterlace





See more files for this project here

Thousand Parsec

Thousand Parsec is a framework for turn based 4 X\'s game (eXplore, eXpand, eXploit, eXterminate). Designed for long games, supporting massive universes and has an easily expanded tech tree.

Project homepage: http://sourceforge.net/projects/thousandparsec
Programming language(s): C++,Python
License: other

  doc/
    binaries/
      libmng-py-0.0.3-1.noarch.rpm
      libmng-py-0.0.3.tar.gz
      libmng_py-0.0.3-py2.4.egg
    screenshots/
      pygame-example.png
      wx-example.png
    MNGnow.png
    index.html
  examples/
    barren-alpha-1bit.mng
    barren-alpha-full.mng
    pygame-example.py
    wx-example.py
  mng/
    dll/
      libmng.dll
    mnghelper/
      Makefile
      __init__.py
      mnghelper.c
    pygame/
      SDL_Surface.py
      __init__.py
      pygameMNG.py
    utils/
      PyObject.py
      __init__.py
    wx/
      MNGAnimationCtrl.py
      __init__.py
    __init__.py
    constants.py
    mng.py
    version.py
  .boring
  COPYING
  LICENSE
  MANIFEST.in
  README
  TODO
  libmng-py.tailor
  mngdisplay.py
  mnginfo.py
  mngtree.py
  setup.py