Re: FTP without username and password

2022-12-07 Thread Carlos Bermúdez
El 6/12/2022 a las 9:32 p. m., Dennis Lee Bieber escribió: On Tue, 6 Dec 2022 20:42:42 +0100, ^Bart declaimed the following: I tried the written Python code but it needs to insert a username and password so it's a different service than TFTP but maybe there's also a code to do it in Python! ;

Re: FTP without username and password

2022-12-07 Thread Barry
 > On 7 Dec 2022, at 16:49, ^Bart wrote: > >  >> It's a whole different protocol. TFTP is simplified to the point it >> will fit on embedded devices which don't need security (the assumption >> being that one has the embedded device physically present, FTP assumes >> distributed networks). >

Re: FTP without username and password

2022-12-07 Thread Grant Edwards
On 2022-12-07, Dennis Lee Bieber wrote: > It's a whole different protocol. TFTP is simplified to the point it > will fit on embedded devices which don't need security (the > assumption being that one has the embedded device physically > present, FTP assumes distributed networks). One of the big

Re: FTP without username and password

2022-12-07 Thread ^Bart
It's a whole different protocol. TFTP is simplified to the point it will fit on embedded devices which don't need security (the assumption being that one has the embedded device physically present, FTP assumes distributed networks). https://wiki.python.org/moin/tftp I never used TFTP so

Re: FTP without username and password

2022-12-07 Thread ^Bart
The Python code you showed was implementing an FTP server. That's a completely different protocol from TFTP. There are TFTP implementations for Pythong. This one works well: https://github.com/msoulier/tftpy I didn't know the difference of FTP and TFTP so... I thought TFTP was just a FTP witho

Re: FTP without username and password

2022-12-06 Thread Dennis Lee Bieber
On Tue, 6 Dec 2022 20:42:42 +0100, ^Bart declaimed the following: > >I tried the written Python code but it needs to insert a username and >password so it's a different service than TFTP but maybe there's also a >code to do it in Python! ;) > It's a whole different protocol. TFTP is si

Re: FTP without username and password

2022-12-06 Thread Grant Edwards
On 2022-12-06, ^Bart wrote: >> In general, "anonymous FTP" is done technically with a username and >> password. Can you look at how the device tries to connect, and then >> make that username (probably "anonymous") and that password (could be >> anything, traditionally was an email address) valid

Re: FTP without username and password

2022-12-06 Thread ^Bart
In general, "anonymous FTP" is done technically with a username and password. Can you look at how the device tries to connect, and then make that username (probably "anonymous") and that password (could be anything, traditionally was an email address) valid for fetching? Thanks for your reply, I

Re: FTP without username and password

2022-12-06 Thread ^Bart
The code above already does make the directory available without a username and password. Do you mean you need the directory to be *writable* without a username and password? If so try the '-w' option. Thanks for your reply, I solved by TFTP SolarWind free tool, like what I wrote in another pos

Re: FTP without username and password

2022-12-06 Thread Chris Angelico
On Wed, 7 Dec 2022 at 02:51, ^Bart wrote: > > Hi Guys, > > usually I use this code on my Debian Bullseye: > > # python3 -m pyftpdlib -i 192.168.0.71 -p 21 -d /home/my_user/ftp > > It works, it's simply easy and perfect but... a device in my lan needs a > ftp folder without username and password! >

Re: FTP without username and password

2022-12-06 Thread Jon Ribbens via Python-list
On 2022-12-06, ^Bart wrote: > Hi Guys, > > usually I use this code on my Debian Bullseye: > > # python3 -m pyftpdlib -i 192.168.0.71 -p 21 -d /home/my_user/ftp > > It works, it's simply easy and perfect but... a device in my lan needs a > ftp folder without username and password! > > I tried to s

Re: ftp - delete multiple files of same type

2013-02-05 Thread chris . annin
> > > im trying to delete all text files from an ftp directory. is there a way to > > delete multiple files of the same extension? > > > > > > I came up with the following code below which works but I have to append > > the string because ftp.nlst returns: > > > > > > "-rwx-- 1 user gro

Re: ftp - delete multiple files of same type

