Login   Register  
PHP Classes
elePHPant
Icontem

File: common.py

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andrea Giammarchi  >  SourceMap  >  common.py  >  Download  
File: common.py
Role: Auxiliary data
Content type: text/plain
Description: Python External Utilities
Class: SourceMap
Tokenize source code in several languages
Author: By
Last change:
Date: 8 years ago
Size: 292 bytes
 

Contents

Class file image Download
import time
def getTime(startTime):
	newtime = time.clock()
	if startTime != None:
		newtime = (newtime - startTime) / 1000
	return newtime
def file_get_contents(fileName):
	try:
		fp = file(fileName, "r")
		source = fp.read()
		fp.close()
	except:
		source = None
	return source