#NEWLINE# @ expose ( 'split-path' , [ values . W_Object ] , simple = False ) #NEWLINE# def split_path( w_path , env , cont ) : #NEWLINE# #INDENT# from pycket.interpreter import return_multi_vals #NEWLINE# path = extract_path ( w_path ) #NEWLINE# dirname = _dirname ( path ) #NEWLINE# basename = _basename ( path ) #NEWLINE# name = _explode_element ( basename ) #NEWLINE# if ( dirname == os . path . sep ) : #NEWLINE# #INDENT# base = values . w_false #NEWLINE# must_be_dir = values . w_false #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( name is UP ) or ( name is SAME ) ) : #NEWLINE# #INDENT# base = RELATIVE #NEWLINE# must_be_dir = values . w_true #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# base = values . W_Path ( ( dirname + os . path . sep ) ) #NEWLINE# must_be_dir = values . w_false #NEWLINE# #UNINDENT# #UNINDENT# result = values . Values . make ( [ base , name , must_be_dir ] ) #NEWLINE# return return_multi_vals ( result , env , cont )