Skip to content

Commit

Permalink
Make visualize.py compatible with Python3 (#247)
Browse files Browse the repository at this point in the history
* changed visualize to python 3

* removed backup file
  • Loading branch information
Mohamad Altaweel authored Jan 2, 2022
1 parent c484833 commit 3d17693
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions partitioned-elastic-beam/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def join_frd(frd1, frd2):
with open(frd1, "r") as f1, open(frd2, "r") as f2, open("beam_full.frd", "w") as fp:

# copy frd header in new file
for i in xrange(11):
for i in range(11):
fp.write(f1.readline())
f2.readline()

Expand Down Expand Up @@ -72,16 +72,16 @@ def join_frd(frd1, frd2):
fp.write(" -3\n")

# merging blocks of lines for each step
for i in xrange(nsteps):
print "step", i + 1
for i in range(nsteps):
print("step", i + 1)
# step header
fp.write(f1.readline())
f2.readline()
line_f1 = f1.readline()
line_f1 = line_f1[:33] + str(nsizem) + line_f1[36:]
fp.write(line_f1)
f2.readline()
for j in xrange(5):
for j in range(5):
fp.write(f1.readline())
f2.readline()

Expand Down

0 comments on commit 3d17693

Please sign in to comment.