Spyder, Run script located on a remote server

I am starting to use Spyder to edit code located on a remote server. I am able to connect to the core of my remote server. To be able to open and save (load, load) scripts, I installed Expandrive, which displayed the server as if it were an external hard drive on my machine. Linux server, my local one is Windows.

I thought this would work, but I still get the error file not found.

enter image description here

Any idea why?

In this other post: Spyder: how to edit a python script locally and execute it on a remote kernel? , it is suggested (second answer) to add specific code to the batch file %runso that the program understands the dirpath syntax for Linux.

    # ----added to remap local dir to remote dir-------
    localpath = "Z:\wk"
    remotepath = "/mnt/sdb1/wk"
    if localpath in filename:
        # convert path to linux path
        filename = filename.replace(localpath, remotepath)
        filename = filename.replace("\\", "/")
    # ----- END mod

, ?

+4

Source: https://habr.com/ru/post/1666122/


All Articles