Skip to content

Commit

Permalink
Upgrade to python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Kraska committed Mar 6, 2022
1 parent 80a340d commit fe77eae
Show file tree
Hide file tree
Showing 18 changed files with 49 additions and 49 deletions.
6 changes: 3 additions & 3 deletions NonLinear/Cut/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -47,4 +47,4 @@ def move(old_snap):
os.system("ccx solve")
os.system("monitor.py solve")
os.system("cgx -b post.fbd")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions NonLinear/Honeycomb/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -47,4 +47,4 @@ def move(old_snap):
os.system("ccx Biegung")
os.system("monitor.py Biegung")
os.system("cgx -b post.fbd")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions NonLinear/Rohrknie/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -50,4 +50,4 @@ def move(old_snap):
os.system("ccx solid-static")
os.system("monitor.py solid-static")
os.system("cgx -b post-solid-static.fbd")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions NonLinear/Sandwichtest/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -46,4 +46,4 @@ def move(old_snap):
os.system("ccx Biegung")
os.system("monitor.py Biegung")
os.system("cgx -b post.fbl")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions NonLinear/Sections/Plastic/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -48,4 +48,4 @@ def move(old_snap):
os.system("monitor.py Biegung")
os.system("cgx -b movie.fbl")
os.system("cgx -b chart.fbl")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions NonLinear/Sections/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -47,4 +47,4 @@ def move(old_snap):
os.system("ccx Biegung")
os.system("monitor.py Biegung")
os.system("cgx -b post.fbl")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions NonLinear/TensileTest/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -46,4 +46,4 @@ def move(old_snap):
os.system("ccx Zug")
os.system("monitor.py Zug")
os.system("cgx -b post.fbd")
move(snap)
#move(snap)
8 changes: 4 additions & 4 deletions Pillow/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

""" Test for the pillow example """

Expand All @@ -15,7 +15,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


def run():
Expand All @@ -31,7 +31,7 @@ def run():
# loop over element types
for elty in eltyps.keys():
# open results summary file
print elty
print(elty)
# read pre.fbd and write it to pre-auto.fbd
fout = open("run_auto.fbd", "w")
fout.write("ulin "+elty+"\n")
Expand Down Expand Up @@ -79,4 +79,4 @@ def move(old_snap):
modify_path()
snap = os.listdir(os.curdir)
run()
move(snap)
#move(snap)
2 changes: 1 addition & 1 deletion Scripts/param.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
This script searches for strings in
angle brackets <...>
Expand Down
2 changes: 1 addition & 1 deletion Scripts/periodic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
This script creates equations for periodic boundary conditions of a brick-shaped RVE. We assume that it's corners are at (0,0,0) and (lx,ly,lz).
The dimensions are determined from the nodal co-ordinates.
Expand Down
2 changes: 1 addition & 1 deletion Scripts/separate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
This script replicates nodes to avoid nodal averaging of results.
The elements are scanned and if a node is used repeatedly, it is replaced by
Expand Down
6 changes: 3 additions & 3 deletions Test/Joints/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -49,4 +49,4 @@ def move(old_snap):
os.system("param.py par.pre2.fbl")
os.system("cgx -b pre2.fbl")
os.system("cgx -b kin2.fbl")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions Test/Meanrot/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -43,4 +43,4 @@ def move(old_snap):
modify_path()
snap = os.listdir(os.curdir)
os.system("cgx -b run.fbl")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions Test/Supports/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -50,4 +50,4 @@ def move(old_snap):
os.system("cgx -b post.fbl")
os.system("ccx trfix")
os.system("cgx -b trfix.fbl")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions Test/Supports1/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -44,4 +44,4 @@ def move(old_snap):
snap = os.listdir(os.curdir)
os.system("cgx -b gmsh.fbl")
os.system("cgx -b run.fbl")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions Thermal/Thermal distortion/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -47,4 +47,4 @@ def move(old_snap):
os.system("cgx -b pre.fbd")
os.system("ccx Tjoint")
os.system("cgx -b post.fbd")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions Thermal/Thermal shock/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -47,4 +47,4 @@ def move(old_snap):
os.system("monitor.py solve")
os.system("cgx -b anim.fbl")
os.system("cgx -b post.fbl")
move(snap)
#move(snap)
6 changes: 3 additions & 3 deletions Thermal/Thermografie/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
import os
import multiprocessing
import shutil
Expand All @@ -12,7 +12,7 @@ def modify_path():
scripts_dir = os.path.join(scripts_dir, 'Scripts')
if not scripts_dir in os.environ['PATH']:
os.environ['PATH'] += os.pathsep + scripts_dir
print '\nPATH = {}\n'.format(os.environ['PATH'])
print('\nPATH = {}\n'.format(os.environ['PATH']))


# Move new files and folders to 'Refs'
Expand Down Expand Up @@ -46,4 +46,4 @@ def move(old_snap):
os.system("ccx Naht")
os.system("cgx -b post.fbl")
os.system("cgx -b plots.fbl")
move(snap)
#move(snap)

0 comments on commit fe77eae

Please sign in to comment.