Getting the bytes or percent uploaded/downloaded through FTP?

2005-09-05 Thread Nainto
Hi, I'm just wondering if there is any way to get the number of bytes,
or the percentage, that have been uploaded/downloaded when
uploading/downloading a file throught ftp in Python. I have searched
Google many times but could find nothing.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting the bytes or percent uploaded/downloaded through FTP?

2005-09-05 Thread Nainto
Thanks, Benji but I need to be able to get the bytes and/or percent of
a download too. :-(

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting the bytes or percent uploaded/downloaded through FTP?

2005-09-05 Thread Nainto
Thanks guys. I'll try to these things too work.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting the bytes or percent uploaded/downloaded through FTP?

2005-09-05 Thread Nainto
Thanks guys. I'll try to these things too work.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting the bytes or percent uploaded/downloaded through FTP?

2005-09-05 Thread Nainto
Wait, can this be used when uploading a file?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: determine if os.system() is done

2005-09-07 Thread Nainto
Yeah, I agree. The Python documentation just merey describes what
arguements a function can take not as much how to use the actual
function.

-- 
http://mail.python.org/mailman/listinfo/python-list


FTP status problems. (Again)

2005-09-16 Thread Nainto
Hello, I have posted before about trying to find the status of an FTP
uplaod but couldn't get anything to work. After some more searching I
found
http://groups.google.com/group/comp.lang.python/browse_thread/thread/76be9a994547db4/91917c906cdc04d4?q=ftp+progress&rnum=1#91917c906cdc04d4
but it does not seem to work because it just uploads the file and does
not print a . onto the screen. HEre is the code I have when I'm using
the code from that link.
import ftplib
import os
class dot_FTP(ftplib.FTP):
def storbinary(self, cmd, fp, blocksize=8192):
self.voidcmd('TYPE I')
conn = self.transfercmd(cmd)
while 1:
buf = fp.read(blocksize)
if not buf: break
conn.send(buf)
sys.stdout.write('.')
sys.stdout.flush()
conn.close()
return self.voidresp()


ftp = ftplib.FTP("FTPADDRESS")
ftp.login("user","pass")
file = "/file"
ftp.storbinary("STOR " + file, open(file, "rb"), 1024)
ftp.quit()
Does anyone know why this is not working? IS there any other way to
find out when a chunc has been sent or the bytes uploaded of a file?
Thanks.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: FTP status problems. (Again)

2005-09-17 Thread Nainto
Thanks, I'll give this a try. This will print a period right?

-- 
http://mail.python.org/mailman/listinfo/python-list


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 last):
  File "/Users/zacim/Documents/FireUpFTP/foramttedthing", line 26, in ?
fname = sys.argv[1]
IndexError: list index out of range
logout
[Process completed]

This 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 buff:
stdout.write('.')
else:
stdout.write('\n')
return buff
else:
buff = ''
while True:
new_str = file.read(self, 1024)
stdout.write('.')
if new_str:
buff = buff + new_str
else:
stdout.write('\n')
break
return buff
if __name__ == '__main__':
import sys
fname = sys.argv[1]
f = ProgressFile(fname)
f.read()

ftp = ftplib.FTP("ftp.sadpanda.cjb.cc")
ftp.login("sadpanda","s4dp4nd4b1g")
file = "/FrenchBrochure.pages.zip.gz"
ftp.storbinary("STOR " + file, ProgressFile(file, "rb"), 1024)
ftp.quit()

-- 
http://mail.python.org/mailman/listinfo/python-list


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 ProgressFile(file):
def read(self, size = None):
from sys import stdout
if size is not None:
buff = file.read(self, size)
if buff:
stdout.write('.')
else:
stdout.write('\n')
return buff
else:
buff = ''
while True:
new_str = file.read(self, 1024)
stdout.write('.')
if new_str:
buff = buff + new_str
else:
stdout.write('\n')
break
return buff
if __name__ == '__main__':
ftp = ftplib.FTP("ftp.sadpanda.cjb.cc")
ftp.login("sadpanda","PASSWORDEDITEDOUT")
file = "/FrenchBrochure.pages.zip"
ftp.storbinary("STOR " + file, ProgressFile(file, "rb"), 1024)
ftp.quit()

Thanks so muchy for help guys. :-)

-- 
http://mail.python.org/mailman/listinfo/python-list


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 buff:
stdout.write('.')
else:
stdout.write('\n')
return buff
else:
buff = ''
while True:
new_str = file.read(self, 1024)
stdout.write('.')
if new_str:
buff = buff + new_str
else:
stdout.write('\n')
break
return buff
if __name__ == '__main__':
ftp = ftplib.FTP("ftp.sadpanda.cjb.cc")
ftp.login("sadpanda","PASSWORDEDITIEDOUT")
filename = "/FrenchBrochure.pages.zip"
ftp.storbinary("STOR " + filename, ProgressFile(filename, "rb"), 1024)

ftp.quit()


Thanks again.

-- 
http://mail.python.org/mailman/listinfo/python-list


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


Microsoft IronPython?

