PyCon 2008

7 03 2008

Who all is going to PyCon 2008 in Chicago in the next week or so? If so what all are you going to be there for? Conferences? Tutorials? Sprints?

Seeing as I only live about 15 minutes from where PyCon is going to be hosted, I might show up one or two days to check it out, and have been thinking about meeting up with the Bazaar folks and the sprint they have planned. If you are going, leave a comment and maybe if I get some time off we can meet up.

::

IPv6 and Python question

27 06 2007

OK my lazywebbers with IPv6 and Python experience, this goes out to you!

I am creating an application right now, with Python of course, and I need to set an environment variable to be always on when a user logs in. I have messed with the os.environ and the os.putenv and what not, but it doesn’t work permanently. This application doesn’t do anything more than a few tests and then sets the environment variable if the tests return true. Is there an easy way to write to ~/.bashrc or ~/.bash_profile to enable the variable, and then later on if the user wants they can disable the variable which would either remove the variable all together or would set it to False?

Another question I have is with IPv6. Is there an easy way to test and see if your network is an IPv6 network or an IPv4 network? Right now I am grepping /var/log/syslog for ‘no IPv6 router present’ and printing the ‘no’. If it is ‘no’ then the network is IPv4, and if it returns 0, then it is an IPv6 network. This is rather hackish I feel, but it does work. Just wondering if there is a better method to do this simple task.

Thanks everyone!

::