FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 02-27-2010, 08:05 PM
Benjamin Donnachie
 
Default Python Script Issue

On 27 February 2010 20:56, Joseph L. Casale <jcasale@activenetwerx.com> wrote:
> I did see the python docs link and saw that line, this script for cluster server
> is known to work as is.

I haven't got ready access to a CentOS box - what version of Python
are you using?

atexit is only available in v2.1.3 and later

Ben
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-27-2010, 08:08 PM
"Joseph L. Casale"
 
Default Python Script Issue

>I haven't got ready access to a CentOS box - what version of Python
>are you using?
>
>atexit is only available in v2.1.3 and later

Hi,
Its 2.4, stock...

Thanks,
jlc
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-27-2010, 08:50 PM
JohnS
 
Default Python Script Issue

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@centos.org
> http://lists.centos.org/mailman/listinfo/centos

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-27-2010, 08:56 PM
JohnS
 
Default Python Script Issue

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


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-27-2010, 09:56 PM
"Joseph L. Casale"
 
Default Python Script Issue

>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.

Well after rereading it I see that the second note of recommended things not to do
has been done Given I don't python, I dare not criticize Hopefully the cluster
list has some suggestions, there are people running some variant of it, and it's a
perfect solution for my need

Digressing a bit, but what's python got over Perl, anything? I am not sure how much
work is involved, but I might have a look at writing something fast in Perl, all I
need to do is drop a port on a procurve to fence IO using snmp v3. SNMP::Util looks
pretty basic?

Given I don't need broad support, I can probably just hack something as I only use
procurves.

Thanks guys
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-27-2010, 10:48 PM
Benjamin Donnachie
 
Default Python Script Issue

On 27 February 2010 22:56, Joseph L. Casale <jcasale@activenetwerx.com> wrote:
> there are people running some variant of it, and it's a perfect solution for my need

How did you get the script onto your box? Python can be very picky
with whitespace.

Ben
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 03:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org