Python / Pyth, 24 bytes
#"treat".q
print"trick";
In Pyth, this outputs treat
. In Python, this outputs trick
.
How it works
Python
#"treat".q Comment
print"trick"; Print the string literal "trick"
Pyth
#"treat".q
# Loop until error statement
"treat" Implicitly print the string literal "treat"
.q Quit
print"trick"; Ignored, except the last ";" as a valid EOF