Avatar ·

How to change Python version on Ubuntu

📁 ternary, AI

I installed Ubuntu, and as I understand it, Python 2.7 was installed along with it in the /home/user/.local/lib folder. I installed Python 3.5, and after that, I download various libraries via pip, in particular scipy, and it gets installed in the Python 2.7 folder, but I don't use Python 2.

Help me either remove Python 2.7 or prioritize 3.5. I can't find enough information on Google to solve this.

Avatar ·

Use the pysmb library. It allows you to specify a login and password for authentication.

from smb.SMBConnection import SMBConnectionconn = SMBConnection(userid, password, client_machine_name, remote_machine_name, use_ntlm_v2 = True)conn.connect(server_ip, 139)filelist = conn.listPath('shared_folder_name', '/')

To attempt entering a different login or password, wrap the code in a try except block.

Log in to leave an answer

Blogs