403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/gnome-python2-gnomevfs-2.28.0/pygvfsmethod/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/gnome-python2-gnomevfs-2.28.0/pygvfsmethod/README
This a Gnome VFS module written in python that lets you browse python modules and objects.

How to test:
------------
 cp pyfs.conf ~/.gnome2/vfs/modules/
 export PYTHONPATH=$(pwd):$PYTHONPATH
 mkdir /tmp/testing
 export TMPDIR=/tmp/testing
 nautilus --no-desktop pyfs:///

 You will be presented with a list of modules and you can navigate
modules/objects.  Notice that only currently imported modules appear
initially, but if you hit Ctr-L you can force browsing of particular
modules by entering pyfs:///<module> as URL.  For example,
pyfs:///gtk/gdk will let you browse the module gtk.gdk.

How does GnomeVFS decide to use your module:
--------------------------------------------

Suppose you want to register some code to handle 'pyfs://'.  You put
"pyfs: pythonmethod" in a gnome-vfs configuration file[1].  Therefore,
when a pyfs:// URI is requested, gnome-vfs loads libpythonmethod.so,
which receives the 'pyfs' method name and then tries to import the
python module 'pyfs'.  The standard python path, plus
$(libdir)/gnome-vfs-2.0/modules, is searched for the module.  In this
module, it looks for a class called 'pyfs_method'.  It then creates a
new instance of this class, and tries to get the vfs_xxxx methods,
which are then used to implement the VFS operations.

Caveat: currently the class has to be an old-style class, so don't
subclass object.

[1] As you are asked to do in the "How to test" section; but notice
that to install it system-wide you have to copy the file to
/etc/gnome-vfs-2.0/modules/ instead of ~/.gnome2/vfs/modules/.

Youez - 2016 - github.com/yon3zu
LinuXploit