Thread
:
Programming Languages?
View Single Post
Lee
2008-06-25 , 18:23
Posts: 43 | Thanked: 10 times | Joined on May 2008
#
9
It really depends on the application you want to make and how much optimization you want to be able to do with it, and how close to the hardware you want to work with.
I would recommend to some one new to programming to start with a high level language and when or if limitations are met, try a lower level programming language. That is how I learned at least, when I went from Basic to C/C++.
I think Python is a good language to learn, and I recommend getting iPython for it and doing some REPL, so you can program in a special console/shell and your code is executed as you type it (instead of creating a text file and running the text file). You can do this with normal Python (if you have Python installed on your NIT you can use terminal to do the same thing by typing 'python') but iPython is nice in that it has tab completion (it will display a list of functions) and with the built in documentation you can learn about what you can do with certain objects, so it is a lot better for learning python then the default python shell.
http://ipython.scipy.org/moin/
There is even a cool ipython gtk console, that if you use it, you can create gtk windows in real time, and add and remove widgets using python code in a console, with out it you will be locked in a loop and will not be able to add and remove widgets while the your window is updating.
http://ipython.scipy.org/moin/Cookbook/EmbeddingInGTK
A simple PyGTK example (from
http://live.gnome.org/PyGTK
) :
import gtk
window = gtk.Window()
window.connect("delete-event", gtk.main_quit)
window.set_border_width(10)
button = gtk.Button("Hello World")
def on_button_clicked(button): print "Hello World"
button.connect("clicked", on_button_clicked)
window.add(button)
window.show_all()
gtk.main()
(note that you must press enter twice for the "def on_button_clicked" line, that is how python knows it is the end of the function)
And again if you have python and pygtk installed on your tablet, you can open up xterm, enter 'python' and start entering the lines of that program in the xterm and when you execute the line gtk.main() it will launch the hello world window.
Quote & Reply
|
The Following User Says Thank You to Lee For This Useful Post:
qwerty12
Lee
View Public Profile
Send a private message to Lee
Find all posts by Lee