Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread john s.
On Mar 24, 9:39 pm, Ryan Ginstrom [EMAIL PROTECTED] wrote: On Behalf Of john s. import os, sys, string, copy, getopt, linecache from traceback import format_exception #The file we read in... fileHandle = /etc/passwd srcFile = open(fileHandle,'r') srcList = srcFile.readlines()

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread Bryan Olson
john s. wrote: #/usr/bin/enviro python #Purpose - a dropped in useracct/pass file is on a new server to build a cluster... Alas there are no home #directories.. Let me rip through the passfile, grab the correct field (or build it) and use it to make the directory! import os, sys,

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread john s.
On Mar 25, 6:34 am, Bryan Olson [EMAIL PROTECTED] wrote: john s. wrote: #/usr/bin/enviro python #Purpose - a dropped in useracct/pass file is on a new server to build #a cluster... Alas there are no home directories.. Let me rip through #the passfile, grab the correct field (or build

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread Paul McGuire
This code is SO *CUTE*! I wish there was a font with little hearts to dot the 'i's with, then it would be PERFECT! -- http://mail.python.org/mailman/listinfo/python-list

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread Gabriel Genellina
En Tue, 25 Mar 2008 07:44:59 -0300, john s. [EMAIL PROTECTED] escribió: for line in open(/etc/passwd): user, _pwd = line.split(:) ^- Ok this one here we are taking a string spliting it into to variables... user gets one (the first) and _pwd gets to hold the

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread Bruno Desthuilliers
john s. a écrit : On Mar 24, 9:39 pm, Ryan Ginstrom [EMAIL PROTECTED] wrote: On Behalf Of john s. import os, sys, string, copy, getopt, linecache from traceback import format_exception #The file we read in... fileHandle = /etc/passwd srcFile = open(fileHandle,'r') srcList =

RE: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread Ryan Ginstrom
On Behalf Of Bruno Desthuilliers for line in open(/etc/passwd): NB : this idiom relies on the VM automatically closing files, which is not garanteed on each and every implementation (IIRC, jython won't do it). This is ok for QD throwaway scripts targeting CPython, but should not go

Breaking the barrier of a broken paradigm... part 1

2008-03-24 Thread john s.
Hi Everyone, I hope not to offend you with too many question.. I've been lurking a long time. I'm not keen on keeping e-mails or data stored in the public space so this is my first post to the group. That being said, I'm keen on refining my skills, I hope that I can prove that I've move on

RE: Breaking the barrier of a broken paradigm... part 1

2008-03-24 Thread Ryan Ginstrom
On Behalf Of john s. import os, sys, string, copy, getopt, linecache from traceback import format_exception #The file we read in... fileHandle = /etc/passwd srcFile = open(fileHandle,'r') srcList = srcFile.readlines() #yah, a for loop that iterates through the file of lines for i in