[Tutor] Portalocker

Sk8erguy2424@aol.com Sk8erguy2424@aol.com
Thu Jul 17 15:03:04 2003


--part1_90.3a0bc6c5.2c484ccb_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Following the synopsis code, I ran into this problem:

>>> import portalocker
>>> file=open("C:\My Documents\log.txt", "r+")
>>> portalocker.lock(file, portalocker.LOCK_EX)
Traceback (most recent call last):
  File "<pyshell#13>", line 1, in ?
    portalocker.lock(file, portalocker.LOCK_EX)
AttributeError: 'module' object has no attribute 'lock'

I rechecked to see if I installed the module correctly and I did.  Anyone 
know why this is happening?  Thanks in advance.

--part1_90.3a0bc6c5.2c484ccb_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<HTML><FONT FACE=3Darial,helvetica><FONT  SIZE=3D2 FAMILY=3D"FIXED" FACE=3D"=
Courier New" LANG=3D"0">Following the synopsis code, I ran into this problem=
:
<BR>
<BR>&gt;&gt;&gt; import portalocker
<BR>&gt;&gt;&gt; file=3Dopen("C:\My Documents\log.txt", "r+")
<BR>&gt;&gt;&gt; portalocker.lock(file, portalocker.LOCK_EX)
<BR>Traceback (most recent call last):
<BR> &nbsp;File "&lt;pyshell#13&gt;", line 1, in ?
<BR> &nbsp;&nbsp;&nbsp;portalocker.lock(file, portalocker.LOCK_EX)
<BR>AttributeError: 'module' object has no attribute 'lock'
<BR>
<BR>I rechecked to see if I installed the module correctly and I did. &nbsp;=
Anyone know why this is happening? &nbsp;Thanks in advance.</FONT></HTML>

--part1_90.3a0bc6c5.2c484ccb_boundary--