Open file on remote linux server

Neil Hodgson nyamatongwe+thunder at gmail.com
Wed Sep 23 20:12:59 EDT 2009


The Bear:
> Hi I'm looking to do something like this
> 
> f = f.openfileobj(remotefileloc, localfilelikeobj)
> 
> my remote files are on a solaris box that i can access using ssh (could
> prehap request othe protocols if necessary)

   You could look into GIO which is a virtual file system API used in
GTK+. I was a bit put off by it (necessarily) exposing the asynchronous
nature of remote file operations. Its fun to write a small amount of
asynchronous file I/O code but ensuring that all of your code handles
all the potential problems with remote connections is tedious.

Base library:
http://library.gnome.org/devel/gio/stable/

Python bindings:
http://library.gnome.org/devel/pygobject/stable/

   Before committing to this, you should double check that these are the
currently supported APIs. There was an earlier API GnomeVFS that has
been deprecated for several years now and I don't follow this area closely.

   Neil



More information about the Python-list mailing list