更新时间:2023-12-05 09:35:28
我正在尝试通过tcl ware命令运行脚本,无法运行它。我曾经用eclipse来编写脚本,并且能够通过eclipse运行它。
帮助我们发布一些相关代码来帮助您。回复此内容时,页面右侧会显示使用[CODE]标签的说明。谢谢。
实际上我找出了问题所在。当我编写的代码是使用python 2.0的机器时,我正在运行python 2.5。你可以帮我在python 2.0中使用这段代码吗?展开 | 选择 | Wrap | 行号
此代码采用文本文件,其中的数字由列分隔,并且将列标记为零。这就是文本文件的样子:
#Bumber of Bits
12
#Data
0 0 0 0 0 0 0 0 0 0 0 0
12 5 3 4 6 4 5 4 7 5 5 10
24 9 7 7 13 7 9 9 14 10 10 20
这就是它的作用:
#Bumber of Bits
12 br />
#Data
0 0 0 0 0 0 0 0 0 0 0
12 0 3 4 6 4 5 4 7 5 5 10
24 0 7 7 13 7 9 9 14 10 10 20I am trying to run a script though a tcl ware command and cannot get it to run. I used to eclipse to write the script and was able to run it through eclipse.
I am trying to run a script though a tcl ware command and cannot get it to run. I used to eclipse to write the script and was able to run it through eclipse.Help us help you by posting some of the relevant code. Instructions for using [ CODE ] tags are on the right hand side of the page when you reply to this. Thanks.
actually I figured out the problem. I am running python 2.5 when the code that I am writing is for a machine that uses python 2.0. Can you help me do the same with this code in python 2.0?Expand|Select|Wrap|Line Numbers
this code takes a text file with numbers that are separated by columns and zeroes out a colum. this is what the text file looks like:
#Number of Bits
12
#Data
0 0 0 0 0 0 0 0 0 0 0 0
12 5 3 4 6 4 5 4 7 5 5 10
24 9 7 7 13 7 9 9 14 10 10 20
and this is what it does:
#Number of Bits
12
#Data
0 0 0 0 0 0 0 0 0 0 0 0
12 0 3 4 6 4 5 4 7 5 5 10
24 0 7 7 13 7 9 9 14 10 10 20
in the python code the ''elem='' statement is what chooses the column