TypeError:'str'对象不可调用 [英] TypeError: 'str' object is not callable

查看:84
本文介绍了TypeError:'str'对象不可调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我努力工作,因为我是新手......

我写下了整个下面的剧本。 ..

这个脚本假设ping:


a主IP(只有一个),(手动输入原始输入)
$ b输入IPssss后,$ b和$

二级IP(小于10),(手动输入原始输入)


....


如果主要丢失数据包的平均值超过2%,那么ping命令会对主要数据执行ping操作,而不是名为myprimarylogs.xls的文件。

并开始ping二级IP,

如果次级超过2%,则转到相同的上述文件:''myprimarylogs.xls''


一旦计数完成(2次计数后)比打印电子邮件。


有人可以提供我的建议,


我总是收到这个错误消息:

Hi, everybody,

Did work hard on this one, as I`m a newbies...
I did write the entire below script...
This script is suppose to ping:

a primary IP (only one), (entered manually w raw-input)
and than
secondaries IP ( less than 10), (entered manually w raw-input)

after entering the IPsssss....

the ping command does ping the primary, if the primary loss packets average is more than 2% than it goes to a files called ''myprimarylogs.xls''
and start to ping the secondaries IP,
and if the secondaries if more than 2 % than goes to the same above file called: ''myprimarylogs.xls''

once counter finish (after 2 count) than print e-mail.

Is someone can provide my suggestion,

I always get this error msg :

展开 | 选择 | Wrap | 行号

推荐答案


大家好,


在这个上做了很多努力,因为我是新手...

我写下了整个下面的脚本...

这个脚本假设要ping :


a主要IP(只有一个),(手动输入原始输入)

而不是

次要IP(少于比10), (输入手动输入原始输入)


输入IPss后....


ping命令执行ping主操作,如果主要丢失数据包的平均值超过2%,而不是名为myprimarylogs.xls的文件。

并开始ping二级IP,

如果辅助文件超过2%,而不是去上面相同的文件:''myprimarylogs.xls''


一旦计数完成(2次计数后)比打印电子邮件。


有人可以提供我的建议,


我总是收到这个错误消息:

Hi, everybody,

Did work hard on this one, as I`m a newbies...
I did write the entire below script...
This script is suppose to ping:

a primary IP (only one), (entered manually w raw-input)
and than
secondaries IP ( less than 10), (entered manually w raw-input)

after entering the IPsssss....

the ping command does ping the primary, if the primary loss packets average is more than 2% than it goes to a files called ''myprimarylogs.xls''
and start to ping the secondaries IP,
and if the secondaries if more than 2 % than goes to the same above file called: ''myprimarylogs.xls''

once counter finish (after 2 count) than print e-mail.

Is someone can provide my suggestion,

I always get this error msg :

展开 | 选择 | Wrap | 行号


第二个想法,在脚本中使用与函数同名的变量 where 可能是一个坏主意。
On second thought, having a variable anywhere in the script with the same name as a function is probably a bad idea.





我筋疲力尽,有人可以帮我,

我确实改变了你以前的评论,但现在,我已经

以下内容:


一旦我在python idle中输入以下内容:

Hi,

I`m exhausted, is someone can assist me,
I did change as your previous comments, but now, I have
the following:

Once I entered the following in python idle:

展开 | 选择 | Wrap | 行号


这篇关于TypeError:'str'对象不可调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