Nairaland Forum

Welcome, Guest: Join Nairaland / Login / Trending / Recent / New
Stats: 1238771 members, 1652048 topics. Date: Friday, 25 April 2014 at 02:25 AM

Python Programming - Programming (8) - Nairaland

Nairaland Forum / Science/Tech / Programming / Python Programming (20009 Views)

A Beginner Wants To Start With Python Programming.pls Advice / What Can Python Programming Language Build? / Help! I Want To Learn Python Programming (1) (2) (3) (4)

(0) (1) (2) ... (5) (6) (7) (8) (9) (Reply) (Go Down)

Re: Python Programming by alexis(m): 10:19am On Jan 09, 2012
What's up fellow pythoners smiley

I am excited to see python is getting some audience in 9ja. I know the Seun has always been a proponent of python. For those of you looking for tutorials and some guidance, visit the following sites:

1. http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
2. http://wiki.python.org/moin/BeginnersGuide/Programmers

I will like to see some entry level python project started by the nairaland community - it can be anything. Python is an amazing glue language and can be use in so many domains. I will provide pointers and some code if I see serious commitments. I have started building a recording interface for the popular asterisk project using python and django. It's still in it's infancy and will throw out a demo when I can get the initial release out. So, let's get cracking and stop talking smiley
Re: Python Programming by alexis(m): 10:38am On Jan 09, 2012
Looking back at this thread, I see I had several posts up, I never followed through, my bad guys. Here is what I am going to do. I will start a project in python that will allow us code a simple database app from the CLI. The app will provide normal database CRUD functionality and we can build on it from there. Sounds good?

I will get started if we are agreement. Later, we can start writing network servers and clients in python, simple glue stuff that will teach the power behind python.
Re: Python Programming by mxxpunkxx: 1:03pm On Jan 09, 2012
^^^ Leeeeeeeeego!!!!!!!!
Re: Python Programming by alexis(m): 3:05pm On Jan 09, 2012
Ok, here we go:

We will be building an inventory program, it can be any inventory. The objective is to show how python can take advantage of MySQL. We will be touching the following:

1. Work with a database
2. Connect to a database
3. Query the database
4. Add records
5. Modify records
6. Delete records
7. Output information in the database to a CSV file

Installing MySQL

To install and run this app, you ’ ll need to install MySQL and the Python MySQLdb package. You can find instructions for downloading and installing MySQL and MySQLdb in http://www.codegood.com/archives/4 if using Windows and http://sourceforge.net/projects/mysql-python/ for Linux. To test if MySQL for python has been installed successfully, launch python on the CLI and type

import MySQLdb

If the driver is installed successfully, you will have no errors. Here is a good link for installing python 2.6 source on windows with MySQL for python

http://fuyun.org/2009/12/install-mysql-for-python-on-windows/

Will be following up with more information.
Re: Python Programming by mxxpunkxx: 7:08pm On Jan 10, 2012
^^ Why python 2.6.x ? There are guys actually running Python 3.2 . .

Whats ur take?
Re: Python Programming by alexis(m): 8:55pm On Jan 10, 2012
Python 3.2 hasn't gained a lot of grounds yet. I alot of people are still running 2.6 and 2.x versions. The primary reason I am running 2.6 is because the MySQL-python driver is supported on both windows and linux.

Will put up the first code base later on today.
Re: Python Programming by mxxpunkxx: 9:42am On Jan 11, 2012
I actually have all version of MontyPython installed ( and yes, am running Windows) with 3.2.2 been my fav , 

u see why i detest Python, with every newer version, comes different syntax . . 

Referrring to attached screenshot below, A would work fine on 2.x.x but the syntax changed  grin grin grin grin grin

Re: Python Programming by alexis(m): 4:40pm On Jan 11, 2012
You hate python because version 3.x.x uses an updated syntax? You should be hating a lot of programming languages then because that will keep happening.

Do you have the mysql-python driver installed on python ver 3?
Re: Python Programming by jeebz: 6:20pm On Jan 11, 2012
What about organizing a PyCon Nigeria sometimes next year. Check out http://www.pycon.org and http://www.pycon.blogspot.com

Re: Python Programming by alexis(m): 3:34am On Jan 12, 2012
I was thinking about the same thing but I am not in 9ja because of work. I want to start an asterisk and python user group.
Re: Python Programming by mxxpunkxx: 8:50am On Jan 12, 2012
alexis:

You hate python because version 3.x.x uses an updated syntax? You should be hating a lot of programming languages then because that will keep happening.

Do you have the mysql-python driver installed on python ver 3?


I hate the idea behind that not the program itself.
Give me newer syntax and functions; why change the former syntax?

The second question: i hav many unfortunately, they dont work . , has many bugs e.g. unix socket error

I saw petehunt (github) did sometin on July 27 for Py3k, buh am yet to check it out . . .
Re: Python Programming by webdezzi(m): 10:57pm On Jan 12, 2012
alexis:

Python 3.2 hasn't gained a lot of grounds yet. I alot of people are still running 2.6 and 2.x versions. The primary reason I am running 2.6 is because the MySQL-python driver is supported on both windows and linux.

Will put up the first code base later on today.
thats not true


mxxpunkxx:

I actually have all version of MontyPython installed ( and yes, am running Windows) with 3.2.2 been my fav , 

u see why i detest Python, with every newer version, comes different syntax . . 

Referrring to attached screenshot below, A would work fine on 2.x.x but the syntax changed  grin grin grin grin grin

also not true, except print now an inbuilt function
Re: Python Programming by mxxpunkxx: 6:54pm On Jan 15, 2012
@webdezzi
Stop spilling trash, Head over τ̅☺ "http://docs.python.org/dev/whatsnew/3.2.html" and view the changelog !!!
Re: Python Programming by webdezzi(m): 11:39pm On Jan 20, 2012
mxxpunkxx:

@webdezzi
Stop spilling trash,  Head over τ̅☺ "http://docs.python.org/dev/whatsnew/3.2.html" and view the changelog !!!

Wiki says "The syntax of a programming language is the set of rules that define the combinations of symbols that are considered to be correctly structured programs in that language." Source: http://en.wikipedia.org/wiki/Syntax_%28programming_languages%29

this never changed with python
every programming language deprecates this or that function or class so nothing new
Re: Python Programming by all4naija: 8:27pm On Jan 25, 2012
I just included Pyro (for robotic micro-controllers - which seems to work fine with python 2.5, not possible with 3.2) and Cpython as extension for C.
Re: Python Programming by all4naija: 8:43pm On Jan 25, 2012
webdezzi:

Wiki says "The syntax of a programming language is the set of rules that define the combinations of symbols that are considered to be correctly structured programs in that language." Source: http://en.wikipedia.org/wiki/Syntax_%28programming_languages%29

this never changed with python
every programming language deprecates this or that function or class so nothing new
If there were programming languages well structured, I think Python should be one of them. Regarding syntaxes, Python developers have over the years made changes, though, few. From indentations, keywords(which much have not changed) and to strict rules, parsing and debugging, yet it gives you the room for reasoning to approach your project in a concise and precise manner leaving the runtime aside. Yes, little has changed in syntaxes but a lot of extensions have been created and are quite helpful in that area thereby, reducing the evolution of making changes to set of rules which define Python. Then, you would have to question many reasons of effect such changes would have on thousands of software or packages already running python around the world - you could easily see the consequences of resorting to change in syntaxes.
Re: Python Programming by jeebz: 2:28pm On Feb 03, 2012
Any Django Developers in here?
Re: Python Programming by Jayjuice(m): 1:23am On Mar 15, 2012
@toluxa1
Can i get your python videos.i am also a nwebie in d world of python....thanx
 
Re: Python Programming by Seun(m): 4:11am On Mar 31, 2012
I use python 3.2 with mysql connector/python.
Re: Python Programming by seledafti: 7:29pm On Aug 08, 2012
@alexix, @jacob05, my code runs fine with python 2.7..but with 3.2..., i got syntax error, is there anything i'm doing wrong. pls help
Re: Python Programming by webdezzi(m): 7:42pm On Aug 09, 2012
ever wanted to package a mysql database or anyother along with your python apps?
well try out the WMI module for python,
you can not only package it but also install it the pythonic way.

just get an msi installer version of whatever app you want to package.


Seun: I use python 3.2 with mysql connector/python.
you mean python on the web, right? or standalone


seledafti: @alexix, @jacob05, my code runs fine with python 2.7..but with 3.2..., i got syntax error, is there anything i'm doing wrong. pls help

if the code is not much, you can scan through and replace all old python syntax with newer ones
if much, then consider the 2to3 tool, right inside the tools/scripts directory to convert your code to version 3
Re: Python Programming by seledafti: 9:28am On Aug 10, 2012
@webdezzi...thanks so much
Re: Python Programming by litusista(f): 6:32pm On Aug 14, 2012
hi guys. I'm also a newbie in python. actually it was some guys I met here on NL that suggested I go for python as I need to write an encryption algorithm for my final year project. the thing is i have started but recently almost every program I write has indentation errors and since i'm using textbooks, its not that interactive. I dont mind if I can get someone who can help or probably send links and good tutorials to my email. I use python 2.6 at the moment and i also use the IDLE to write my codes. I really need all the help I can get cos I have a a limited time frame work.
Re: Python Programming by litusista(f): 6:33pm On Aug 14, 2012
--
 
Re: Python Programming by webdezzi(m): 9:31pm On Aug 14, 2012
see, you need to watch bucky roberts's python programming on youtube. That guy will set you up on the right path


http://www.youtube.com/watch?v=4Mf0h3HphEA

1 Like

Re: Python Programming by goon: 12:14am On Aug 15, 2012
litusista: hi guys. I'm also a newbie in python. actually it was some guys I met here on NL that suggested I go for python as I need to write an encryption algorithm for my final year project. the thing is i have started but recently almost every program I write has indentation errors and since i'm using textbooks, its not that interactive. I dont mind if I can get someone who can help or probably send links and good tutorials to my email. I use python 2.6 at the moment and i also use the IDLE to write my codes. I really need all the help I can get cos I have a a limited time frame work.
Download the python docs from the official site and read the tutorials embedded in it. After that, start practicing and ask your questions here if you have any problems... Goodluck

1 Like

Re: Python Programming by Seun(m): 12:51am On Aug 15, 2012
Re: Python Programming by jayriginal: 9:20pm On Aug 16, 2012
litusista: hi guys. I'm also a newbie in python. actually it was some guys I met here on NL that suggested I go for python as I need to write an encryption algorithm for my final year project. the thing is i have started but recently almost every program I write has indentation errors and since i'm using textbooks, its not that interactive. I dont mind if I can get someone who can help or probably send links and good tutorials to my email. I use python 2.6 at the moment and i also use the IDLE to write my codes. I really need all the help I can get cos I have a a limited time frame work.

I think you need to be careful with your loops and branching statements (you might be putting certain statements in blocks where they shouldnt be).

Im not sure why you would have indentation errors unless the errors are from the book itself (assuming you are following it faithfully).

Its not so bad to have errors as they force you to find a fix and make you think. Thats crucial when learning a programming language. Also, IDLE indents automatically so I'm not sure why you get those indentation errors.
Keep at it though.

Good luck.

PS
You might provide a small sample of your code showing the problem.
Re: Python Programming by eshikafe: 9:20pm On Jan 05, 2013
I need an experienced python programmer with experience in wxPython GUI framework.

If you are very good with wxpython, kindly signify by responding.

Thanks.

1 Like

Re: Python Programming by choose4me(m): 9:12am On Jan 08, 2013
Subscribed!
@webdezzi, I'm encouraged by your posts.Sometime in 2008 you were a newbie but now you are a guru..hope to be like you when i grow up o.lol

(0) (1) (2) ... (5) (6) (7) (8) (9) (Reply)

Solution Of Linear Programming Problems Using Simplex Method / Best Laptops & Desktop Computers For Programmers?? / Web Application Development Contest: Jajad Wins

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (0) (1) (2) (3) (4) (5) (6) (7) (8) (9)

Nairaland - Copyright © 2005 - 2014 Oluwaseun Osewa. All rights reserved. See Nairalist and How To Advertise
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.