from output import *
-import htmllib,HTMLParser,string,formatter,sys,os,xpak,time,tempfile,cPickle,base64
+import htmllib,HTMLParser,string,formatter,sys,os,xpak,time,tempfile,base64
+
+try:
+ import cPickle
+except ImportError:
+ import pickle as cPickle
try:
import ftplib
try:
import os,string,types,signal,fcntl
- import time,cPickle,traceback,copy
+ import time,traceback,copy
import re,pwd,grp,commands
import shlex,shutil
+ try:
+ import cPickle
+ except ImportError:
+ import pickle as cPickle
import stat
import commands
import sys,string,shlex,os.path
+try:
+ import cPickle
+except ImportError:
+ import pickle as cPickle
+
if not hasattr(__builtins__, "set"):
from sets import Set as set
return newstring[1:]
def pickle_write(data,filename,debug=0):
- import cPickle,os
+ import os
try:
myf=open(filename,"w")
cPickle.dump(data,myf,-1)
return 1
def pickle_read(filename,default=None,debug=0):
- import cPickle,os
+ import os
if not os.access(filename, os.R_OK):
writemsg("pickle_read(): File not readable. '"+filename+"'\n",1)
return default