久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Python ftplib - 指定端口

Python ftplib - specify port(Python ftplib - 指定端口)
本文介紹了Python ftplib - 指定端口的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我想用 Python 的 ftplib 客戶端指定端口(而不是默認(rèn)端口 21).

I would like to specify the port with Python's ftplib client (instead of default port 21).

代碼如下:

from ftplib import FTP
ftp = FTP('localhost') # connect to host, default port

有沒有一種簡單的方法可以指定備用端口?

Is there an easy way to specify an alternative port?

推薦答案

>>> from ftplib import FTP
>>> HOST = "localhost"
>>> PORT = 12345 # Set your desired port number
>>> ftp = FTP()
>>> ftp.connect(HOST, PORT)

這篇關(guān)于Python ftplib - 指定端口的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Why I cannot make an insert to Python list?(為什么我不能插入 Python 列表?)
Insert a column at the beginning (leftmost end) of a DataFrame(在 DataFrame 的開頭(最左端)插入一列)
Python psycopg2 not inserting into postgresql table(Python psycopg2 沒有插入到 postgresql 表中)
list extend() to index, inserting list elements not only to the end(list extend() 索引,不僅將列表元素插入到末尾)
How to add element in Python to the end of list using list.insert?(如何使用 list.insert 將 Python 中的元素添加到列表末尾?)
TypeError: #39;float#39; object is not subscriptable(TypeError:“浮動(dòng)對(duì)象不可下標(biāo))
主站蜘蛛池模板: 久草在线在线精品观看 | 国产精品久久久久久久一区二区 | 国产成人综合在线 | 亚洲区中文字幕 | 中文字幕一区二区三区四区 | 国产亚洲一区二区精品 | 请别相信他免费喜剧电影在线观看 | 国产精品久久久久久一区二区三区 | 国产精品久久一区二区三区 | 久久最新| 国产精品国产精品国产专区不片 | 伊人久久综合 | 欧美一区在线视频 | 午夜日韩 | 国产999精品久久久久久 | 黑人精品欧美一区二区蜜桃 | 一区中文字幕 | 天天综合国产 | 国产一二三区免费视频 | av中文字幕在线观看 | 一级特黄色毛片 | 精品国产乱码久久久久久老虎 | 天天综合久久 | 99精品网 | 日韩视频福利 | 亚洲福利| 中文字幕一区二区三区不卡 | 麻豆久久久久久久久久 | 成人依人| 欧美一级欧美一级在线播放 | 国产精品夜夜夜一区二区三区尤 | 亚洲美女一区二区三区 | av黄色在线观看 | 成人av鲁丝片一区二区小说 | 日本精品视频一区二区三区四区 | 久色网 | 亚洲精品视频在线播放 | 大陆一级毛片免费视频观看 | 国产亚洲精品久久久久动 | 91国产视频在线观看 | 亚洲免费在线视频 |