我需要编写一个STL文件,然后在一个脚本中解析它,所有这些都在一个可共享的python笔记本的mybinder.org实例中完成。这个是可能的吗?
发布于 2019-04-16 08:38:44
我只是为自己尝试了一下,所有需要做的事情。这种做法可能很糟糕,但却很实用。
import os
cwd = os.getcwd() # gets directory of docker environment
sys.path.append(cwd)
testfile = cwd + '/testfile.txt'
with open(testfile, 'w') as tf:
tf.write('Hello World')
with open(testfile, 'r') as tf2:
print(tf2.read())https://stackoverflow.com/questions/55698905
复制相似问题