Files
entropy/libraries/activatorTools.py
2007-03-25 16:03:33 +00:00

48 lines
1.5 KiB
Python

#!/usr/bin/python
'''
# DESCRIPTION:
# generic tools for enzyme application
Copyright (C) 2007 Fabio Erculiani
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
# Never do "import portage" here, please use entropyTools binding
from entropyConstants import *
from entropyTools import *
import sys
import os
import commands
import string
def sync(options):
print "hello!"
for uri in etpConst['activatoruploaduris']:
ftp = activatorFTP(uri)
print "Listing the content of: "+ftp.getFTPHost()
print "at port: "+str(ftp.getFTPPort())
print "in dir: "+ftp.getFTPDir()
print ftp.listFTPdir()
#print "deleting file: XML-XSLT-0.48.tbz2"
#rc = ftp.deleteFile("XML-XSLT-0.48.tbz2")
#print rc
#print "uploading file..."
#rc = ftp.uploadFile("/var/lib/entropy/store/x86/alsa-lib-1.0.14_rc3.tbz2")
#print str(rc)
ftp.closeFTPConnection()