noriah / PyVDF

Python Library for Reading and Writing VDFs (Valve Data File)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't insert a class into sys.modules

WeaverThree opened this issue · comments

The code in your init.py does this. That means that if you try to import PyVDF in two different files that get loaded in the same interpreter one of them will fail because python doesn't know what the heck to do with what it finds in sys.modules.

Contrived example:

>>> import PyVDF.core
>>> import PyVDF.core as A
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'PyVDF' has no attribute 'core'
>>>

Alright. I'll fix this soon. Thanks for bringing this up. I was very new to python when I wrote this.

Very sorry for the long delay. I fell sick and was unable to do much after missing so much class. I will fix this tonight.

Fixed with 3d54617