johnbickmore / livecoding

A code reloading library for Python
https://code.google.com/archive/p/livecoding/
Other
0 stars 0 forks source link

python 2.5 compatibility #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
On python 2.5.4, livecoding 0.2, on mac os x leopard,

With the simple example:

$ python run.py 
Traceback (most recent call last):
  File "run.py", line 31, in <module>
    Run()
  File "run.py", line 11, in Run
    cr.AddDirectory("base", "scripts")
  File "/Library/Python/2.5/site-packages/livecoding/reloader.py", line 51,
in AddDirectory
    if handler.Load():
  File "/Library/Python/2.5/site-packages/livecoding/namespace.py", line
175, in Load
    self.LoadDirectory(self.baseDirPath)
  File "/Library/Python/2.5/site-packages/livecoding/namespace.py", line
207, in LoadDirectory
    namespace = self.GetNamespacePath(dirPath)
  File "/Library/Python/2.5/site-packages/livecoding/namespace.py", line
168, in GetNamespacePath
    relativeDirPath = os.path.relpath(dirPath, self.baseDirPath)
AttributeError: 'module' object has no attribute 'relpath'

Original issue reported on code.google.com by alia_kho...@yahoo.com on 20 Apr 2009 at 8:42

GoogleCodeExporter commented 8 years ago
Revision: 112
Author: richard.m.tew
Date: 6:25:41 p.m., Monday, 20 April 2009
Message:
python 2.5 compatibility
http://code.google.com/p/livecoding/issues/detail?id=6

- 'os.path.relpath' is now monkeypatched in so 2.5 can be supported.
- 'inspect.getargspec' now handles non-named tuples, as its return value for 
2.5 is.
----
Modified : /trunk/reloader.py
Modified : /trunk/tests/test_reloading.py

Original comment by richard.m.tew@gmail.com on 20 Apr 2009 at 10:27