0
  1. If i execute below code , i am getting error .

  2. Basically i want to store the contents in a text file , so i am trying to get it in list and write this list in text file . Could anyone help me with this ?

  3. Directory files are printed but unable to store that in list import ftplib

    server = ftplib.FTP()

    server.connect('host',postnum)

    server.login('','')

    print("Inside....")

    list1=[]

    #list1=server.dir()

    #print(list1)

    stdout = server.dir()

    lines = str(stdout.readlines()).split("\n")

    print(lines)

GGG
  • 35
  • 1
  • 8

0 Answers0