Re: [Tutor] How to output dictionary data to CSV file

2015-04-28 Thread Paradox
How rude of me, I neglected to note I am using Python 3.4.3. On 04/28/2015 04:51 PM, Paradox wrote: I have some data structured like this: {'B002':'NRP 2014','B003':'HBB 2015'} Basically account numbers and project names, each account number h

[Tutor] How to output dictionary data to CSV file

2015-04-28 Thread Paradox
I have some data structured like this: {'B002':'NRP 2014','B003':'HBB 2015'} Basically account numbers and project names, each account number has a project name. I represent it in a dictionary because that seemed the best way to keep the account numbers and project names together. I want to

Re: [Tutor] Next steps... :p:

2014-07-08 Thread Paradox
On 07/08/2014 11:51 AM, Ni Hung wrote: > What should I do next to advance my knowledge of python? Should I study/use libraries/modules? Which ones? Any other suggestions? > > Thanks and Regards > Nii Oops, replied to sender and not to the list ... Sounds like you are ready to start solving r

Re: [Tutor] Project suggestions :p:

2014-03-13 Thread Paradox
On 03/12/2014 10:29 PM, Scott W Dunning wrote: Hey Everyone, I just got through doing a Guess-the-number script and was looking for something else to practice on. Do any of you have any suggestions on some things I could work on? Keep in mind I am not only extremely new to python I am new

Re: [Tutor] more html/css question than python :p:

2013-12-22 Thread Paradox
On 12/21/2013 01:04 PM, Timo wrote: op 21-12-13 16:07, Matthew Ngaha schreef: I always use the Twitter Bootstrap boilerplate. Here are the docs: http://getbootstrap.com/ Everything is set up for you already so you can create good looking websites in a flash. I'll second the mention of bootstra

Re: [Tutor] menu-libre broken? :p:

2013-12-20 Thread Paradox
On 12/19/2013 10:46 PM, Keith Winston wrote: I did this sequence of commands: sudo add-apt-repository ppa:menulibre-dev/devel sudo apt-get update sudo apt-get install menulibre But at the end of the update I got: W: Failed to fetch http://ppa.launchpad.net/menulibre-dev/devel/ubuntu/dists/sau

Re: [Tutor] Phython List values :p:

2013-11-18 Thread Paradox
Ayo, On 11/18/2013 01:57 AM, Ayo Rotibi wrote: I read that an assignment with an = on lists does not make a copy. Instead, assignment makes the two variables point to the one list in memory. For instance, if a = [1, 2, 3] and b=a, then b = [1, 2, 3]. However, I discovered that if I change

Re: [Tutor] Argparse and how best to use it :p:

2013-10-24 Thread Paradox
On 10/24/2013 12:50 PM, Dave Angel wrote: Not sure which tutorial you're using, but the refernce page: http://docs.python.org/3.3/library/argparse.html Actually I am using 2.7.5, the tutorial found here: http://docs.python.org/2/howto/argparse.html#id1 but the problem is the same. impor

[Tutor] Argparse and how best to use it

2013-10-24 Thread Paradox
I am trying to learn about argparse and how best to incorporate it into my scripts. I am using Python 2.7.5 on Ubuntu 13.10. It seems from the argparse tutorial that all the arguments are processed as global variables. Is that the standard way to do it or do you normally (when doing real pro

Re: [Tutor] Creating a Choose Your Own Adventure Game :p:

2013-06-11 Thread Paradox
>On 06/12/2013 12:24 PM, DragonDon wrote: >http://cosmopolitangeek.wordpress.com Dragon Don, I will check this out but I wonder if you have ever heard of git or mercurial? Putting code for small projects up on github or bitbucket is very simple and ma

Re: [Tutor] query from sqlalchemy returns AttributeError: 'NoneType' object :p:

2013-05-02 Thread Paradox
On 05/03/2013 06:13 AM, Karthik Sharma wrote: from sqlalchemy import create_engine, ForeignKey from sqlalchemy import Column, Date, Integer, String This list is mostly for standard library questions (though there may be some that can help here too). Did you know there is an sqlalchem

Re: [Tutor] Chapter 4 Help :p:

2013-04-26 Thread Paradox
On 04/27/2013 05:02 AM, Mariel Jane Sanchez wrote: I was in Seattle for 4 days for our band trip so i miss some classes. Chapter 4 Project 1 "Write a program that asks for a phrase, and then calculates and displays the number of vowels in the phrase, twice. The first time, your program should

Re: [Tutor] Getting os.walk output into a list :p:

2013-03-15 Thread Paradox
On 03/15/2013 02:31 PM, Dave Angel wrote: On 03/15/2013 01:53 AM, Paradox wrote: There is something I can't figure out about the following code (using python 2.7.3): def return_tree_files(rootpath, pattern): for root, dirs, files in os.walk(rootpath): i = [os.path.join

[Tutor] Getting os.walk output into a list

2013-03-14 Thread Paradox
There is something I can't figure out about the following code (using python 2.7.3): def return_tree_files(rootpath, pattern): for root, dirs, files in os.walk(rootpath): i = [os.path.join(root, filename) for filename in fnmatch.filter(files, pattern)] return i I thought th

Re: [Tutor] mysqlite :p:

2013-03-06 Thread Paradox
On 03/07/2013 02:50 AM, Lolo Lolo wrote: im working through alan's sql tutorial. i have a few questions from there but 1st i wanted to try out an example in Core python's sql example. import sqlite3 cxn = sqlite3.connect('sqlite_test/test') cur = cxn.cursor() after this i created a table cal

Re: [Tutor] Installing Python Packages :p:

2013-01-13 Thread Paradox
On 01/14/2013 10:58 AM, what ever wrote: I want to install four packages. Their names are pip, distribute, nose, and virtualenv. The big question is: How would you recommend I install these packages on my system? I was also hoping you could explain Python packaging in general. I only recently d

Re: [Tutor] stored variable :p:

2012-09-18 Thread Paradox
On 09/19/2012 09:21 AM, Lamar iVisionary wrote: Trying to write the following in Python. "Hi, my name is Bob!", .What is your name? print " Hi," + "my name is Bob!, strname= raw_input ("What is your name?") Hi ###, nice to meet you! I'm 18. How old are you? I cant figure out