Computer Association of SIUE - Forums

CAOS Forums => Official Business => Topic started by: Travis W on 2009-03-25T10:19:13-05:00 (Wednesday)

Title: LOTM: Python Thurs April 23rd
Post by: Travis W on 2009-03-25T10:19:13-05:00 (Wednesday)
I meant to make this thread earlier but completely forgot until i read Tangent Orchard's post.
We will be hosting a LOTM installment on the Programming Language Python on Thurs. April 23rd in EB 1024 at 11am.
The presenter is Micheal Parish (sorry if i spelled your name wrong).
If you have any questions or comments you can post them here.

Travis
Title: Re: LOTM: Python Thurs April 23rd
Post by: William Grim on 2009-03-25T18:58:24-05:00 (Wednesday)
For any of you willing to venture into python yourself, it's really quite an easy language.  This tutorial (http://docs.python.org/tutorial/index.html) from python.org (http://python.org) is fantastic.  You can be up and running with some pretty complex solutions to problems in 24 hours with some of the nuances of the language coming to you later.
Title: Re: LOTM: Python Thurs April 23rd
Post by: Travis W on 2009-04-13T19:41:25-05:00 (Monday)
The time on this presentation is being changed due to a conflict with our Springfest booth  :hammer2:
It will be moved to later in the day.
I will post the new time when i get it.

Travis
Title: Re: LOTM: Python Thurs April 23rd
Post by: Tangent Orchard on 2009-04-13T22:12:32-05:00 (Monday)
Quote from: Travis W on 2009-04-13T19:41:25-05:00 (Monday)
The time on this presentation is being changed due to a conflict with our Springfest booth  :hammer2:
It will be moved to later in the day.
I will post the new time when i get it.

Travis
Awesome, I might be able to come now. :D I've always wanted to see what Python's like.  (Apparently I'm too lazy to research it myself or something.)  (Busy with homework!  There we go.)
Title: Re: LOTM: Python Thurs April 23rd
Post by: Travis W on 2009-04-15T23:00:14-05:00 (Wednesday)
Just got the word.
The new time is 3:30 in room EB0012 still on Thursday April 23rd :yes:

Travis
Title: Re: LOTM: Python Thurs April 23rd
Post by: Tangent Orchard on 2009-04-15T23:17:40-05:00 (Wednesday)
Quote from: Travis W on 2009-04-15T23:00:14-05:00 (Wednesday)
Just got the word.
The new time is 3:30 in room EB0012 still on Thursday April 23rd :yes:

Travis
Cool.  (You'll also want to update the header on the Forum Index. ^_^)
Title: Re: LOTM: Python Thurs April 23rd
Post by: Robert Kennedy on 2009-04-16T00:11:16-05:00 (Thursday)
Nice...I don't even have to get up from my seat after Databases.  The LotM will come to me. 
Title: Re: LOTM: Python Thurs April 23rd
Post by: Travis W on 2009-04-20T18:27:10-05:00 (Monday)
It has just been decided at today's meeting that we will be providing pizza and soda at the presentation. :wavetowel:


Travis
Title: Re: LOTM: Python Thurs April 23rd
Post by: rdurham285 on 2009-04-22T13:36:40-05:00 (Wednesday)
How long is the presentation??

I have to work at the bowling alley until four.

Would I be rude walking in late?
Title: Re: LOTM: Python Thurs April 23rd
Post by: Mark Sands on 2009-04-22T13:38:11-05:00 (Wednesday)
No, you would not be rude walking in late -- people have to leave for class all the time. Although you'll probably miss the pizza and a good portion of the presentation. I'm guessing it'll last close to an hour, but I'm judging from past presentations.
Title: Re: LOTM: Python Thurs April 23rd
Post by: Robert Kennedy on 2009-04-23T18:06:32-05:00 (Thursday)
I know most of the people that attended the presentation were Juniors and Seniors...but if there's anyone out there that wants to take a look at Python from an introductory programmers perspective, there's a course entitled A Gentle Introduction to Programming Using Python (http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-189January--IAP--2008/CourseHome/index.htm) on MIT's open courseware website.  At first glance it looks like its roughly on par with the CS 140 course offered at SIUE. 
Title: Re: LOTM: Python Thurs April 23rd
Post by: William Grim on 2009-04-23T21:08:12-05:00 (Thursday)
Did you guys record video?  I'd say just throw it up on youtube.
Title: Re: LOTM: Python Thurs April 23rd
Post by: Jarod Luebbert on 2009-04-23T22:18:59-05:00 (Thursday)
Quote from: William Grim on 2009-04-23T21:08:12-05:00 (Thursday)
Did you guys record video?  I'd say just throw it up on youtube.

YouTube only lets you upload 10 minutes of video. It's uploading to vimeo as we speak. I'll post the link soon.
Title: Re: LOTM: Python Thurs April 23rd
Post by: Jarod Luebbert on 2009-04-24T09:48:42-05:00 (Friday)
Here you go guys: http://bit.ly/g8mud

Sorry for the poor audio and lack of editing at the end (mostly directed towards Mark). Were still trying to figure out the best way to record these and edit them together as fast as possible while maintaining quality. The slides should be posted up soon.
Title: Re: LOTM: Python Thurs April 23rd
Post by: Mark Sands on 2009-04-24T13:25:51-05:00 (Friday)
Site update: The site's "done" as it can be, just needs to be pushed. So I'll see about the switch this week.. hint: if you're curious its in "beta".. ;)
Title: Re: LOTM: Python Thurs April 23rd
Post by: Tangent Orchard on 2009-04-24T21:26:15-05:00 (Friday)
Well done, Michael. =) I forgot to ask during the presentation, but you mentioned you normally write Python code in a normal text editor like Notepad or something.  How do you take it from there to an executable?
Title: Re: LOTM: Python Thurs April 23rd
Post by: Jarod Luebbert on 2009-04-24T22:40:36-05:00 (Friday)
Quote from: Tangent Orchard on 2009-04-24T21:26:15-05:00 (Friday)
Well done, Michael. =) I forgot to ask during the presentation, but you mentioned you normally write Python code in a normal text editor like Notepad or something.  How do you take it from there to an executable?