2013-02-05 Thread MRAB
On 2013-02-05 17:29, chris.an...@gmail.com wrote: im trying to delete all text files from an ftp directory. is there a way to delete multiple files of the same extension? I came up with the following code below which works but I have to append the string because ftp.nlst returns: "-rwx--

Re: ftp - delete multiple files of same type

2013-02-05 Thread Dave Angel
On 02/05/2013 12:29 PM, chris.an...@gmail.com wrote: im trying to delete all text files from an ftp directory. is there a way to delete multiple files of the same extension? I came up with the following code below which works but I have to append the string because ftp.nlst returns: "-rwx

Re: FTP problem

2011-01-15 Thread Justin Ezequiel
'indexftp.barcap.com' only (sans the 'ftp.' prefix) allows me to connect to an FTP server >ftp indexftp.barcap.com Connected to usftp.barcap.com. 220-Connected to usftp.barcap.com. 220 FTP server ready. User (usftp.barcap.com:(none)): -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP problem

2011-01-14 Thread Anurag Chourasia
Please make the below change to get past this problem Change *ftp.*indexftp.barcap.com to indexftp.barcap.com Regards, Anurag On Fri, Jan 14, 2011 at 5:25 PM, Thomas Philips wrote: > I'm using ftplib for the first time, and am having trouble getting it > to work. I type > > >>> from ftplib

Re: FTP problem

2011-01-14 Thread Sudheer Satyanarayana
gaierror: [Errno 11001] getaddrinfo failed That part of the error indicates, your computer is unable to resolve the IP address for the hostname ftp.indexftp.barcap.com Make sure the hostname is valid. -- With warm regards, Sudheer. S Personal home page - http://sudheer.net | Tech Chorus -

Re: FTP problem

2011-01-14 Thread python
Thomas, > ftp = FTP('ftp.indexftp.barcap.com', 'A Valid Username', ' A Valid Password') Your FTP URI is bad. When I try to connect to your site from the Windows FTP client, I get the following response: Unknown host ftp.indexftp.barcap.com. Malcolm -- http://mail.python.org/mailman/listinfo/py

Re: ftp and python

2010-04-11 Thread Giampaolo Rodola'
On 8 Apr, 07:24, John Nagle wrote: > Tim Chase wrote: > > Matjaz Pfefferer wrote: > >> What would be the easiest way to copy files from one ftp > >> folder to another without downloading them to local system? > > > As best I can tell, this isn't well-supported by FTP[1] which doesn't > > seem to h

Re: ftp and python

2010-04-08 Thread John Nagle
Anssi Saari wrote: John Nagle writes: In theory, the FTP spec supports "three-way transfers", where the source, destination, and control can all be on different machines. But no modern implementation supports that. I remember even using that way back when, Unix machines in the 1990s.

Re: ftp and python

2010-04-08 Thread Anssi Saari
John Nagle writes: > In theory, the FTP spec supports "three-way transfers", where the > source, destination, and control can all be on different machines. > But no modern implementation supports that. I remember even using that way back when, Unix machines in the 1990s. But, server to ser

Re: ftp and python

2010-04-08 Thread Tim Chase
Simon wrote: You could user FTP.voidcmd() E.G. ftp.voidcmd('RNFT filename.txt')ftp.voidcmd('RNTO newdir/filename.txt') From the rfc: RENAME FROM (RNFR) This command specifies the old pathname of the file which is to be renamed. This command must be immediately followed by a "rename

Re: ftp and python

2010-04-08 Thread Simon
You could user FTP.voidcmd() E.G. ftp.voidcmd('RNFT filename.txt')ftp.voidcmd('RNTO newdir/filename.txt') >From the rfc: RENAME FROM (RNFR) This command specifies the old pathname of the file which is to be renamed. This command must be immediately followed by a "rename to" command spec

Re: ftp and python

2010-04-07 Thread John Nagle
Tim Chase wrote: Matjaz Pfefferer wrote: What would be the easiest way to copy files from one ftp folder to another without downloading them to local system? As best I can tell, this isn't well-supported by FTP[1] which doesn't seem to have a native "copy this file from server-location to se

Re: ftp and python

