Page 1 of 1
Console printing weird after os.execute
Posted: Tue Mar 10, 2015 11:48 pm
by fishstik
After calling os.execute, newlines turn into "♪◙" characters and subsequent print()'s no longer start a new line, making debugging from the console difficult. I've attached a main.lua which calls a series of print()'s before and after an os.execute(). Does this happen to anyone else?
The code:
Code: Select all
print("l2d print")
print("l2d print")
os.execute("echo os print")
print("l2d print")
print("l2d print")
print(" \r \n \r\n ")
The result:
Re: Console printing weird after os.execute
Posted: Wed Mar 11, 2015 1:11 am
by fishstik
Previous post was done on v0.9.1. I updated to 0.9.2 and still a no-go. Also, since updating to 0.9.2, my build system on Sublime Text 2 no longer opens a console window upon building D:
Here's the build system I used on 0.9.1:
Code: Select all
{
"selector": "source.lua",
"cmd": ["love.exe", "--console", "$file_path"],
"shell": true
}
Running "love --console <filepath>" manually from the command prompt works with print()'s appearing on the existing window, but I think the console updates in 0.9.2 broke the above workflow. Any tips on how to create a console window in the above build system? There's no documentation on love command-line arguments -_-
Re: Console printing weird after os.execute
Posted: Wed Mar 11, 2015 2:22 am
by davisdude
I have no tips- I had the same thing happen to me on Notepad++.
Re: Console printing weird after os.execute
Posted: Wed Mar 11, 2015 2:28 am
by slime
https://bitbucket.org/rude/love/issue/9 ... ctly-after
fishstik wrote:Also, since updating to 0.9.2, my build system on Sublime Text 2 no longer opens a console window upon building D:
LÖVE 0.9.2 looks for an existing console before trying to create its own (when --console is specified or t.console in love.conf is enabled.) It sounds like sublime text has its own console that LÖVE attaches itself to. I don't use sublime text in windows so I can't say how to make it visible.
Re: Console printing weird after os.execute
Posted: Wed Mar 11, 2015 3:41 am
by fishstik
Thanks for the replies. I've commented on the issue on bitbucket so we'll see where that goes. As for console stuff, I've reverted to 0.9.1 for now...will try to figure it out later.