0

I am using a linux server to run scripts and manage a database. I get to this using a SSH through PuTTY. On my windows machine there is a mapped drive to a directory (/mapped_drive/) on this server (X:) with all of my files on.

I.e. in windows the file structure is like this:

X:\mapped_drive\all_folders\etc

In linux it is like this:

/mapped_drive/all_folders/etc

I edit my files on this X:\ drive through a text editor in windows and then I run these scripts through the command line on the linux server.

I have many data files on my Y:\ drive on my windows machine that I would like to access when I am using the server. It is not viable for me to copy these over due to the sheer amount and size of them.

I am using python programs to analyse these data files. I am wondering how I can access these files using python if that is possible. If it is not possible, is there a way I can access the files on my Y:\ drive through PuTTY?

1
  • You can try on the windows machine to link the Y:\ drive to a folder on the X:\ drive with mklink /d "y:\" "x:\mapped_drive\all_folders\Y". Not sure though whether you can link a mapped drive to another mapped drive or not.
    – mazs
    Jun 3 '16 at 8:35
2

If I understand you correctly, you want to edit files under Windows locally and run these as Python scripts on the Linux server without having to copy them manually over to the server.

The easiest way would be to define X:\mapped_drive\all_folders\etc as a share on Windows and to mount it with e.g. smbmount or pref. cifs on the Linux server. Once mounted you can call Python on the files within the mount point. You can look at: Mount Windows Shares Permanently for help on how to do the mounting. Do the same for Y:\.

Note, however, that files will still be "copied/read" across the network and depending on circumstances especially with large files or across multiple network segments, this will cause lagging.

Second possibility: Why not use Python directly on Windows?

python.org/downloads/windows/ should have everything you need or if you need other *nix components, use Cygwin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.