63 Comments
- peerk, on 10/12/2007, -2/+30To sum up the tutorial in one line:
Download ActivePython at http://www.activestate.com/Products/ActivePython/ - jesusphreak, on 10/12/2007, -6/+32I gotta be honest - isn't this really worthless? Basically it tells you how to install Python. Now unless you've never used an installer (and being on Digg I'm sure you all have), there's nothing difficult at all about doing so.
- inactive, on 10/12/2007, -2/+22What's next? An exciting tutorial on turning your machine on?
- Drood, on 10/12/2007, -6/+17Used to be whenever Python was mentioned, someone would pimp Perl.
Now it's Ruby... *yawn* - DanAtkinson, on 10/12/2007, -3/+13This is blatantly inaccurate.
I downloaded, installed and got to 'hello world' in Windows in under three minutes!! :)
Although not strictly a tutorial, it's a great way for noobs to get themselves off the ground with Python quickly. - adolfojp, on 10/12/2007, -7/+16It takes you 20 seconds to install linux? WOW!
- burke, on 10/12/2007, -13/+20Python on fresh Linux install: 20 seconds to "Hello, World!" ;)
This is good, Python is a great language for Windows users to learn. It's super-fun, super-easy, and super-portable. - wunch, on 10/12/2007, -1/+8It's actually quite difficult to turn a machine on. They like a lot of foreplay.
- Olle, on 10/12/2007, -1/+8Oh yeah? I can do Hello World in ASCII in 29 seconds.
- Mach5, on 10/12/2007, -3/+8yes, with py2exe, http://www.py2exe.org
- commandar!, on 10/12/2007, -1/+6Show me a solid, cross platform UI toolkit for Ruby and I'll consider you something other than a troll.
Ruby's a good language, but it's not the end all be all of everything. - ThomasCJohnson, on 10/12/2007, -0/+5I can do it on paper is negative thirty seconds!!!
- RealityBender, on 10/12/2007, -0/+5why bother with cygwin when it can run native????
http://www.python.org/download/releases/2.4.3/ - commandar!, on 10/12/2007, -0/+5There's a utility provided directly from the Python team called py2exe that converts python scripts into Windows executables. Meaning you don't have to distribute the VM with your apps.
On Unix, it's less of a problem because most modern Unixes ship with Python installed out of the box. - finnif, on 10/12/2007, -3/+8> The two languages are similar but Ruby has a cleaner syntax
WHAAAAT?? I love Ruby but can't agree with this at all. Ruby has a bunch of syntactic sugar to differentiate globals from class variables from instance variables, among other things. And "everything being a method" can be very confusing at first... you can't tell what's really an attribute vs. what's a method by looking at existing code.
Like I said, I love Ruby. But Ruby's syntax will make it the new PERL. Dealing with legacy Ruby code in 10 years will be about as much fun as dealing with legacy PERL from 1996. Book it. - commandar!, on 10/12/2007, -2/+6I've mentioned this elsewhere, but anybody who needs a solid scripting language for building UI tools. Almost all of Ubuntu's tools are written in Python, for example.
Ruby completely lacks any kind of good UI toolkit at this time. I've not really seen any decent ones for Perl either. This isn't a problem with Python. - SoulMaster2, on 10/12/2007, -1/+5Ok, I'll admit this guide kicked my lazy ass into learning how to code... but can I compile code into .exe files using Python?
- tdyer, on 10/12/2007, -3/+7i can write hello world in java in 6 seconds
3 seconds in c.
i love c. - ThomasCJohnson, on 10/12/2007, -3/+7Oh yeah? I can do "Hello World" in HTML in thirty seconds!
- Scrivener, on 10/12/2007, -3/+7I wrote it for people who look at the download page, see "Windows/X86" and think: "What's that mean? I have a Dell."
It also takes you straight into the interpreter and then turns you over to a great tutorial for noobs. It's for people who are "curious about programming" not programmers. - mickoes, on 10/12/2007, -2/+5Yeah maybe the DSL distro or the one that fits on a floppy drive 8)
- Scrivener, on 10/12/2007, -0/+3Here's where you end up:
http://www.python.org/download/releases/2.4.3/
Now try, just for a second, to look at that page through the eyes of a Windows user who is "curious about programming."
Also, if you want the Windows extensions and the colorful Pythonwin IDE, it's two downloads. Let me know if it works for you :) - diggity_dank, on 10/12/2007, -2/+5Who uses pything for any serious work? Um... a little company called Google... you may have heard of them. Who else? Well you can see a bunch here that are using the Django python web framework at djangoproject.com
Ruby on Rails is good for web apps. Django is good for content heavy sites. - finnif, on 10/12/2007, -3/+5> What's the great UI Toolkit for python? TKInter? somehow I can't seem to like TK, it kind of shows its age.
wxPython and PyQT - nitsuj, on 10/12/2007, -0/+2You know, from your post you could replace the word 'Ruby' with 'Python' and 'Rails' with 'TurboGears/Django' no problem.
Maybe you should have mentioned that Python executes faster than Ruby, uses native threads rather than green threads, has many language features Ruby doesn't have (list comprehensions, decorators) and superb library support.
As far as cleaner syntax goes...at best that's a joke right? Python source code is remarkably clean, concise and devoid of symbolic noise. - jalefkowit, on 10/12/2007, -0/+2I got into Python via ActivePython and regretted it when I discovered that ActivePython does not have SSL encryption compiled in. So if your script, say, needs to retrieve a web page at an https:// address, you are SOL.
The distribution of Python available at www.python.org, on the other hand, DOES have SSL built in. And it comes in a nice MSI installer, too. In fact I'm not sure if there's any reason to recommend ActivePython over the "standard" Python Windows distribution. - RealityBender, on 10/12/2007, -0/+2why not just go to the python home page
http://www.python.org/about/gettingstarted/ - Jack9, on 10/12/2007, -1/+3Exactly. It's interpreted. All interpreted languages require, AN INTERPRETER. However, java is a special case. You can make java into bytecode (that was supposed to be runnable cross platform but isnt really) or a standalone executable. So in, in reality, you dont always have to download java to run it. BTW, this is the world tutorial in awhile. You install a line interpreter...not impressive. How would you run a program that spans more than 1 line? oh wait that would be a practical website.
- finnif, on 10/12/2007, -2/+4> The Smalltalk web framework is called Seaside (http://www.seaside.st/).
Sorry for responding twice here but here's as far as I got on the Seaside website to realize it has never been used for serious website production: "Programmatic HTML generation.". And they actually argue against templating. Hilarious! - apantomimehorse, on 10/12/2007, -2/+4Hmm, I'm not sure why you say Java is a special case.:
1) Java is a hybrid language: source is compiled into bytecode, then bytecode is interpretted.
2) Python is a hybrid language too. It just doesn't seem like one because it has an interactive mode and because the interpreter gives you the appearance of running source files directly (it really translates the source to bytecode before it executes the module).
3) You can't make standalone executables out of Java code any easier than you can with other hybrid or interpretted languages.
4) Python has the advantage in distribution because the interpreter and libraries are smaller and because it's easier to strip it down to the necessities. It's also a lighter weight, less intrusive install.
And btw, I assume you meant to say 'worst tutorial'. Agreed. - inactive, on 10/12/2007, -2/+4So if you program in Python, and you create this cool app, anyone who wants to use that app also has to download Python? Kinda like Java?
- inactive, on 10/12/2007, -2/+3Cygwin has Python, along with a ton of other UNIX tools and apps for Windows. - http://www.cygwin.com.
- richardiscool, on 10/12/2007, -1/+2They say you can do it in 7 minutes? Well I'm gonna give them 6 minute Python. You see 7 minute Python and 6 minute Python next to eachother - and if you're not happy with Python in 6 minutes, we'll mail you the extra minute free.
- pedershk, on 10/12/2007, -0/+1Not neccessarily. On Windows, if you use IronPython http://dotnetramblings.wordpress.com/2006/04/21/ironpython-10-beta-6, you can compile Python like any other CLR-compliant language (.Net).
- JohnnySoftware, on 10/12/2007, -0/+1"Show me a solid, cross platform UI toolkit for Ruby and I'll consider you something other than a troll."
Okay, here it is. "Ruby Tk".
http://www.rubycentral.com/book/ext_tk.html
Ruby also supports doing platform-specific things on some platforms. Obviously, operations like this Excel spreadsheet automation require Excel - and MS-Windows.
http://www.rubycentral.com/book/win32.html
Python has a similar approach to supporting both portable and non-portable code, using Tk for portable GUI code, and allowing use of COM Automation on MS-Windows to work with MS-Word and MS-Excel documents through their respective applications.
By the way, I tried one or two examples from the Ruby TK page above, and they worked on my Macintosh running the current version of Mac OS X. I gotta believe they run on Linux. And I have a hunch they would run on MS-Windows too, if you had TK installed on there. Seems like a pretty portable GUI to me. - JohnnySoftware, on 10/12/2007, -0/+1"Show me a solid, cross platform UI toolkit for Ruby and I'll consider you something other than a troll."
Windows, Linux, and Mac OS X each have their own web browser module that applications can use - be they COM/Win32 apps, GTK/KDE apps, or OS X apps using WebKit.
So one slick trick that developers have been playing for at least half a decade is to embed a web server in their application, and have the GUI on the front end of their application display a pane that is basically a web browser somewhere in its window.
People could easily use this trick to create very smart-looking desktop GUI applications that are written in Ruby On Rails - something most people think of as a web/database programming framework. It does not have to be on a separate computer at all.
I am not sure it does, but perhaps the wildly popular iTunes desktop application program uses this trick some for building up and updating its GUI.
Because these web toolkits on the various platforms use the platforms _own_ *native* controls, I doubt users could tell the difference. I am not sure even programmers and web developers could tell, just looking at the running GUI itself!
There are all kinds of neat little things when you have a customized web server for an application running. One thing is you can use your own URL schemes. For example, instead of using something like "file:" at the beginning of a URL, you could use something like "help:" I think a couple of OS platforms have been doing that for a while for their online user help browsing applications.
Browsers support defining your own URL schemes too, as do programming APIs in various languages - like for example, Java. One reason they do that, is because it gives the ability to blend documents based on web standards, with the power of the language/framework itself. The binding is pretty abstract, so you wind up with very loose-coupling. That is something that is highly desirable.
Mapping things based on MIME type and/or filename suffix is also quite common in data handling programming frameworks in languages like Java, for example, and in web servers. The Apache Tomcat pure Java web server has supported embedding itself in applications for five years.
So don't write off so-called web frameworks as not being useful portable desktop API toolkits.
"Ruby's a good language, but it's not the end all be all of everything."
LOL, that is a given. The statement "X is a good Y, but it's not the end all be all of everything." could be said about any X that is a member of Y. That is a completely fallacious statement. It's a meaningless argument.
Nothing is the end-all of everything. - THC4k, on 10/12/2007, -2/+3Python is definitly the best language ever to learn OOP programming. You even get some interesting stuff like generators, list comprehension etc for free. Ruby is definitly more elegant, but i only love it because i've used Python for like 4 years now and ruby pulls some new tricks.
Ruby is like "Python++ /w perl" , and not as easy to learn as python and it doesn't have as many modules for everything.
If you want to learn Python, read www.diveintopython.org . - RealityBender, on 10/12/2007, -0/+1nope you make an executable
http://www.py2exe.org/ - superzorn, on 10/12/2007, -0/+0Perfect post! But rubbish ,))
- Scrivener, on 10/12/2007, -1/+0I don't mean to double post, but this reply was for peerk.
I wrote the quick how-to (not a tutorial) for Windows users who are "curious about computer programming." Not for programmers. The type of person who would look at the long list of versions on the ActiveState download page, see "Windows/X86," and think: "What's that mean? I have a Dell," or "I have Windows XP."
The how-to also takes you straight into the interpreter and then turns you over to a great tutorial for noobs. - nofxjunkee, on 10/12/2007, -9/+8[troll]
On linux or a mac, in 7 seconds:
Run your shell by logging in (console) or opening a terminal (gui).
$ python
> print "Hello world!"
Hello world! - sn0wflake, on 10/12/2007, -9/+7adolfojp: yeah, didn't you know that you can do everything with Linux? It just takes years to master *LOL*
- Jams, on 10/12/2007, -6/+4@Perk you beat me to posting!
Also check out active Perl and Tcl etc. - Mach5, on 10/12/2007, -5/+3keep programming in the past, old man!
- Sheco, on 10/12/2007, -3/+0What's the great UI Toolkit for python? TKInter? somehow I can't seem to like TK, it kind of shows its age.
I love python, I use it a lot, but I dont like tkinter, can anybody here explain me why should I like it?
Really please, I'd love to have some reasons to use it. - dgritsko, on 10/12/2007, -5/+2sweet bro, whats your secret?
- STKD, on 10/12/2007, -7/+4".... this little how-to assumes the following."
Never assume. :P - dandiemer, on 10/12/2007, -4/+1Ruby On Rails on Windows XP: 15 seconds to "Hello World!"
- xiongchiamiov, on 10/12/2007, -9/+5@adolfoip
If you're trying to be funny, it's not working. If you're not... well, we still have /.. - Drood, on 10/12/2007, -8/+4.NET is certainly deployed on a load more systems, plus has more attractive tools.
-
Show 51 - 63 of 63 discussions



What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the