4 import sys
, os
, formats
7 from rox
import g
, TRUE
, FALSE
, saving
10 rox
.info("Drag a file or directory onto Archive to archive it. "
11 "Drag an archive onto it to extract.")
14 from box
import ArchiveBox
19 path
= rox
.get_local_path(path
)
21 rox
.croak('Sorry, I can only extract/archive local files.')
22 path
= os
.path
.abspath(path
)
24 # Show the savebox, so at least the user knows something is happening...
26 savebox
= ArchiveBox()
30 if os
.path
.isdir(path
):
31 data
= formats
.DirData(path
)
33 data
= formats
.FileData(path
)
34 savebox
.set_data(data
)