Example #1
0
print "Using the FIFE python module found here: ", os.path.dirname(
    fife.__file__)

from fife.extensions.pychan.fife_pychansettings import FifePychanSettings
from scripts.rpg import RPGApplication

TDS = FifePychanSettings(app_name="rpg", settings_file="./settings.xml")


def main():
    app = RPGApplication(TDS)
    app.run()


if __name__ == '__main__':
    if TDS.get("FIFE", "ProfilingOn"):
        import hotshot, hotshot.stats
        print "Starting profiler"
        prof = hotshot.Profile("fife.prof")
        prof.runcall(main)
        prof.close()
        print "analysing profiling results"
        stats = hotshot.stats.load("fife.prof")
        stats.strip_dirs()
        stats.sort_stats('time', 'calls')
        stats.print_stats(20)
    else:
        if TDS.get("FIFE", "UsePsyco"):
            # Import Psyco if available
            try:
                import psyco
Example #2
0
from fife import fife
print("Using the FIFE python module found here: ", os.path.dirname(fife.__file__))

from fife.extensions.pychan.fife_pychansettings import FifePychanSettings
from scripts.rpg import RPGApplication


TDS = FifePychanSettings(app_name="rpg",
              settings_file="./settings.xml")


def main():
	app = RPGApplication(TDS)
	app.run()

if __name__ == '__main__':
	if TDS.get("FIFE", "ProfilingOn"):
		import hotshot, hotshot.stats
		print("Starting profiler")
		prof = hotshot.Profile("fife.prof")
		prof.runcall(main)
		prof.close()
		print("analysing profiling results")
		stats = hotshot.stats.load("fife.prof")
		stats.strip_dirs()
		stats.sort_stats('time', 'calls')
		stats.print_stats(20)
	else:		
		main()
Example #3
0
			mapSaveDir = getUserDataDirectory("fife", "rio_de_hola") + "/maps"
			
			# create the directory structure if it does not exist
			if not os.path.isdir(mapSaveDir):
				os.makedirs(mapSaveDir)
			
			# save map file to directory
			self.world.save(mapSaveDir + "/savefile.xml")
		else:
			self.world.pump()

def main():
	app = IslandDemo()
	app.run()


if __name__ == '__main__':
	if TDS.get("FIFE", "ProfilingOn"):
		import hotshot, hotshot.stats
		print("Starting profiler")
		prof = hotshot.Profile("fife.prof")
		prof.runcall(main)
		prof.close()
		print("analysing profiling results")
		stats = hotshot.stats.load("fife.prof")
		stats.strip_dirs()
		stats.sort_stats('time', 'calls')
		stats.print_stats(20)
	else:		
		main()
Example #4
0
print "Using the FIFE python module found here: ", os.path.dirname(fife.__file__)

from fife.extensions.pychan.fife_pychansettings import FifePychanSettings
from scripts.rpg import RPGApplication


TDS = FifePychanSettings(app_name="rpg",
              settings_file="./settings.xml")


def main():
	app = RPGApplication(TDS)
	app.run()

if __name__ == '__main__':
	if TDS.get("FIFE", "ProfilingOn"):
		import hotshot, hotshot.stats
		print "Starting profiler"
		prof = hotshot.Profile("fife.prof")
		prof.runcall(main)
		prof.close()
		print "analysing profiling results"
		stats = hotshot.stats.load("fife.prof")
		stats.strip_dirs()
		stats.sort_stats('time', 'calls')
		stats.print_stats(20)
	else:
		if TDS.get("FIFE", "UsePsyco"):
			# Import Psyco if available
			try:
				import psyco