Console printing weird after os.execute

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
fishstik
Prole
Posts: 3
Joined: Thu Apr 17, 2014 7:10 pm

Console printing weird after os.execute

Post 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:
Image
Attachments
main.lua
(271 Bytes) Downloaded 87 times
fishstik
Prole
Posts: 3
Joined: Thu Apr 17, 2014 7:10 pm

Re: Console printing weird after os.execute

Post 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 -_-
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Console printing weird after os.execute

Post by davisdude »

I have no tips- I had the same thing happen to me on Notepad++.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
slime
Solid Snayke
Posts: 3142
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Console printing weird after os.execute

Post 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.
fishstik
Prole
Posts: 3
Joined: Thu Apr 17, 2014 7:10 pm

Re: Console printing weird after os.execute

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests