1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

raw_input

Posted by nobu on Dec 12, 2007

hi, i was wondering if there is any way to run the nodebox script using raw_input? I wanted to make the program available for users to input a keyword on web.wikipedia.search(" "). I understand that I can run the scrip on console, but then how should I make the code like? Any suggestion will help. Thank you!


 
Posted by anonymous on Dec 13, 2007

raw_input does not work in the NB development environment, since there is no stdin to read from. However, it should work in a console script. Look at "Console" in the tutorial on how to make your script ready. If you don't know how to use raw_input, here is an example:

in = raw_input("Enter a word: ")
raw_input just returns whatever the user types in, as a string. Here is what you will need:
result = web.wikipedia.search(raw_input("Article name: "))
Hope this helps.