Re: [jokosher-devel] [PATCH] for ticket #26 (Moving instruments)
- From: "Jens Geiregat" <jens geiregat gmail com>
- To: "Laszlo Pandy" <laszlok2 gmail com>
- Cc: jokosher-devel-list gnome org
- Subject: Re: [jokosher-devel] [PATCH] for ticket #26 (Moving instruments)
- Date: Mon, 7 Aug 2006 13:43:49 +0200
On 8/7/06, Laszlo Pandy <laszlok2 gmail com> wrote:
[...]
> - What to do with 'bad' file-uri's? (http:// in stead of file://,
> trying to import a .txt, ...)
>
Just ignore them and tell the status bar to display "could not import
file(s): %s".
The problem with this solution is that there isn't enough space in the
statusbar to display 20 filenames. Even when displaying only the
amount of bad uri's, there is no good time/event to remove that
message from the statusbar.
About http:// uri's: Jokosher can't handle these because it uses
shutil.copy to copy the imported files to the project's audio folder.
Maybe that code should try to use gnome-vfs, and fall back to shutil
when it is not available?
Like this:
try:
import gnomevfs
# use a gnome-vfs copy
except ImportError:
print "GnomeVFS not available, using shutil"
import shutil
try:
file = parse_uri_to_local_file(uri)
except URIError:
#Display an error message
try:
shutil.copy(file, dest)
except IOError:
...
It would be better if this was handled by some helper-class or
function though...
Jens
Laszlo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]