Advertisement

07.10.2008 at 11:10PM PDT, ID: 23556339
[x]
Attachment Details

global name 'do_traceroute' is not defined?

Asked by summer_soccer in Python Scripting Language

Tags: python

I got the error message:  "NameError: global name 'do_traceroute' is not defined". Can anyone help me find what is wrong with my python code below?

------------------------------------------------------------------------------------------------------------------------------
import thread
import os

class Connecter:

... ...

    def do_traceroute():
        os.system('traceroute www.google.com')

        ... ...

    def got_message(self, connection, message):
 
        ... ...

            print 'Here is a test!'
            thread.start_new(do_traceroute, ())

        ... ...


Start Free Trial
 
Loading Advertisement...
 
[+][-]07.10.2008 at 11:48PM PDT, ID: 21980372

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Python Scripting Language
Tags: python
Sign Up Now!
Solution Provided By: RichieHindle
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628