Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/ein16/synth/d2/test_observed.py
ViewVC logotype

Diff of /branches/ein16/synth/d2/test_observed.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4235, Tue Jul 19 22:26:44 2016 UTC revision 4236, Wed Jul 20 03:02:00 2016 UTC
# Line 9  Line 9 
9  def getObserv_1(p_out):  def getObserv_1(p_out):
10      obs = []      obs = []
11      name = p_out+".txt"      name = p_out+".txt"
12      print "looking for-1",name      #print "looking for-1",name
13      if(os.path.exists(name)):      if(os.path.exists(name)):
14          print "thinks we have it"          #print "thinks we have it"
15          obsf = open(name, 'r')          obsf = open(name, 'r')
16          obsf.readline()          obsf.readline()
17          for line in obsf:          for line in obsf:
18              print "line",line              #print "line",line
19              m = re.split(r'\n',line)              m = re.split(r'\n',line)
20              if m:              if m:
21                  u0 = m[0]                  u0 = m[0]
# Line 27  Line 27 
27  def getObserv_t(p_out, n):  def getObserv_t(p_out, n):
28      obs = []      obs = []
29      name = p_out+".txt"      name = p_out+".txt"
30      print "looking for-t",name      #print "looking for-t",name
31      if(os.path.exists(name)):      if(os.path.exists(name)):
32          print "thinks we have it"          #print "thinks we have it"
33          obsf = open(name, 'r')          obsf = open(name, 'r')
34          obsf.readline()          obsf.readline()
35          for line in obsf:          for line in obsf:
36              print "line",line              #print "line",line
37              m = re.split(r'\s',line)              m = re.split(r'\s',line)
38              if m:              if m:
39                  cur= []                  cur= []

Legend:
Removed from v.4235  
changed lines
  Added in v.4236

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0