Click to See Complete Forum and Search --> : C or python?


Bob005
03-12-2004, 10:06 AM
which should i learn first? python or C?
I'm trying to learn python right now, and iv'e got the basics down, but i can't find any sort of docs that go fast enough, so i just zone out when reading them and don't learn anything.

also, what are the 2 capable of? i programmed my adress book on python, but it doesn't seem like it has much more power than that.

mrBen
03-12-2004, 10:21 AM
Python is extremely powerful (IMHO) and ideal for a first language.

You'll need to get into the libraries a bit, and maybe set yourself a project. What I've found with Python is that I get the feeling that I could program anything.

For a bit of GUI work, can I recommend wxPython (http://www.wxpython.org) - its a Python version of wxWidgets (http://www.wxwidgets.org) (previously wxWindows) - the docs are brilliant (I tend to use the wxWidgets docs instead) but you can build GUI apps very quickly.

You can also use Python to build CGI and web scripts; there are libraries for connecting to FTP, POP, SMTP, HTTP - you name it. Check out the library reference at www.python.org

My last project was a little web script called e-Pyp (http://epyp.jedimoose.org) which is a tool that checks an email address for blog entries, and then uploads them via FTP to a Blosxom (http://www.blosxom.com) blog, and sends an email confirmation via SMTP; great learning experience, useful app, and didn't take a long development time.


C is definitely a power language. But for acheiving visable results in a short period of time, Python is where its at. (IMHO again)

cfaun5
03-12-2004, 12:01 PM
If you are going to program, IMHO you might as well get into the OOP habit right away. Thus if the choice is between those two, I would also recommend python. However, I think the choice should really be Python, C++ w/QT or wxWidgets or Java. I cannot and will not deny that for quick results, Python is the way to go, as it has less of a learning curve to it. However, I recommend that you keep in mind the following issue in making your decision:

Speed:
C++ is faster than Java and Python
Python is faster than Java

Note that although C is faster than C++, there is little difference if you do not use polymorphism.

If you do go with python, I recommend getting into the semicolon habit early by adding optional semicolons at the end of each statement. This way, you can move to a lower-level language with less frustration.