Discussion:
Note/Bug JCC, dots in pathnames
Petrus Hyvönen
2017-09-22 09:10:50 UTC
Permalink
Hi,

Not sure this is a bug or just a note, there seems to be some issues with
running JCC in a directory that contains dots. I agree this is not a
recommended thing for paths in general, but can happen sometimes.

I think its the line 1677 in python.py that gets problems:
shutil.copy2(module.split('.')[0] + '.py', modulePath)

I'm not sure what this section of code does, but maybe joining all parts
but the last would work, like

'.'.join(module.split('.')[:-1])

Regards
/Petrus
--
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00
Andi Vajda
2017-09-23 01:16:16 UTC
Permalink
Post by Petrus Hyvönen
Hi,
Not sure this is a bug or just a note, there seems to be some issues with
running JCC in a directory that contains dots. I agree this is not a
recommended thing for paths in general, but can happen sometimes.
shutil.copy2(module.split('.')[0] + '.py', modulePath)
I'm not sure what this section of code does, but maybe joining all parts
but the last would work, like
'.'.join(module.split('.')[:-1])
The proper fix is to use rpartition('.')[0], trying it now..
Thank you for the bug report !

Andi..
Post by Petrus Hyvönen
Regards
/Petrus
--
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00
Loading...