> It's not a redirect to a file. Fuse calls the 'read' function on the
> class, the read function does a 'return' of the data, and fuse passes
> the data up through the OS layer to be the result of the 'read' call
> made by less.
By redirection I meant reading the snapshot file instead of the
ori
On Mar 24, 4:45 pm, "R. David Murray" wrote:
> Sreejith K wrote:
> > On Mar 24, 2:12 pm, Ant wrote:
> > > On Mar 24, 7:59 am, Sreejith K wrote:
> > > ...
>
> > > > data is the whole file, but 'less' gives only the two lines...
>
> > > From this statement (that you are using less), it appears th
Sreejith K wrote:
> On Mar 24, 2:12 pm, Ant wrote:
> > On Mar 24, 7:59 am, Sreejith K wrote:
> > ...
> >
> > > data is the whole file, but 'less' gives only the two lines...
> >
> > From this statement (that you are using less), it appears that you are
> > redirecting sys.stdout to a file or sim
On Mar 24, 2:12 pm, Ant wrote:
> On Mar 24, 7:59 am, Sreejith K wrote:
> ...
>
> > data is the whole file, but 'less' gives only the two lines...
>
> From this statement (that you are using less), it appears that you are
> redirecting sys.stdout to a file or similar - if that is the case, you
> m
On Mar 24, 7:59 am, Sreejith K wrote:
...
> data is the whole file, but 'less' gives only the two lines...
>From this statement (that you are using less), it appears that you are
redirecting sys.stdout to a file or similar - if that is the case, you
may need to flush or close the output file befo
On Mar 24, 7:15 am, "Gabriel Genellina"
wrote:
> En Mon, 23 Mar 2009 21:37:14 -0300, R. David Murray
> escribió:
>
>
>
> > Steve Holden wrote:
> >> Sreejith K wrote:
> >> >> Try and write an example that shows the problem in fifteen lines or
> >> >> less. Much easier for us to focus on the iss
En Mon, 23 Mar 2009 21:37:14 -0300, R. David Murray
escribió:
Steve Holden wrote:
Sreejith K wrote:
>> Try and write an example that shows the problem in fifteen lines or
>> less. Much easier for us to focus on the issue that way.
>
> import os
> def read(length, offset):
>os.chdir('/mnt/
Steve Holden wrote:
> Sreejith K wrote:
> >> Try and write an example that shows the problem in fifteen lines or
> >> less. Much easier for us to focus on the issue that way.
> >
> > import os
> > def read(length, offset):
> > os.chdir('/mnt/gfs_local/')
> > snap = open('mango.txt_snaps/s
Sreejith K wrote:
>> Try and write an example that shows the problem in fifteen lines or
>> less. Much easier for us to focus on the issue that way.
>
> import os
> def read(length, offset):
> os.chdir('/mnt/gfs_local/')
> snap = open('mango.txt_snaps/snap1/0','r')
> snap.seek(of
Sreejith K wrote:
> > Try and write an example that shows the problem in fifteen lines or
> > less. Much easier for us to focus on the issue that way.
>
> import os
> def read(length, offset):
> os.chdir('/mnt/gfs_local/')
> snap = open('mango.txt_snaps/snap1/0','r')
> snap.seek
> Try and write an example that shows the problem in fifteen lines or
> less. Much easier for us to focus on the issue that way.
import os
def read(length, offset):
os.chdir('/mnt/gfs_local/')
snap = open('mango.txt_snaps/snap1/0','r')
snap.seek(offset)
data = snap.
> Try and write an example that shows the problem in fifteen lines or
> less. Much easier for us to focus on the issue that way.
import os
def read(length, offset):
os.chdir('/mnt/gfs_local/')
snap = open('mango.txt_snaps/snap1/0','r')
snap.seek(offset)
data = snap.
> Try and write an example that shows the problem in fifteen lines or
> less. Much easier for us to focus on the issue that way.
import os
def read(length, offset):
os.chdir('/mnt/gfs_local/')
snap = open('mango.txt_snaps/snap1/0','r')
snap.seek(offset)
data = snap.
Sreejith K wrote:
> The break and continue problem was actually my own mistake. I wrote
> no_blks = length/4096 + 1, so the loop actually executes twice. Sorry
> for my idiotic mistake
>
That's good!
> But the read() problem still persists.
>
Try and write an example that shows the probl
The break and continue problem was actually my own mistake. I wrote
no_blks = length/4096 + 1, so the loop actually executes twice. Sorry
for my idiotic mistake
But the read() problem still persists.
Thanks..
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 21, 10:54 am, "R. David Murray" wrote:
> Sreejith K wrote:
> > tf.writelines("Reading from Base File\n")
> > self.file.seek(block*4096 + off%4096)
> > bend = 4096-(off%4096)
> >
Sreejith K wrote:
> tf.writelines("Reading from Base
> File\n")
> self.file.seek(block*4096 + off%4096)
> bend = 4096-(off%4096)
> if length-bend
class MedusaFile(object):
def __init__(self, path, flags, *mode):
global METHOD
global NORMAL
global SNAP
global FRESH_SNAP
self.path = path
On Mar 21, 12:58 am, I V wrote:
> On Fri, 20 Mar 2009 07:03:35 -0700, Sreejith K wrote:
> > I'm using the above codes in a pthon-fuse's file class's read function.
> > The offset and length are 0 and 4096 respectively for my test inputs.
> > When I open a file and read the 4096 bytes from offset,
On Fri, 20 Mar 2009 07:03:35 -0700, Sreejith K wrote:
> I'm using the above codes in a pthon-fuse's file class's read function.
> The offset and length are 0 and 4096 respectively for my test inputs.
> When I open a file and read the 4096 bytes from offset, only a few lines
> are printed, not the w
Sreejith K wrote:
I'm using the above codes in a pthon-fuse's file class's read
function. The offset and length are 0 and 4096 respectively for my
test inputs. When I open a file and read the 4096 bytes from offset,
only a few lines are printed, not the whole file. Actually the file is
only a fe
On Fri, 20 Mar 2009 at 07:09, Sreejith K wrote:
On Mar 20, 4:43?pm, "R. David Murray" wrote:
Sreejith K wrote:
Hi,
snapdir = './mango.txt_snaps'
snap_cnt = 1
block = 0
import os
os.chdir('/mnt/gfs_local')
snap = open(snapdir + '/snap%s/%s' % (repr(snap_cnt), repr(block)),'r')
snap.read()
On Mar 20, 4:43 pm, "R. David Murray" wrote:
> Sreejith K wrote:
> > Hi,
>
> > >>> snapdir = './mango.txt_snaps'
> > >>> snap_cnt = 1
> > >>> block = 0
> > >>> import os
> > >>> os.chdir('/mnt/gfs_local')
> > >>> snap = open(snapdir + '/snap%s/%s' % (repr(snap_cnt), repr(block)),'r')
> > >>> snap
Sreejith K wrote:
> Hi,
>
> >>> snapdir = './mango.txt_snaps'
> >>> snap_cnt = 1
> >>> block = 0
> >>> import os
> >>> os.chdir('/mnt/gfs_local')
> >>> snap = open(snapdir + '/snap%s/%s' % (repr(snap_cnt), repr(block)),'r')
> >>> snap.read()
> 'dfdfdgagdfgdf\ngdgfadgagadg\nagafg\n\nfs\nf\nsadf\n\
Hi,
>>> snapdir = './mango.txt_snaps'
>>> snap_cnt = 1
>>> block = 0
>>> import os
>>> os.chdir('/mnt/gfs_local')
>>> snap = open(snapdir + '/snap%s/%s' % (repr(snap_cnt), repr(block)),'r')
>>> snap.read()
'dfdfdgagdfgdf\ngdgfadgagadg\nagafg\n\nfs\nf\nsadf\n\nsdfsdfsadf\n'
>>> snapdir + '/snap%s/%
25 matches
Mail list logo