mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	__file__ now sometimes refers to the .pyc file
This commit is contained in:
		
							parent
							
								
									a4f0309282
								
							
						
					
					
						commit
						1301f2bc18
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -80,6 +80,9 @@ def mkpycresourcefile(list, main='', dst=None):
 | 
				
			||||||
		print '%5d\t%s\t%s'%(id, name, main)
 | 
							print '%5d\t%s\t%s'%(id, name, main)
 | 
				
			||||||
	for name, location in list:
 | 
						for name, location in list:
 | 
				
			||||||
		if not location: continue
 | 
							if not location: continue
 | 
				
			||||||
 | 
							if location[-4:] == '.pyc':
 | 
				
			||||||
 | 
								# Attempt corresponding .py
 | 
				
			||||||
 | 
								location = location[:-1]
 | 
				
			||||||
		if location[-3:] != '.py':
 | 
							if location[-3:] != '.py':
 | 
				
			||||||
			print '*** skipping', location
 | 
								print '*** skipping', location
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue