Jump to content
Sign in to follow this  
wuwuxin

#1A character automatically appended to python source file

Recommended Posts

This is a weird problem that surfaced today after I updated Python4D to its latest.

Delphi 10.4.2

 

A valid python source file, after loaded by Python4D,  an extra character #1A will be append to it.  Then next time the python source file is loaded by Python4D,  it will complain invalid syntax at where the new char is appended (i.e, the end of the file).

 

Anyone has encountered the issue?

Share this post


Link to post
23 minutes ago, wuwuxin said:

 

A valid python source file, after loaded by Python4D

What does "loaded by Python4D" mean?

 

23 minutes ago, wuwuxin said:

#1A

What kind of character is this?  Do you mean $A (LF)?

Edited by pyscripter

Share this post


Link to post
11 minutes ago, pyscripter said:

What does "loaded by Python4D" mean?

 

What kind of character is this?  Do you mean $A (LF)?

Thank you for the prompt attention, and sorry I should have be more clear - I meant by "VarPyth.Import(APySourceFile)"

 

The character i meant is $1A

 

 

Share this post


Link to post

VarPyth.Import just calls the Python function PyImport_Import which AFAIK does not modify files in any way.

Share this post


Link to post
28 minutes ago, pyscripter said:

VarPyth.Import just calls the Python function PyImport_Import which AFAIK does not modify files in any way.

Thank you.  I am scratching my head - let me investigate at what point that this weird character $1A is added.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×