Talk:Find common directory path: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 81:
</lang>
should return "/home/user1". [[User:Per|Per]] 16:14, 14 April 2011 (UTC)
 
(elided) --[[User:Rdm|Rdm]] 16:54, 14 April 2011 (UTC)
 
"home/user1/tmp" is not the longest common shared path any more. How about you drop by on irc to discuss this, instead of us abusing this talk page further? ;-) [[User:Per|Per]] 17:03, 14 April 2011 (UTC)
 
Correct version of python without reimplementing commonprefix
<lang Python>
os.path.sep.join(os.path.commonprefix([p.split(os.path.sep) for p in ['/home/user1/tmp/coverage/test', '/home/user1/tmp/covert/operator', '/home/user1/tmp/coven/members']]))
</lang>
Anonymous user