shelve file space always increase!

2008-09-17 Thread smalltalk
>>> import shelve >>> sf = shelve.open('e:/abc.db') >>> for i in range(1): ... sf[str(i)]=i ... >>> sf.close() >>> sf = shelve.open('e:/abc.db') >>> sf.clear() >>> sf {} the abc.db is always 312k though i have use clear(), how can i shrink the space? -- http://mail.python.org/mailman/listin

the way of "import"

2008-03-07 Thread smalltalk
I have three files names t1.py,t2.py,t3.py in e:\test\dir1,of course dir2 is exsit the content of t1.py as follow: t1.py import os print 'this is t1.py' os.chdir('..\\dir2') the content of t2.py as follow: print "this is t2.py" the content of t3.py as follow: import t1 import t2 if i run t3.py i

Re: setdefaultencoding error

2007-12-10 Thread smalltalk
thank you very much I have solved -- http://mail.python.org/mailman/listinfo/python-list

setdefaultencoding error

2007-12-08 Thread smalltalk
>>> import sys >>> sys.setdefaultencoding(utf8) Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'setdefaultencoding' but i find the attribute"setdefaultencoding" in python manuals where is the error? -- http://mail.python.org/mailman/lis

pypar error

2007-10-05 Thread smalltalk
I want to install pypar,but it always show following errors: D:\pypar_1.9.3>python setup.py build -c mingw32 running build running build_py running build_ext building 'pypar.mpiext' extension D:\MinGWStudio\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -I $MPICH_DIR\SDK.gcc \include -ID:\Python25\i

Re: Jython 2.2 on Ubuntu

2007-08-29 Thread smalltalk
On Aug 29, 10:50 pm, Neil Wallace <[EMAIL PROTECTED]> wrote: > Thanks Tim, > > I subscribed to the Jython group hosted by sourceforge, and they are a > great bunch of guys/gals. > > Here's what I did to fix my problem. > > 1. removed Jython 2.1 (using Synaptic)jytho > 2. added the following lines (

Re: how setup a dll file as a module?

2007-08-27 Thread smalltalk
On Aug 27, 6:45 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > smalltalk wrote: > > > in arcgis , arcgisscripting is a dll file > > there is a script as following: > > > import arcgisscripting > > gp = arcgisscripting.create() > > >

how setup a dll file as a module?

2007-08-26 Thread smalltalk
in arcgis , arcgisscripting is a dll file there is a script as following: import arcgisscripting gp = arcgisscripting.create() why can the script run? how can we setup a dll file as a module? -- http://mail.python.org/mailman/listinfo/python-list