Salome HOME
projects
/
modules
/
smesh.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch 'master' into V7_5_BR
[modules/smesh.git]
/
src
/
Tools
/
Verima
/
Stats
/
utiles.py
1
#-----------------------------#
2
def writeFile( fn, txt = None):
3
#-----------------------------#
4
5
if txt == None : return
6
if fn == None : return
7
fn = unicode(fn)
8
try:
9
f = open(fn, 'wb')
10
f.write(txt)
11
f.close()
12
return 1
13
except IOError:
14
return 0
15
16
17
#---------------------#
18
def readFile( fn, txt):
19
#---------------------#
20
21
if fn == None : return
22
try:
23
f = open(fn, 'wb')
24
txt=f.read()
25
f.close()
26
except IOError:
27
txt=""
28
return txt
29