2018-09-28, 13:08
(2018-09-27, 21:36)Spiderfish Wrote: it works now like this:Good stuff, glad you've got it working
source = 'smb://kodi:[email protected]/userdata/addon_data/test2.py'
destination = 'special://home/userdata/addon_data/test.py'
success = xbmcvfs.copy(source, destination)
thanks
And see, 3 lines of code and leveraging Kodi's inbuilt routines is much better than installing unnecessary software and adding bloat and cpu cycles to your machine for no good reason.
Now, I don't know what test2.py does, but I do remember that you were importing it and then checking for the value in 'x'. If it's the only variable or value that you need, you could write the value to a file on the remote machine and then read it into a script with
Code:
remote_file = xbmcvfs.File('smb://kodi:[email protected]/userdata/addon_data/test2.var')
x = remote_file.read()
remote_file.close()
if x == ....... etc
Again, it depends on what you are trying to achieve and if you just need the variable value, or the full script. Even if you need multiple values, as long as you parse the file in the same way that you wrote it out (comma/tab/newline separated) then you can transfer multiple values this way.