Put a file on an ftp server over ssl
Hello all!
I have been troubled for the past couple of days trying to write a
simple script that sends a file to an ftp server. It used to be the
easiest thing in the world, but now the server has changed to a ftps
(ftp over ssl) server. All of the sudden, the world has come to a
crawling stop.
Seems that M2Crypto would maybe do the trick, but I can't buy the thing
(they won't pay for it). Other than suggesting projects, does any one
have actuall working code to do something like this? My, it seems like
it should be VERY simple, but it has become a nightmare.
Oh do I wish...
f = ftps.connect('username', 'password', port)
ftps.put(localFilePath)
Done!
Thanks for any help!
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
Re: Put a file on an ftp server over ssl
I looked briefly at this option, but it seems to me that I would have to learn a whole architecture just to put a file on an ftp server. Seems like a bit much, don't you think? Daniel -- http://mail.python.org/mailman/listinfo/python-list
Re: Put a file on an ftp server over ssl
Sorry Jp, I was using the google client, and it does not automagically put reply marks on the message one is replying too. I'm just a bit frustrated that such a seemingly simple task to get so complicated very easily. I do appreciate your input! Just wish someone had already done it and shared the little jewel with us. Daniel -- http://mail.python.org/mailman/listinfo/python-list
Strategy Design Pattern
Hello all, I've been trying to go over my OO Patterns book, and I decided to try to implement them in Python this time around. I figured this would help me learn the language better. Well, I've gotten stuck with my first go at OO patterns with Python. I guess it goes without say that some of the stuff that are taken for granted in most of the books (ie. Interfaces, Abstract classes) don't really apply to Python per say, but the idea behind the patterns can be extracted out still. In the specific case of the Strategy pattern, I think the goal is to abstract out of the class an algorithm that can then be reused by some of the inherited classes. This way we don't repeat ourselves. Maybe I got this all wrong... I'm at a loss at how I can do this with Python, any pointers would be more than welcomed! To aid commenters... we can use the example used in "Head First Design Patterns". I've implemented this simple patter in Java and .NET... now in python. I can't draw UML here, so I'll try to pseudo talk what the example has: Abstract Base Class: Duck + FlyBehavior _fly + swim() + fly() -> calls _fly.fly() Interface: FlyBehavior + fly() Concrete Interface FlyHigh (implements FlyBehavior): + fly() Concrete Class Duck1 (Inherits Duck): + Constructor: _fly = new FlyHigh() Daniel. -- http://mail.python.org/mailman/listinfo/python-list
