LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-08-2004, 10:42 AM   #1
p-static
Member
 
Registered: Jul 2004
Distribution: Gentoo
Posts: 101

Rep: Reputation: 15
Python ftplib problems


I'm using python ftplib to automate uploading some files to a webhost, but it's haveing some really strange problems. Here's an example log with debuglevel set to 2:

>>> ftp.retrlines("LIST")
*cmd* 'TYPE A'
*put* 'TYPE A\r\n'
*get* '200 TYPE is now ASCII\r\n'
*resp* '200 TYPE is now ASCII'
*cmd* 'PASV'
*put* 'PASV\r\n'
*get* '227 Entering Passive Mode (67,18,107,164,165,162)\r\n'
*resp* '227 Entering Passive Mode (67,18,107,164,165,162)'
*cmd* 'LIST'
*put* 'LIST\r\n'
*get* '150 Accepted data connection\r\n'
*resp* '150 Accepted data connection'
drwxr-x--- 5 32140 12 4096 Jun 29 18:49 etc
drwxrwx--- 7 32140 12 4096 Aug 1 22:45 mail
drwxr-xr-x 3 32140 pstatic 4096 Feb 24 06:26 public_ftp
drwxr-x--- 17 32140 99 4096 Aug 2 13:40 public_html
drwx------ 7 32140 pstatic 4096 May 26 21:02 tmp
lrwxrwxrwx 1 32140 pstatic 11 May 16 16:20 www -> public_html
*get* '226-Options: -l \r\n'
*get* '226 6 matches total\r\n'
*resp* '226-Options: -l \n226 6 matches total'
'226-Options: -l \n226 6 matches total'
>>> ftp.cwd('www')
*cmd* 'CWD www'
*put* 'CWD www\r\n'
*get* '250 OK. Current directory is /www\r\n'
*resp* '250 OK. Current directory is /www'
'250 OK. Current directory is /www'
>>> ftp.retrlines('list')
*cmd* 'TYPE A'
*put* 'TYPE A\r\n'
*get* '200 TYPE is now ASCII\r\n'
*resp* '200 TYPE is now ASCII'
*cmd* 'PASV'
*put* 'PASV\r\n'
*get* '227 Entering Passive Mode (67,18,107,164,88,86)\r\n'
*resp* '227 Entering Passive Mode (67,18,107,164,88,86)'

The transfer then times out. This has happened every single time i try to connect, where it will list the files in the root dir, but time out on any other kind of transfer. I'm behind a FW, could that have something to do with it? The server is running PureFTPd 1.0.12.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python problems in suse 9.3 giovani_78 Linux - Software 1 07-16-2005 03:24 AM
problems with Python dratix Ubuntu 3 06-15-2005 09:33 PM
problems with python: what else is new??? mrchaos Linux - Software 4 05-13-2005 02:43 PM
Problems with Python applications krajzega *BSD 0 08-24-2004 06:46 AM
python problems with superkaramba Tyir Linux - Software 1 11-30-2003 11:42 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration