By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,387 Members | 1,716 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,387 IT Pros & Developers. It's quick & easy.

How do I write raspberrypi path

P: 1
I writing a program in python on ubuntu, to remove a file by accessing RaspberryPi, connected with network.
For file selection I am using a command called askopenfilename.
But I am struggling in specifying the Path of RaspberryPi.

IP =""
Username = "pi"
Password ="raspberry"

Expand|Select|Wrap|Line Numbers
  1. from tkFileDialog import askopenfilename
  2.     import paramiko
  4.     client = paramiko.SSHClient()
  5.     client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  6.     client.connect('', username='pi', password='raspberry')
  8.     checkdir = "/home/pi/python"
  9.     name1= askopenfilename(title = "Select File For Removal", initialdir = checkdir)
  10.     stdin, stdout, stderr = client.exec_command('ls -l')
  11.     for line in stdout:
  12.        print '... ' + line.strip('\n')
  13.     client.close()
Feb 10 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.