28 Jun 2013, 11:50
Nickparsons_pragsmall

Nicholas Parsons (4 posts)

Greetings,

I just downloaded and installed the latest version of elixir and erlang on my windows 7 machine and everything went well until I ran the 3 + 7 example on page 4 in the PDF version of the book from iex launched from the command prompt. It gave the correct answer of 10 but also produced some extraneous output “[33m10[0m”. When I typed 5 * 5 I got back “[33m25[0m”. Has anyone experienced the same thing? I installed version 0.9.3 of elixir.

Any feedback is welcome…

Thanks in advance! –Nick

28 Jun 2013, 18:13
Generic-user-small

Edward McDowell (5 posts)

You are seeing ANSI escape sequences which are supposed to display the enclosed text in color. On Windows you may disable this feature by creating a file named .iex in your home directory (C:\Users\Username) with the following content:

IEx.Options.set(:colors, [enabled: false])

See the subsection “Customizing iex” on page 7 of the ebook.

29 Jun 2013, 15:08
Nickparsons_pragsmall

Nicholas Parsons (4 posts)

Hi Edward,

That makes sense, thanks for your help!

Regards, –Nick

04 Jul 2013, 17:35
Itsme_pragsmall

Mark Davis (2 posts)

Hi, On windows you can install https://github.com/adoxa/ansicon to display colours in the shell. Seems to work very well with iex but will also give you colours for any other program that uses similar (eg cucumber)

  You must be logged in to comment