Hey Guys, I am trying to get a python script running but I get the following error: atexit.register(atexit_handler) NameError: global name 'atexit' is not defined A Google search doesn't really help me, except confirm that I don't know anything about python:) Anyone got any ideas? Thanks, jlc
On Sat, Feb 27, 2010 at 3:46 PM, Joseph L. Casale <jcasale at activenetwerx.com> wrote:> Hey Guys, > I am trying to get a python script running but I get the following error: > > atexit.register(atexit_handler) > NameError: global name 'atexit' is not defined > > A Google search doesn't really help me, except confirm that I don't know > anything about python:) > > Anyone got any ideas? > Thanks, > jlc >Try the python mailing list, irc channel, support area of the site you downloaded the script, or any other place where it would be even remotely on-topic. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20100227/5d796a93/attachment.html>
On 27 February 2010 20:46, Joseph L. Casale <jcasale at activenetwerx.com> wrote:> ? ?atexit.register(atexit_handler) > NameError: global name 'atexit' is not definedHave you remembered import atexit ?> A Google search doesn't really help me, except confirm that I don't know > anything about python:)http://www.google.co.uk/search?q=python+atexit http://docs.python.org/library/atexit.html http://python.active-venture.com/lib/atexit-example.html http://www.python.org/doc/3.0.1/library/atexit.html Or even http://mail.python.org/mailman/listinfo/python-list Ben
On Sat, 2010-02-27 at 20:46 +0000, Joseph L. Casale wrote:> Hey Guys, > I am trying to get a python script running but I get the following error: > > atexit.register(atexit_handler) > NameError: global name 'atexit' is not defined > > A Google search doesn't really help me, except confirm that I don't know > anything about python:) > > Anyone got any ideas? > Thanks, > jlc--- This is a tad newer but should give you a clue on using "atexit". Somewhere in the script there is a error. Prolly a function in it somewhere. Look for what the script is cleaning up or attempting to. John> > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos
On Sat, 2010-02-27 at 20:46 +0000, Joseph L. Casale wrote:> Hey Guys, > I am trying to get a python script running but I get the following error: > > atexit.register(atexit_handler) > NameError: global name 'atexit' is not defined > > A Google search doesn't really help me, except confirm that I don't know > anything about python:) > > Anyone got any ideas? > Thanks, > jlc---> This is a tad newer but should give you a clue on using "atexit". > Somewhere in the script there is a error. Prolly a function in it > somewhere. Look for what the script is cleaning up or attempting to.Sorry about that... http://www.python.org/doc/2.5.2/lib/module-atexit.html Which I forgot to post but Benjamin already linked it to you, opps. John
>Did this get solved in the end? > >BenNope:) I started writing a Perl script to accomplish what I need yesterday. Given I have zero experience with python, it was the easier solution although I would have loved to stick with a provided solution in the event I end up overlooking something. Thanks for the effort none the less, jlc