[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gcmd-dev] Python plugins
From: |
Micha |
Subject: |
Re: [gcmd-dev] Python plugins |
Date: |
Sun, 10 Dec 2006 01:54:14 +0100 |
User-agent: |
Alpenglühn 7.2 |
Huh ?
Traceback (most recent call last):
File "sample-plugin.py", line 16, in main
f = file.open(fname,'rb')
AttributeError: type object 'file' has no attribute 'open'
for:
#!/usr/bin/env python
try:
import gnomevfs
except ImportError:
import gnome.vfs as gnomevfs
import md5
def main(main_wnd_xid, active_cwd, inactive_cwd,selected_files):
for uri in selected_files:
fname = gnomevfs.get_file_info(uri).name
f = file.open(fname,'rb')
file_content = f.read()
f.close()
md5sum = md5.new(file_content).hexdigest()
print md5sum, fname
return True
...how can i check if the import was successful ?
- Re: [gcmd-dev] Python plugins, (continued)
- Re: [gcmd-dev] Python plugins, Piotr Eljasiak, 2006/12/04
- Re: [gcmd-dev] Python plugins, Magnus Stålnacke, 2006/12/05
- Re: [gcmd-dev] Python plugins, Piotr Eljasiak, 2006/12/05
- Re: [gcmd-dev] Python plugins, Magnus Stålnacke, 2006/12/05
- Re: [gcmd-dev] Python plugins, Magnus Stålnacke, 2006/12/06
Re: [gcmd-dev] Python plugins, Piotr Eljasiak, 2006/12/04
- Re: [gcmd-dev] Python plugins,
Micha <=
Re: [gcmd-dev] Python plugins, Micha, 2006/12/04
Re: [gcmd-dev] Python plugins, Magnus Stålnacke, 2006/12/06