Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
7dfb02d0
Kaydet (Commit)
7dfb02d0
authored
Ara 05, 2002
tarafından
Skip Montanaro
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
allow optional port specified as part of the hostname, e.g.,
"www.zope.org:8021".
üst
e07e18d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
ftpmirror.py
Tools/scripts/ftpmirror.py
+6
-3
No files found.
Tools/scripts/ftpmirror.py
Dosyayı görüntüle @
7dfb02d0
...
...
@@ -4,7 +4,7 @@
usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat]
[-l username [-p passwd [-a account]]]
hostname [remotedir [localdir]]
hostname
[:port]
[remotedir [localdir]]
-v: verbose
-q: quiet
-i: interactive mode
...
...
@@ -13,7 +13,7 @@ usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat]
-r: remove local files/directories no longer pertinent
-l username [-p passwd [-a account]]: login info (default .netrc or anonymous)
-s pat: skip files matching pattern
hostname: remote host
hostname: remote host
w/ optional port separated by ':'
remotedir: remote directory (default initial)
localdir: local directory (default current)
"""
...
...
@@ -52,6 +52,9 @@ def main():
account
=
''
if
not
args
:
usage
(
'hostname missing'
)
host
=
args
[
0
]
port
=
0
if
':'
in
host
:
host
,
port
=
host
.
split
(
':'
,
1
)
try
:
auth
=
netrc
.
netrc
()
.
authenticators
(
host
)
if
auth
is
not
None
:
...
...
@@ -79,7 +82,7 @@ def main():
#
f
=
ftplib
.
FTP
()
if
verbose
:
print
'Connecting to
%
s...'
%
`host`
f
.
connect
(
host
)
f
.
connect
(
host
,
port
)
if
not
nologin
:
if
verbose
:
print
'Logging in as
%
s...'
%
`login or 'anonymous'`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment