Forums

Help

boa and normal coding ?

Hello,
i am following a book called python programming for absolute beginers. I cant get the following code to make a command box appear so as to give the user the message to hit enter. Its simple code, but will boa work with normal coding ?

Print "game over"
raw_input("\n\npress enter key to exit")

Thats all the book says type in, it does work in idle but i really want to use boa for everything.

I create a new module btw and that did not work as well creating a brand new python app...but still no joy ?

"""So in short, boa is not able to replicate normal python coding in its simplist form ? """

If you need and/or want to write mostly Python code which uses raw_input then Boa is probably not the right editor/ide for you. Although I am not sure which editor lets you run this kind of code directly, I just checked UliPad which I use for some things and it has the same issue.

I guess you would just need to have a command window open and run that kind of code outside the IDE/Editor or find one which reads the stdin.

> So in short, boa is not able to replicate normal python coding in its simplist form ?

Steve,

As Werner said, I don´t think this is the right way to look at it. First, if you write a simple Python program using the Boa editor and then run it in an interactive shell environment--including the one that comes with Boa (so you could use the Boa shell or IDLE or others)--it will work as you want. In this use, the editor is just an editor, not unlike Editra or Ulipad or whatever. In this regard, Boa does what you want, as does all other decent code editors.

For most applications, though, using raw input is not how users interact with their programs--they use a GUI. One of Boa´s (many) strengths is the visual GUI builder.

So, to answer your question above: Boa IS able to replicate normal python coding in its simplest form, and a lot more, too.