Pyro4 - reading files

G

ganea.ionut.iulian

Hello there.

I am currently working on a project involving the use of Pyro4.

I have a scenario.

We have the pc named A, and a pc named B.

On pc B lies a python script, that includes pyro, and a method for reading files.

On pc A, we create an instance to the pyro object on pc B. And we call the method for reading files.

I want to read a file that lies on pc B, from pc A using the method of the pyro object i just created.

Is it possible?

Thank you.
 
I

Irmen de Jong

Hello there.

I am currently working on a project involving the use of Pyro4.

I have a scenario.

We have the pc named A, and a pc named B.

On pc B lies a python script, that includes pyro, and a method for reading files.

On pc A, we create an instance to the pyro object on pc B. And we call the method for reading files.

I want to read a file that lies on pc B, from pc A using the method of the pyro object i just created.

Is it possible?

Thank you.


Sure, and what you are describing, tells me that you have implemented the solution
already... :)

Interesting might still be that Pyro4 provides some basic stuff by default to get a very
basic file transfer feature; see the getfile method exposed by the built-in Flame
object: http://pythonhosted.org/Pyro4/flame.html

You can of course implement this yourself by simply adding a method to your own Pyro
object that reads the required file and just returns the file contents, like you would
write any normal python method.

That being said, please be aware of the following:

- Pyro is not an efficient choice for transferring large amounts of file data. If you
have performance considerations, it may be better to select a different means of file
transfer (such as ftp or rsync or whatever)

- Security implications because you are providing remote access to local file data.
Again, you might want to select a different way to transfer your files instead that by
itself provides a means of securing access to the files (or you'll have to program it
yourself as part of your Pyro solution)


Irmen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top