#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    1
    Rep Power
    0

    How to run this puthon code


    hi, i am basically related to Java , and i am working on universal remote so i have allot of re-research on this topic and finally i found a python code on this site rtfms.com
    rtfms.com/wp-content/rtfms-com/pronto_code_to_wav.py
    i have no idea about python , as i have read that the python code will create a wave file with input of pronto hex code and the end of python code you can see some Samsung pronto hex codes
    and Now i want to run that python code so i google and find how to run python code online and find this link ideone.com and i pasted the entire python code but getting some errors, because i have no idea about python
    please help me

    Runtime error comments (0)
    stdin copy
    Standard input is empty
    stdout
    Standard output is empty

    stderr
    Traceback (most recent call last):
    File "prog.py", line 6, in <module>
    import numpy as N
    ImportError: No module named numpy
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    828
    Rep Power
    275
    the error is pretty self-explanatory.
    ImportError: No module named numpy

    that online python code running site doesn't have the module called "numpy" installed for use.
  4. #3
  5. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,702
    Rep Power
    480
    You can get numpy from the enthought python distribution, among other places but in particular they are my friends.

    Also, please look up the definition for the acronym rtfm .
    [code]Code tags[/code] are essential for python code and Makefiles!
  6. #4
  7. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2005
    Posts
    588
    Rep Power
    64
    If you have the Windows OS you are lucky and can use Portable Python (can be installed on a flash drive and run from there). It's free from http://portablepython.com/

    You have to figure out which version of Python you need (Python2 or Python3), then download the appropriate version. Both version come with a boat load of third party modules, including numpy. There is also a very nice IDE (editor) called PyScripter that you can edit and run our code from.

    Hint:
    code like
    print "something"
    name = raw_input("Enter your name: ")

    indicates the older version 2 of Python


    For example Portable Python 2.7.5.1

    This package contains following applications/libraries:

    PyScripter v2.5.3
    NumPy 1.7.1
    SciPy 0.12.0
    Matplotlib 1.2.1
    PyWin32 218
    Django 1.5.1
    PIL 1.1.7
    Py2Exe 0.6.9
    wxPython 2.9.4.0
    NetworkX 1.7
    Lxml 2.3
    PySerial 2.5
    PyODBC 3.0.6
    PyGame 1.9.1
    PyGTK 2.24.2
    PyQt 4.10.1
    IPython 0.13.1
    Pandas 0.11.0
    Package file size (compressed): 106MB

    Installed size: based on selected packages, between 50MB and 545MB
    Last edited by Dietrich; September 25th, 2013 at 02:01 PM.
    Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Location
    Pennsylvania, USA
    Posts
    35
    Rep Power
    1
    A lot of people have had success learning Python by starting with pygame.

IMN logo majestic logo threadwatch logo seochat tools logo