getting current UNIX uid

2006-07-06 Thread Johhny
Hello, I am trying to get the user that is running the scripts uid, I have had a look at the pwd module and it does not appear to offer that functionality. Is there any way within python to get that information ? Regards, Johhny -- http://mail.python.org/mailman/listinfo/python-list

Python password display

2006-07-06 Thread Johhny
around that. Is there any built in method to do that or any how-to's around the Internet / Advice that I could research? Regards, Johhny. -- http://mail.python.org/mailman/listinfo/python-list

regular expressions and matches

2006-03-30 Thread Johhny
he same thing in php very easily but python appears to be getting the better of me. Any assistance and advice would be greatly appreciated. Regards, Johhny -- http://mail.python.org/mailman/listinfo/python-list

Re: replacing \n characters in a hash

2006-01-26 Thread Johhny
Hello All, thanks for your help. I got it working and learnt some more things which is always great. Your assitance has been very useful. Regards, Johhny -- http://mail.python.org/mailman/listinfo/python-list

Re: replacing \n characters in a hash

2006-01-26 Thread Johhny
Hello, In response to that the output is this : 'Updated libc-client packages that fix a buffer overflow issue are now\navailable.\n\nThis update has been rated as having moderate security impact by the Red\nHat Security Response Team.' -- http://mail.python.org/mailman/listinfo/python-list

Re: replacing \n characters in a hash

2006-01-26 Thread Johhny
Hello, Here is the code (minus my details section). server = xmlrpclib.ServerProxy(url) session = server.auth.login(username,password) #functions. def getErrata(): channel_label = 'rhel-i386-as-4' errata = server.channel.software.list_errata(session,channel_label,start_date,end_date)

Re: replacing \n characters in a hash

2006-01-26 Thread Johhny
Hello, Thankyou for your response, If I check that the errara_package value is with a print I get the following. ===SNIP=== Updated libc-client packages that fix a buffer overflow issue are now available. This update has been rated as having moderate security impact by the Red Hat Security Respo

replacing \n characters in a hash

2006-01-26 Thread Johhny
Red\nHat Security Response Team. What I had attempted to do is use the replace() function but it consistantly comes up with the following errors: Traceback (most recent call last): File "rhn_errata.py", line 63, in ? errata_package = errata_package.strip('\n','') At

accessing hardware information using python

2006-01-20 Thread Johhny
have any ideas or any recommended reading about this matter? Regards, Johhny -- http://mail.python.org/mailman/listinfo/python-list

Re: reading files

2005-12-19 Thread Johhny
Thanks for your assistance, Is it proper practice in python to flush any memory when you exit? for example Ive read the file into memory, when I close the file do I also have to flush any memory allocations ? -- http://mail.python.org/mailman/listinfo/python-list

reading files

2005-12-19 Thread Johhny
:00.0 + When I run the script I get the following: python reading_file.py Does anyone have any advice on this issue at all. Regards, Johhny. -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie to python

2005-12-16 Thread Johhny
Thankyou, I appreciate your help. I did not realise that python would behave that way. -- http://mail.python.org/mailman/listinfo/python-list

text manipulation

2005-12-16 Thread Johhny
rl/sed Its very easy, However Im having issues to do it in python. Any advice would be great. Regards, Johhny. -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie to python

2005-12-16 Thread Johhny
Hello, Here is the script then the problem. cat testing.py import crypt import random, string def getsalt(chars = string.letters + string.digits): return random.choice(chars) + random.choice(chars) username = raw_input('password : ') print crypt.crypt(username,getsalt()) python testing.py

Re: newbie to python

2005-12-15 Thread Johhny
Hello, If I go into the python shell and type help("modules") It does show that crypt is there. However Im unsure if that means that there is help or its got the module installed. >From a dpkg --list python* I have ii python2.4-crypto 2.0+dp1-2ubuntu1 cryptog