Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Python (http://www.programmingforums.org/forum43.html)
-   -   programming in python? (http://www.programmingforums.org/showthread.php?t=13724)

php111 Aug 8th, 2007 12:17 AM

programming in python?
 
hello gang, I been told a while ago on a different forum before i can learn C, C++ or even C#, I would need to learn either Python or Ruby. Is that right? I found a really back tutorial so i did what it said go into a command. In my case it was the cmd command line in Vista. I typed in python -V. batch file is not recognized. What can cause that? I have Python installed. I think it is version 2.4.1 or something.

DaWei Aug 8th, 2007 6:39 AM

Python is a good language, but how do you suppose we learned C/C++ before Python was invented? :confused:

Arevos Aug 8th, 2007 6:51 AM

Quote:

Originally Posted by php111 (Post 131858)
hello gang, I been told a while ago on a different forum before i can learn C, C++ or even C#, I would need to learn either Python or Ruby. Is that right?

It's quite possible to learn C-based languages without learning Python, but Python tends to provide a more gentle introduction to programming, and is arguably easier to get going with.

Quote:

Originally Posted by php111 (Post 131858)
I found a really back tutorial so i did what it said go into a command. In my case it was the cmd command line in Vista. I typed in python -V. batch file is not recognized. What can cause that? I have Python installed. I think it is version 2.4.1 or something.

It's probably something to do with the PATH environment variable. However, rather than starting Python from the command line, I'd have thought it easier to use the start menu.

On my Python install I have "IDLE (Python GUI)" and "Python (command line)" in a menu folder called "Python 2.5". You probably have something similar. A good place to start is to go to "Python (command line)" and try using it as a calculator, e.g.:

:

Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> 1 + 1
2
>>> 2 * 2 * 2
8
>>> 2 ** 3
8
>>>

If that works, then you can start following the tutorial. When you find that your code gets a little too unwieldy for the interactive interpreter, you can switch to the IDLE editor.

DaWei Aug 8th, 2007 7:28 AM

Just get the path to Python in your environment path variable, open up the command prompt, change to your working directory (if not already there), and go. I keep a shortcut to the command prompt pinned to the start menu.

Aside to Arevos: I finally got around to using Beautiful Soup for this endeavour. Great tool.

http://www.daweidesigns.com/images/runpython.gif

php111 Aug 8th, 2007 12:59 PM

ok. What language sould i start with first? Python, C, C++, C#, Ruby or what?

DaWei Aug 8th, 2007 1:35 PM

I recommend Python.

php111 Aug 8th, 2007 1:56 PM

Quote:

Originally Posted by DaWei (Post 131886)
I recommend Python.


Ok i start with Python. What comes after Python? What would be the proper steps to Assembly? I know Assembly would be way last since it is much harder.

DaWei Aug 8th, 2007 3:28 PM

You're shitting me. You're jumping ahead way too soon. Write us a neat little application in Python, post it in Finished Projects, then ask the question again. My bet is you'll be posting a few questions in the Python forum before you get there.

The proper steps to learning assembly include actually learning how a microprocessor works. I'm guessing you want to learn how to solve problems programmatically, first, without going there.

Arevos Aug 8th, 2007 4:13 PM

Quote:

Originally Posted by php111 (Post 131888)
Ok i start with Python. What comes after Python?

By the time you've mastered Python, you can go in any number of directions, but it'll be a while before you can do that. Whilst Python is pretty easy to get going with, as programming languages go, it has a lot of advanced features that go beyond many other languages. Realistically, you could spend years just on Python, and many people do, though you may wish to branch out before then. Programming is a discipline that takes a very long time to master, but it's enjoyable, and the continual learning process makes sure you never run out of interesting things to learn about.

Infinite Recursion Aug 8th, 2007 4:13 PM

Actually, in my years at the university they started us off by learning how to code Assembly... then introducted use to higher level languages. Their logic behind this was to ensure we had a foundation in the very components that make up the system... then when we started writing code in higher level languages we had a higher appreciation for that language and the features available within the IDE. Python is a good starting language... if you want to get more "hardcore"... learn C.


All times are GMT -5. The time now is 12:45 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC