>>> 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
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
thank you very much
I have solved
--
http://mail.python.org/mailman/listinfo/python-list
>>> 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
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
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 (
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()
>
> >
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