2010-04-07 Thread Tim Chase
Matjaz Pfefferer wrote: What would be the easiest way to copy files from one ftp folder to another without downloading them to local system? As best I can tell, this isn't well-supported by FTP[1] which doesn't seem to have a native "copy this file from server-location to server-location bypa

Re: FTP Offset larger than file.

2009-07-28 Thread Bakes
On Jul 28, 5:36 pm, Dave Angel wrote: > Bakes wrote: > > On 28 July, 15:18, Bakes wrote: > > >> On 28 July, 15:01, Hrvoje Niksic wrote: > > >>> Bakes writes: > > The error I get is: > ftplib.error_temp: 451-Restart offset 24576 is too large for file size > 22852. > 451 Resta

Re: FTP Offset larger than file.

2009-07-28 Thread Dave Angel
Bakes wrote: On 28 July, 15:18, Bakes wrote: On 28 July, 15:01, Hrvoje Niksic wrote: Bakes writes: The error I get is: ftplib.error_temp: 451-Restart offset 24576 is too large for file size 22852. 451 Restart offset reset to 0 which tells me that the local file is larger t

Re: FTP Offset larger than file.

2009-07-28 Thread Hrvoje Niksic
Bakes writes: >> > As a quick fix, you can add a file.flush() line after the >> > file.write(...) line, and the problem should go away. >> >> Thank you very much, that worked perfectly. > > Actually, no it didn't. That fix works seamlessly in Linux, but gave > the same error in a Windows environm

Re: FTP Offset larger than file.

2009-07-28 Thread Bakes
On 28 July, 15:18, Bakes wrote: > On 28 July, 15:01, Hrvoje Niksic wrote: > > > > > Bakes writes: > > > The error I get is: > > > ftplib.error_temp: 451-Restart offset 24576 is too large for file size > > > 22852. > > > 451 Restart offset reset to 0 > > > which tells me that the local file is la

Re: FTP Offset larger than file.

2009-07-28 Thread Bakes
On 28 July, 15:01, Hrvoje Niksic wrote: > Bakes writes: > > The error I get is: > > ftplib.error_temp: 451-Restart offset 24576 is too large for file size > > 22852. > > 451 Restart offset reset to 0 > > which tells me that the local file is larger than the external file, > > by about a kilobyte.

Re: FTP Offset larger than file.

2009-07-28 Thread Hrvoje Niksic
Bakes writes: > The error I get is: > ftplib.error_temp: 451-Restart offset 24576 is too large for file size > 22852. > 451 Restart offset reset to 0 > which tells me that the local file is larger than the external file, > by about a kilobyte. Certainly, the local file is indeed that size, so > m

Re: FTP libs for Python?

2009-02-20 Thread Gabriel Genellina
En Fri, 20 Feb 2009 13:24:37 -0200, Thomas Allen escribió: On Feb 20, 9:45 am, coldpizza wrote: Why don't you just use Curl? It does a dozen of protocols including SFTP. And if the command line version is not enough for you then there are Python bindings for Curl. I'm actually hoping to e

Re: FTP libs for Python?

2009-02-20 Thread Thomas Allen
On Feb 20, 9:45 am, coldpizza wrote: > Why don't you just use Curl? It does a dozen of protocols including > SFTP. And if the command line version is not enough for you then there > are Python bindings for Curl. I'm actually hoping to eventually package these tools using py2exe for some co-worker

Re: FTP libs for Python?

2009-02-20 Thread Jean-Paul Calderone
On Fri, 20 Feb 2009 06:22:29 -0800 (PST), Thomas Allen wrote: I'm interested in writing a script to ease deployment of minor changes on some websites here, and it would involve some SFTP transfers. Do you know of good alternatives to ftplib, which is relatively low- level? Twisted includes FT

Re: FTP libs for Python?

2009-02-20 Thread Mike Kent
I use Fabric (http://www.nongnu.org/fab/) as my Python-based deployment tool, but it uses ssh/scp, not sftp. -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP libs for Python?

2009-02-20 Thread coldpizza
Why don't you just use Curl? It does a dozen of protocols including SFTP. And if the command line version is not enough for you then there are Python bindings for Curl. On Feb 20, 4:22 pm, Thomas Allen wrote: > I'm interested in writing a script to ease deployment of minor changes > on some websi

Re: FTP example going through a FTP Proxy

2009-01-08 Thread jakecjacobson
On Jan 7, 3:56 pm, jakecjacobson wrote: > On Jan 7, 2:11 pm, jakecjacobson wrote: > > > > > On Jan 7, 12:32 pm, jakecjacobson wrote: > > > > Hi, > > > > I need to write a simple Python script that I can connect to a FTP > > > server and download files from the server to my local box.  I am > > >

Re: ftp seems to get a delayed reaction.

2009-01-08 Thread Antoon Pardon
On 2009-01-06, Jeremy.Chen wrote: > ftp.storbinary("STOR ftp-tst/ftp-file\n", fl) > -- > I think the params after STOR should't be a path,should be splited. > ftp.cwd("ftp-tst") > ftp.storbinary("STOR ftp-file\n", fl) No that isn't the problem. The problem is the '\n' at the end of the

Re: FTP example going through a FTP Proxy

2009-01-07 Thread jakecjacobson
On Jan 7, 2:11 pm, jakecjacobson wrote: > On Jan 7, 12:32 pm, jakecjacobson wrote: > > > Hi, > > > I need to write a simple Python script that I can connect to a FTP > > server and download files from the server to my local box.  I am > > required to go through a FTP Proxy and I don't see any exa

Re: FTP example going through a FTP Proxy

2009-01-07 Thread jakecjacobson
On Jan 7, 12:32 pm, jakecjacobson wrote: > Hi, > > I need to write a simple Python script that I can connect to a FTP > server and download files from the server to my local box.  I am > required to go through a FTP Proxy and I don't see any examples on how > to do this.  The FTP proxy doesn't req

Re: ftp seems to get a delayed reaction.

2009-01-06 Thread Jeremy.Chen
On Jan 6, 7:56 pm, Antoon Pardon wrote: > I have managed to prune the script, so I can post it here: > > == > > from ftplib import FTP > > bckrt = "/tmpstor/rcpc42" > > def process(): >   print "making directory" >   try: >     ftp.mkd('ftp-t

Re: ftp seems to get a delayed reaction.

2009-01-06 Thread Antoon Pardon
I have managed to prune the script, so I can post it here: == from ftplib import FTP bckrt = "/tmpstor/rcpc42" def process(): print "making directory" try: ftp.mkd('ftp-tst') print "mkdir succeeded" except Exception, ErrMsg:

Re: ftp design question

2008-12-28 Thread nemo
On Dec 29, 12:31 pm, Steve Holden wrote: > nemo wrote: > > Hi,all. > > I'm on a toy ftp project and I want it to be convinient for the user > > to cancel an undergoing downloading while continue others. The > > following code explains: > > for file in download_files: > >     self.ftp.retrbinary('R

Re: ftp EOF error, thread and process

2008-12-28 Thread Gabriel Genellina
En Sun, 28 Dec 2008 10:44:11 -0200, nemo escribió: My code like this raise an EOFError, It happens if I use the Process module, while, if I use thread.start_new_thread(ftp.pwd,()), it seems works well. And I wondered why. from ftplib import FTP import thread from multiprocessing import Process

Re: ftp design question

2008-12-28 Thread Steve Holden
nemo wrote: > Hi,all. > I'm on a toy ftp project and I want it to be convinient for the user > to cancel an undergoing downloading while continue others. The > following code explains: > for file in download_files: > self.ftp.retrbinary('RETR '+file, fileHandler) > Thers seems not a solid way

Re: ftp retrlines with re...

2008-12-08 Thread Peter Otten
[EMAIL PROTECTED] wrote: > filelist=server.retrlines('LIST') This does not do what you think it does. >>> help("ftplib.FTP.retrlines") gives """ Help on method retrlines in module ftplib: retrlines(self, cmd, callback=None) unbound ftplib.FTP method Retrieve data in line mode. The arg

Re: ftp retrlines with re...

2008-12-08 Thread Gabriel Genellina
En Fri, 05 Dec 2008 12:51:58 -0200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: Ive been working on an application quite some time now and i wanted to include something to let the user load a new version. i therefore tried to include this here: Too much code, unclear question... please pos

Re: FTP via web browser

2008-10-27 Thread Diez B. Roggisch
rodmc schrieb: Hi, I have posted elsewhere about a related topic. But I an curious is it possible to set up a web form which people select a file for upload which is then upload it via FTP protocol to the web server - the entire process must be web based and not require an external FTP client. T

Re: FTP via web browser

2008-10-27 Thread Tino Wildenhain
rodmc wrote: Hi, I have posted elsewhere about a related topic. But I an curious is it possible to set up a web form which people select a file for upload which is then upload it via FTP protocol to the web server - the entire process must be web based and not require an external FTP client. The

Re: FTP upload issue

2008-05-15 Thread afrobeard
First of all, it would be better to use:- ftp.storlines("STOR " + remoteFileName, open(localFileName, "rb")) rather than:- ftp.storlines("STOR" + filename, file(filename)) Since the Python Documentation has this to say for open(): [Although ] When opening a file, it's preferable to use open()

Re: ftp recursively

2008-03-20 Thread Steven D'Aprano
On Wed, 19 Mar 2008 23:53:22 -0700, Jeff Schwab wrote: > The point of rsync is to keep a local directory tree in sync with a > remote one, by transferring only change-sets that are conceptually > similar to patches. If you're only transferring files once, there's no > particular benefit (AFAIK) t

Re: ftp recursively

2008-03-20 Thread Paul Rubin
Jeff Schwab <[EMAIL PROTECTED]> writes: > I thought os.walk was for locally mounted directories... How is it > relevant on remote filesystems? Yes, os.walk is for local directories. I thought you wanted to push a local tree to a remote host. For pulling, yes, you need to do something different;

Re: ftp recursively

2008-03-19 Thread Jeff Schwab
Paul Rubin wrote: > Jeff Schwab <[EMAIL PROTECTED]> writes: >> ftping it as a flat file, and untarring it on the other side. Of >> course, the motivation wasn't just to get the files from point A to >> point B using Unix (which I already know how to do), but to take >> advantage of an opportunity

Re: ftp recursively

2008-03-19 Thread Paul Rubin
Jeff Schwab <[EMAIL PROTECTED]> writes: > ftping it as a flat file, and untarring it on the other side. Of > course, the motivation wasn't just to get the files from point A to > point B using Unix (which I already know how to do), but to take > advantage of an opportunity to learn some Python; ne

Re: ftp recursively

2008-03-18 Thread Jeff Schwab
Gabriel Genellina wrote: > En Tue, 18 Mar 2008 18:25:28 -0300, Jeff Schwab <[EMAIL PROTECTED]> > escribió: > >> I need to move a directory tree (~9GB) from one machine to another on >> the same LAN. What's the best (briefest and most portable) way to do >> this in Python? > > See Tools/scripts/

Re: ftp recursively

2008-03-18 Thread Gabriel Genellina
En Tue, 18 Mar 2008 18:25:28 -0300, Jeff Schwab <[EMAIL PROTECTED]> escribió: > I need to move a directory tree (~9GB) from one machine to another on > the same LAN. What's the best (briefest and most portable) way to do > this in Python? See Tools/scripts/ftpmirror.py in your Python installat

Re: ftp recursively

2008-03-18 Thread Arnaud Delobelle
Jeff Schwab wrote: > I need to move a directory tree (~9GB) from one machine to another on > the same LAN. What's the best (briefest and most portable) way to do > this in Python? > > I see that urllib has some support for getting files by FTP, but that it > has some trouble distinguishing files

Re: ftp recursively

2008-03-18 Thread Paul Rubin
Jeff Schwab <[EMAIL PROTECTED]> writes: > I need to move a directory tree (~9GB) from one machine to another on > the same LAN. What's the best (briefest and most portable) way to do > this in Python? os.popen("rsync ...") -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP Date Format Function

2007-06-15 Thread samuraisam
On Jun 14, 10:53 pm, billiejoex <[EMAIL PROTECTED]> wrote: > On 14 Giu, 19:25, samuraisam <[EMAIL PROTECTED]> wrote: > > > > > FTP LST/LIST/NLST date field formatting function for all those seekers > > out there... > > > import time > > import datetime > > > def ftpdateformat(value): > > """For

Re: FTP Date Format Function

2007-06-14 Thread billiejoex
On 14 Giu, 19:25, samuraisam <[EMAIL PROTECTED]> wrote: > FTP LST/LIST/NLST date field formatting function for all those seekers > out there... > > import time > import datetime > > def ftpdateformat(value): > """Formats dates from most FTP servers""" > if ":" in value: # within 6 months >

Re: FTP Date Format Function

2007-06-14 Thread MC
Thank. -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP/SSL

2007-06-08 Thread billiejoex
On 8 Giu, 16:54, "Dave Borne" <[EMAIL PROTECTED]> wrote: > > I'm trying to figure out how to use FTP/SSL (FTPS) - just as a client. Can I > > do this in Python? Is everything I need in ftplib? Where else do I look? And > > - any good newbie references on using FTPS? > > Hi, Nancy, > I'm not sure i

Re: FTP/SSL

2007-06-08 Thread Dave Borne
> I'm trying to figure out how to use FTP/SSL (FTPS) - just as a client. Can I > do this in Python? Is everything I need in ftplib? Where else do I look? And > - any good newbie references on using FTPS? Hi, Nancy, I'm not sure if ftplib can handle ssh or not, but googling for "python sftp" turne

Re: FTP over SSL

2006-10-24 Thread Stefan Schwarzer
On 2006-10-20 15:50, Tor Erik Soenvisen wrote: > Anyone know about existing code supporting FTP over SSL? > I guess pycurl http://pycurl.sourceforge.net/ could be used, but that > requires knowledge of libcurl, which I haven't. Possibly you could use M2Crypto [1]. It has a FTP_TLS class in module

Re: FTP over SSL

2006-10-20 Thread Larry Bates
Tor Erik Soenvisen wrote: > Hi, > > Anyone know about existing code supporting FTP over SSL? > I guess pycurl http://pycurl.sourceforge.net/ could be used, but that > requires knowledge of libcurl, which I haven't. > > regards I don't know if it helps at all, but you can do https put of a file o

Re: FTP (ftplib) output capture

2006-08-01 Thread ChaosKCW
Hi Thanks for the reply. I will send it in when I am done :-) Simon Forman wrote: > ChaosKCW wrote: > > Hi > > > > Has anyone caputerd the output from the std ftp lib? It seems a bit > > annoying that everything is printed to stdout. It means incorporating > > this into any real program is a pr

Re: FTP (ftplib) output capture

2006-07-31 Thread Simon Forman
ChaosKCW wrote: > Hi > > Has anyone caputerd the output from the std ftp lib? It seems a bit > annoying that everything is printed to stdout. It means incorporating > this into any real program is a problem. It would have been much better > if they used the std logging module and hooked up a consol

Re: FTP filename escaping

2006-05-11 Thread Edward Elliott
Serge Orlov wrote: > Almad wrote: >> OK, after some investigation...problem is in non-latin characters in >> filenames on ftp. >> >> Yes, users should be killed for this, > > It's futile, users will always find a way to crash you program :) And > you can't kill them all, there are too many of them

Re: FTP filename escaping

2006-05-11 Thread Serge Orlov
Almad wrote: > OK, after some investigation...problem is in non-latin characters in > filenames on ftp. > > Yes, users should be killed for this, It's futile, users will always find a way to crash you program :) And you can't kill them all, there are too many of them. > but I would like to handle

Re: FTP filename escaping

2006-05-11 Thread Almad
OK, after some investigation...problem is in non-latin characters in filenames on ftp. Yes, users should be killed for this, but I would like to handle it somehow... I can't figure out how it's handled by protocol, ftplib seems to just strip those characters... Thank You, Almad -- http://mai

Re: ftp connection and commands (directroy size, etc)

2006-04-14 Thread Stefan Schwarzer
Hi Arne On 2006-04-12 18:05, Arne wrote: > I am working on Windows XP and I want to do the following: > > 1. Connecting to a server using ftp > 2. Getting the directory structure and the size of each directory in the > root > 3. Getting the owner of a file > > All these steps I want to do with

Re: ftp connection and commands (directroy size, etc)

2006-04-13 Thread Fulvio
Alle 00:05, giovedì 13 aprile 2006, Arne ha scritto: > a=ftp.sendcmd('Dir') > By trying to get the directory with 'dir' Are you sure that the command 'dir" is understood via ftp? IF I'm not wrong would be 'ls' o list. But since I don't have such psckage on my system, it's recommended you read the

Re: ftp connection and commands (directroy size, etc)

2006-04-12 Thread maxou
Hello Arne > 1. Connecting to ftp is OK > 2. Getting the directory structure and the size of each directory in the > root -If you want to get the structure of your directory you can simply do this: print ftp.dir(path_of_your_directory) or by creating a list do this a=ftp.dir(path_of_your_direct

Re: ftp putting information in a variable

2006-04-11 Thread Stefan Schwarzer
Hi Arne, On 2006-04-08 12:44, Arne wrote: > I am looking for a way to put ftp returns in a variable. > > My OS is XP and I want to get the owner of a file. So I have to > > connect to ftp. But I am stacked with how I can receive this > information and put it in a variable. you can use a library t

Re: FTP

2006-04-07 Thread Fredrik Lundh
"Arne" <[EMAIL PROTECTED]> wrote: > I want to connecto to a ftp server. There I woult like to read the > directiroy and getting the filename, file owner and the file size. > > How can I do this in python and if possible please post the code for it. there's an example in the library reference that

Re: FTP

2006-04-07 Thread Rene Pijlman
Arne: >I want to connecto to a ftp server. There I woult like to read the >directiroy and getting the filename, file owner and the file size. > >How can I do this in python http://docs.python.org/lib/module-ftplib.html -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread mbukhin
Got it. Thanks for your help. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > Right. You know I took your suggestion for more print statements and > found the offending line. > > [SNIP] > print "close start" > conn.close() > print "close end" > #return self.voidresp() > print "end of everything" > > self.voi

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread mbukhin
Right. You know I took your suggestion for more print statements and found the offending line. [SNIP] print "close start" conn.close() print "close end" #return self.voidresp() print "end of everything" self.voidresp() was hanging! Do I need it? The file

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > Thanks, but that didn't help either. Since storbinary is being called > from the main script, I can't see where else it could be getting hung > up. Are there any other debugging techniques I could explore? > > I'm sending a 24k image and it is viewable on the destinatio

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread mbukhin
Thanks, but that didn't help either. Since storbinary is being called from the main script, I can't see where else it could be getting hung up. Are there any other debugging techniques I could explore? I'm sending a 24k image and it is viewable on the destination server, so it's making it over.

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > I'm using the ftp library (layer on top of sockets) to transfer files > from a series 60 to an ftp site. everything works fine, the whole > file gets uploaded but the command never returns! so > i call: > > ftp.storbinary('STOR ' + filename,F,1024) # store the image >

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread mbukhin
Thanks for the 'debug mode' tip. My file is only 24k (a photo) and the whole thing makes it to the FTP server. It's just the command never returns so my program cannot continue execution. When I do turn debugging on, the last command I see is: *resp* '150 Connection accepted' Could it be my FT

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-28 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I'm using the ftp library (layer on top of sockets) to transfer files > from a series 60 to an ftp site. everything works fine, the whole > file gets uploaded but the command never returns! so > i call: > > ftp.storbinary('STOR ' + filename,F,1024) # store the image >

Re: ftp: get list of files

2006-02-09 Thread Paul Watson
Lawrence Oluyede wrote: > "eels" <[EMAIL PROTECTED]> writes: > > >>With yyy = ftp.retrlines('LIST') I get this listing at stdout, but I >>need this information at variable yyy. >>How can I resolve this problem? > > > As written in the doc retrlines has an optional parameter (a callback > funct

Re: ftp: get list of files

2006-02-07 Thread Lawrence Oluyede
"eels" <[EMAIL PROTECTED]> writes: > With yyy = ftp.retrlines('LIST') I get this listing at stdout, but I > need this information at variable yyy. > How can I resolve this problem? As written in the doc retrlines has an optional parameter (a callback function) called on each line retrieved, so yo

Re: FTP over TLS

2005-11-28 Thread Carl Waldbieser
Dima Barsky wrote: > Carl Waldbieser <[EMAIL PROTECTED]> wrote: > >> Does anyone know of any good examples for writing client side code >> to upload files over a secure FTP connection? I am referring to >> FTPS, *not* SFTP, which I found out the hard way are two different >> things. > > Look a

Re: FTP over TLS

2005-11-28 Thread Paul Rubin
"adam" <[EMAIL PROTECTED]> writes: > I'm not 100% sure whether this answers your problem, but I would ignore > getting a special TLS module and just concentrate on the ftp side of > the protocol. If your connection to your ftp server must be in TLS, you > could modify you socket module similar to h

Re: FTP over TLS

2005-11-28 Thread adam
I'm not 100% sure whether this answers your problem, but I would ignore getting a special TLS module and just concentrate on the ftp side of the protocol. If your connection to your ftp server must be in TLS, you could modify you socket module similar to how I have using this diff (against 2.3.4) a

Re: FTP over TLS

2005-11-26 Thread Carl Waldbieser
David Isaac wrote: > > "Carl Waldbieser" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Does anyone know of any good examples for writing client side code to > upload >> files over a secure FTP connection? > > http://trevp.net/tlslite/ > > Alan Isaac Thanks. I have actually

Re: FTP over TLS

2005-11-25 Thread David Isaac
"Carl Waldbieser" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anyone know of any good examples for writing client side code to upload > files over a secure FTP connection? http://trevp.net/tlslite/ Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP over TLS

2005-11-24 Thread Dima Barsky
Carl Waldbieser <[EMAIL PROTECTED]> wrote: > Does anyone know of any good examples for writing client side code > to upload files over a secure FTP connection? I am referring to > FTPS, *not* SFTP, which I found out the hard way are two different > things. Look at the CURL library, the manual

Re: FTP over TLS

2005-11-23 Thread Paul Rubin
Carl Waldbieser <[EMAIL PROTECTED]> writes: > Does anyone know of any good examples for writing client side code > to upload files over a secure FTP connection? I am referring to > FTPS, *not* SFTP, which I found out the hard way are two different > things. I am not really all that familiar with

Re: FTP status problems. (Again)

2005-09-18 Thread Nainto
It works! Thanks so much for your help! -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP status problems. (Again)

2005-09-17 Thread Kartic
> Unfortunatly I stiill get the same error. :-( The same "metaclass bases[]" error?? > Here is the code: > import ftplib -snip- > if __name__ == '__main__': > ftp = ftplib.FTP("ftp.sadpanda.cjb.cc") > ftp.login("sadpanda","PASSWORDEDITIEDOUT") > filename = "/FrenchBrochure.pages

Re: FTP status problems. (Again)

2005-09-17 Thread Nainto
Unfortunatly I stiill get the same error. :-( Here is the code: import ftplib class ProgressFile(file): def read(self, size = None): from sys import stdout if size is not None: buff = file.read(self, size) if bu

Re: FTP status problems. (Again)

2005-09-17 Thread Kartic
Hello, > file = "/FrenchBrochure.pages.zip" > ftp.storbinary("STOR " + file, ProgressFile(file, "rb"), 1024) You are using file = "/FrenchBrochure.pages.zip" (sorry I did not notice earlier). You can not use file as variable name like you have, as it represents a file object in pyt

Re: FTP status problems. (Again)

2005-09-17 Thread Nainto
I'm really sorry that I keep having problems with this. :-( Now I get: TypeError: Error when calling the metaclass bases[] str() takes at most 1 arguement (3 given) and the Traceback is: file "formattedthing", line 2, in '?' classProgressFile(file) With the following code: import ftplib class P

Re: FTP status problems. (Again)

2005-09-17 Thread Kartic
That is because you have just taken marduk's program and included your ftp code... please see what he has done in the if __name__ == '__main__' part. He expects the file name as an commandline argument (sys.argv[1]) and since you just copied his code, you are invoking the script *without* the

Re: FTP status problems. (Again)

2005-09-17 Thread Nainto
When I execute the folllowing code with all of the address, username, and passwords filled out I gt an error saying: "/Library/Frameworks/Python.framework/Versions/2.4/Resources/Python.app/Contents/MacOS/Python" "/Users/zacim/Documents/FireUpFTP/foramttedthing" ; exit Traceback (most recent call l

  1   2   >