mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Open output files in text mode, after all they are text files.
(Binary mode caused problems when "python" was 3.0.)
This commit is contained in:
		
							parent
							
								
									ad3562ed63
								
							
						
					
					
						commit
						2af1d894e3
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -741,7 +741,7 @@ def main(srcfile): | |||
|         sys.exit(1) | ||||
|     if INC_DIR: | ||||
|         p = "%s/%s-ast.h" % (INC_DIR, mod.name) | ||||
|         f = open(p, "wb") | ||||
|         f = open(p, "w") | ||||
|         f.write(auto_gen_msg) | ||||
|         f.write('#include "asdl.h"\n\n') | ||||
|         c = ChainOfVisitors(TypeDefVisitor(f), | ||||
|  | @ -754,7 +754,7 @@ def main(srcfile): | |||
| 
 | ||||
|     if SRC_DIR: | ||||
|         p = os.path.join(SRC_DIR, str(mod.name) + "-ast.c") | ||||
|         f = open(p, "wb") | ||||
|         f = open(p, "w") | ||||
|         f.write(auto_gen_msg) | ||||
|         f.write(c_file_msg % parse_version(mod)) | ||||
|         f.write('#include "Python.h"\n') | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum