일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- c#
- Kotlin
- PostgreSQL
- array
- Redshift
- gas
- Google Excel
- google apps script
- hive
- Tkinter
- Java
- django
- Apache
- PANDAS
- matplotlib
- SQL
- GIT
- Github
- list
- numpy
- math
- Mac
- dataframe
- Excel
- Google Spreadsheet
- Python
- 파이썬
- string
- PySpark
- Today
- Total
목록Python (379)
달나라 노트
import ftplib s3_host = '11.111.111.111' s3_user_id = 'user_1' s3_user_password = 'pw_1' ftp = ftplib.FTP() ftp.encoding = 'utf-8' ftp.connect(s3_host) # connect to s3 ftp.login(s3_user_id, s3_user_password) # login to s3 csv_to_upload = 'test.csv' file = open(csv_to_upload, 'rb') ftp.storbinary('STOR '+ csv_to_upload, file) print('File list :', ftp.nlst()) file.close() ftp.quit() # quit s3 - Ou..
import ftplib s3_host = '11.111.111.111' s3_user_id = 'user_1' s3_user_password = 'pw_1' ftp = ftplib.FTP() ftp.encoding = 'utf-8' ftp.connect(s3_host) # connect to s3 ftp.login(s3_user_id, s3_user_password) # login to s3 print('Current directory :', ftp.pwd()) # make directory in s3 try: ftp.mkd('/test1/test2/test3/') except Exception as e: print(e) try: ftp.mkd('/test1/test2/test4/') except Ex..
import ftplib s3_host = '11.111.111.111' s3_user_id = 'user_1' s3_user_password = 'pw_1' ftp = ftplib.FTP() ftp.encoding = 'utf-8' ftp.connect(s3_host) # connect to s3 ftp.login(s3_user_id, s3_user_password) # login to s3 print('Current directory :', ftp.pwd()) # make directory in s3 try: ftp.mkd('/test1/test2/test3/') except Exception as e: print(e) ftp.cwd('/test1/test2/test3/') print('New dir..
import ftplib s3_host = '11.111.111.111' s3_user_id = 'user_1' s3_user_password = 'pw_1' ftp = ftplib.FTP() ftp.encoding = 'utf-8' ftp.connect(s3_host) # connect to s3 ftp.login(s3_user_id, s3_user_password) # login to s3 # show current directory print('Current directory :', ftp.pwd()) ftp.quit() # quit s3 - Output Current directory : / ftplib의 pwd는 현재 디렉토리를 출력해줍니다. 로그인한 후의 Directory는 root direc..