Usually python programs are distributed as just .py or .pyc files, but there are bundling tools out there that create an executable. This is good if you want to be able to distribute your programs without having to worry about if the user has Python installed or not.

To create a .pyc file just:

import py_compile

py_compile.compile("mymodule.py")


And that should generate the bytecode.

You can use http://www.py2exe.org/ for windows or http://undefined.org/python/ (py2app) for mac to make an .exe or .app file.
Title: Re: LOTM: Python Thurs April 23rd
Post by: Mark Sands on 2009-04-25T19:37:05-05:00 (Saturday)
Quote from: Tangent Orchard on 2009-04-24T21:26:15-05:00 (Friday)
Well done, Michael. =) I forgot to ask during the presentation, but you mentioned you normally write Python code in a normal text editor like Notepad or something.  How do you take it from there to an executable?

or if you're on a *nix box and you just want to run a simple script, from command line: python filename.py
Title: Re: LOTM: Python Thurs April 23rd
Post by: and459d2 on 2009-04-26T14:45:00-05:00 (Sunday)
another way on a unix system is to specify the directory where the python binary is located at the top of your file..

Example:   #!/usr/bin/python 

                then on the command line type sudo chmod +x "python-file.py", and then you have an executable python script.
Title: Re: LOTM: Python Thurs April 23rd
Post by: William Grim on 2009-04-26T18:53:21-05:00 (Sunday)
The recommended magic file type is actually

#!/usr/bin/env python

This is so your PATH gets checked.
Title: Re: LOTM: Python Thurs April 23rd
Post by: raptor on 2009-04-27T14:28:38-05:00 (Monday)
I just chmod 755 the file :)
Title: Re: LOTM: Python Thurs April 23rd
Post by: Robert Kennedy on 2009-04-27T20:10:56-05:00 (Monday)
There's not nearly enough ways to run a .py file it seems. 

Title: Re: LOTM: Python Thurs April 23rd
Post by: rbalfan on 2009-04-27T21:25:20-05:00 (Monday)
I found this in another forum.

Code (python) Select

python -c 'print "\n".join([" ".join(["*"*n for n in t]).center(9) for
t in [(3, 3), (9,)] + map(lambda n: (n,), range(9, 0, -2))])'
Title: Re: LOTM: Python Thurs April 23rd
Post by: raptor on 2009-04-28T13:38:30-05:00 (Tuesday)
 *** ***
*********
*********
*******
  ***** 
   ***   
    * 
Title: Re: LOTM: Python Thurs April 23rd
Post by: Mark Sands on 2009-04-28T14:10:48-05:00 (Tuesday)
Scott's 500th post was a heart, via a python script. win.