2006-01-03 Thread Nainto
I came across this link today. http://tinyurl.com/9c7ta It seems
Microsoft is getting involved with Python. What do you think of it? Is
it any good? Anything to worry about?
--
Zach

-- 
http://mail.python.org/mailman/listinfo/python-list


Microsoft IronPython?

2006-01-03 Thread Nainto
I came across this link today. http://tinyurl.com/9c7ta It seems
Microsoft is getting involved with Python. What do you think of it? Is
it any good? Anything to worry about?
--
Zach

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Microsoft IronPython?

2006-01-03 Thread Nainto
Oops sorry for the double post. I got an error message and though I had
to resend it.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Microsoft IronPython?

2006-01-03 Thread Nainto
The Cnet article is from today.

-- 
http://mail.python.org/mailman/listinfo/python-list


Clicking at a certain x,y position in python? (Mac OSX)

2006-01-18 Thread Nainto
I have been searching and searching and cannot find a way to click at a
certain position in python. (Similar to http://tinyurl.com/9tap2 in
Cocoa) Does anyone know of a way? Thanks.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Clicking at a certain x,y position in python? (Mac OSX)

2006-01-18 Thread Nainto
There's no other way? I'd rather not have to use PyyyObjc.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Clicking at a certain x,y position in python? (Mac OSX)

2006-01-18 Thread Nainto
There's no other way? I'd rather not have to use PyObjc.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Determine the IP address of an eth interface

2006-01-18 Thread Nainto
This may depend on your OS. How about:
http://www.inl.fr/nuface-doc/nupyf-doc-en.html#id2457044

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Clicking at a certain x,y position in python? (Mac OSX)

2006-01-18 Thread Nainto
Yeah. It would be a lot easyer just to be able to run asomething
through the commandline but I'm not sure if commandline apps can take
with the window server. If If anyone knows of any other way It would be
greatly appreciated. (Thanks Diez)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Clicking at a certain x,y position in python? (Mac OSX)

2006-01-18 Thread Nainto
I found soemthing! The following link will lead you to a page that will
give you the code to  to create a commandline tool that will manipulate
the mouse. Then you can just set mouseButtonDown to true and be on your
way!
http://tinyurl.com/br7ty

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Logging into a website using urllib2

2006-01-27 Thread Nainto
You may want to look at using PyCurl.  (http://pycurl.sourceforge.net/)
It makes it easyer to handle this type of stuff.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cross-Platform Bonjour Module

2006-02-22 Thread Nainto
Take a look at:
http://lists.apple.com/archives/bonjour-dev/2005/Jun/msg00018.html

-- 
http://mail.python.org/mailman/listinfo/python-list


Using a list of RGB data for Canvas widget? [(R1, G1, B1), (R2, G2, B2) etc.]

2006-02-22 Thread Nainto
Hi, I have searched the arhives and Google, plus I have tried this on
my own, but I cannot find a way to convert a list of RGB values to a
Tkinter PhotoImage or BitmapImage to use with the Tkinter canvas
widget.  I'd rather not have to use PIL or anything but pure Python,
it's included modules, and Tkiner. Reason being, I would like to port
this/the project it is in to other platforms that may not have anything
else. Any help would be greatly appreciated. Thanks!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Using a list of RGB data for Canvas widget? [(R1, G1, B1), (R2, G2, B2) etc.]

2006-02-23 Thread Nainto
Just to clarify. I'm not asking for any code. A ink or explination of
how to convert a list of this type to BitmapImage or PhotoImage data
would be very helpful.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Calculating md5 checksums.

2006-03-03 Thread Nainto
Take a look at: http://effbot.org/librarybook/md5.htm

Fredrik Lundh wrote:
> Rajesh Sathyamoorthy wrote:
>
> > How do you calculate the md5 checksum of a file?
> >
> > so far  i got this,
> >
> > import md5
> >
> > obj = md5.new()
> > file = open( 'filename',  'rb')
> > data = text.read()
> > obj.update(data)
> > checksum = md5.digest()
> >
> > Is this correct? Is there anything else i should do before comparing the
> > checksum with the one provided for the file?
>
> the script has some obvious bugs, but nothing you won't discover simply
> by running the program...  (did you try that?  what happened?)
> 
> 

-- 
http://mail.python.org/mailman/listinfo/python-list


Zope/Plone developer(s) needed to help build and finalize a fun project.

2006-05-03 Thread Nainto
I am the lead developer of MacSuburb.com, a to-be-launched mac
community. Unfortunatly, I am the only developer. If you are interested
in helping please email me or reply with your contact information.
Please leave atleast your email and/or IM name. I can be reached at
[EMAIL PROTECTED] *Make sure you first read the list below!*

We are looking for someone who...

* is interested in working with me to further develop the existing
MacSuburb software and ready it for the release. There is a lot of
readying to be done.

* knows Python and is familiar with Zope and Plone. We are using Zope
and Plone to build the system on so keep that in mind.

* uses a Mac or is a Mac enthusiast

* Would like to be part of a grea group of people. (As I said, I'm the
lead developer we have writers and other people too)

* Has time to spend developing.


On behalf of the MacSuburb Team, Thanks!

-- 
http://mail.python.org/mailman/listinfo/python-list