Kartic wrote:
[EMAIL PROTECTED] said the following on 1/30/2005 7:43 PM:
Hello,
I want to do the following:
def do_load(self, arg):
sitefile = file('sitelist', 'r+', 1)
while True:
siteline = sitefile.readline()
site_rawlist = siteline.split()
sitelist[site_rawlist[0]] = site_rawlist[1:]
if len(sit
Yeah I kind of want to 'reinvent' the pickle and I am aware of that.
The problem for me is that the output that pickle dumps to a file is
too 'cryptic' as I want the ability to edit the corresponding textfile
directly and easily, so I'm going for an own way.
But yes, Kartic and you were basically
Kartic said the following on 1/30/2005 8:21 PM:
[EMAIL PROTECTED] said the following on 1/30/2005 7:43 PM:
Hi - It looks like your code encountered a blank line when you got this
error.
You should move "if len(siteline) == 0" part right after your readline.
The way you have done it really does
[EMAIL PROTECTED] said the following on 1/30/2005 7:43 PM:
Hello,
I want to do the following:
def do_load(self, arg):
sitefile = file('sitelist', 'r+', 1)
while True:
siteline = sitefile.readline()
site_rawlist = siteline.split()
sitelist[site_rawlist[0]] = site_rawlist[1:]
if len(siteline) == 0:
b
[EMAIL PROTECTED] wrote:
> Hello,
> I want to do the following:
>
> def do_load(self, arg):
> sitefile = file('sitelist', 'r+', 1)
> while True:
> siteline = sitefile.readline()
> site_rawlist = siteline.split()
> sitelist[site_rawlist[0]] = site_rawlist[1:]
> if len(siteline) == 0:
> break
>
> I w
On 30 Jan 2005 16:43:26 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hello,
> I want to do the following:
>
> def do_load(self, arg):
> sitefile = file('sitelist', 'r+', 1)
> while True:
> siteline = sitefile.readline()
> site_rawlist = siteline.split()
> sitelist[site_rawlist[0]] = site_