Hi,
I'm writing a file system under fuse-python. The main problem I'm
facing now is that the flags which are provided by the fuse module
when r/w are called, are screwing up the situation.
I wrote a file class for fuse as shown below.
class FlusterFile(object):
def __init__(self,
Anyone got any idea of how to create a 256 byte/block filesystem using
FUSE in python ? How to implement block level reads/writes instead of
byte level reads/writes in fuse-python ?
--
http://mail.python.org/mailman/listinfo/python-list
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/%
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
> > >>&g
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
class MedusaFile(object):
def __init__(self, path, flags, *mode):
global METHOD
global NORMAL
global SNAP
global FRESH_SNAP
self.path = path
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)
> >
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
> 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.
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 li
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
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...
>
> 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
Python's statvfs module contains the following indexes to use with
os.statvfs() that contains the specified information
statvfs.F_BSIZE
Preferred file system block size.
statvfs.F_FRSIZE
Fundamental file system block size.
statvfs.F_BLOCKS
Total number of blocks in the filesystem.
s
Hi everyone,
I need to implement custom import hooks for an application (http://
www.python.org/dev/peps/pep-0302/). I want to restrict an application
to import certain modules (say socket module). Google app engine is
using a module hook to do this (HardenedModulesHook in google/
appengine/tools/
On Feb 18, 1:57 pm, Steven D'Aprano
wrote:
> On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
> > On Feb 17, 10:48 pm, Sreejith K wrote:
> >> Hi everyone,
>
> >> I need to implement custom import hooks for an application
> >> (http://w
On Feb 18, 3:49 pm, Jean-Michel Pichavant
wrote:
> Sreejith K wrote:
> > On Feb 18, 1:57 pm, Steven D'Aprano
> > wrote:
>
> >> On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
>
> >>> On Feb 17, 10:48 pm, Sreejith K wrote:
>
>
Hi,
I know this is not the best way to do it. But I have to do it at least
to make it *hard* to decompile the python bytecode.
I want to distribute a software written in Python without the source.
So I compiled Python from source changing some opcode values (Taking
care of HAVE_ARGUMENT value) an
On Aug 18, 12:19 pm, "Diez B. Roggisch" wrote:
> Did you try installing the egg *without* pyc-files in there? Because
> naturally those shouldn't work. They shouldn't crash the interpreter
> either, but then again - you *did* modify it.
Hi Diez, thanks for the immediate reply :)
I installed the
21 matches
Mail list logo