File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,14 @@ def murmur2_x86(data, seed):
3939
4040def get_tmp_directory ():
4141 tmp_dir = tempfile .gettempdir ()
42+ if os .name == 'nt' :
43+ try :
44+ import win32file
45+ tmp_dir = win32file .GetLongPathName (tmp_dir )
46+ except :
47+ pass
4248 pid = os .getpid ()
43- return tmp_dir + '/ ipykernel_' + str (pid )
49+ return tmp_dir + os . sep + ' ipykernel_' + str (pid )
4450
4551
4652def get_tmp_hash_seed ():
@@ -52,7 +58,7 @@ def get_file_name(code):
5258 cell_name = os .environ .get ("IPYKERNEL_CELL_NAME" )
5359 if cell_name is None :
5460 name = murmur2_x86 (code , get_tmp_hash_seed ())
55- cell_name = get_tmp_directory () + '/' + str (name ) + '.py'
61+ cell_name = get_tmp_directory () + os . sep + str (name ) + '.py'
5662 return cell_name
5763
5864
Original file line number Diff line number Diff line change @@ -507,7 +507,7 @@ async def debugInfo(self, message):
507507 'isStarted' : self .is_started ,
508508 'hashMethod' : 'Murmur2' ,
509509 'hashSeed' : get_tmp_hash_seed (),
510- 'tmpFilePrefix' : get_tmp_directory () + '/' ,
510+ 'tmpFilePrefix' : get_tmp_directory () + os . sep ,
511511 'tmpFileSuffix' : '.py' ,
512512 'breakpoints' : breakpoint_list ,
513513 'stoppedThreads' : self .stopped_threads ,
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ def run(self):
6969 'matplotlib-inline>=0.1.0,<0.2.0' ,
7070 'appnope;platform_system=="Darwin"' ,
7171 'nest_asyncio' ,
72+ 'pywin32;platform_system=="Windows"'
7273 ],
7374 extras_require = {
7475 "test" : [
You can’t perform that action at this time.
0 commit comments