Message 3 - I solved my problem. Yah Me!!!
Thanks
P.S I hope this is the right way to let you know so you don't waste your
time.
Lea
-Original Message-
From: tutor-bounces+lea-parker=bigpond@python.org
[mailto:tutor-bounces+lea-parker=bigpond@python.org] On Behalf Of
tutor-req
On 3/25/2011 12:27 AM, Lea Parker wrote:
*Hello*
**
*Just wondering if you have some time to cast your eyes over another
basic program.*
Donald pointed out the first error. (actually there are 3 such spelling
errors).
When you get "name xxx is not defined" use your editor's find featu
Hi Lea,
On Fri, Mar 25, 2011 at 1:27 AM, Lea Parker wrote:
> Hello
>
>
>
> Just wondering if you have some time to cast your eyes over another basic
> program.
>
>
>
> # Prompt user for data
>
> def main():
>
> print 'This program is to calculate your ticket sales to the softball
> game'
>
>
Hello
Just wondering if you have some time to cast your eyes over another basic
program.
# Prompt user for data
def main():
print 'This program is to calculate your ticket sales to the softball
game'
print #blank line
# Value of each lev
On Fri, Mar 25, 2011 at 12:53 AM, Donald Bedsole wrote:
> Hi Malcolm :-)
>
> On Fri, Mar 25, 2011 at 12:37 AM, Malcolm Newsome
> wrote:
>> Hey Don!
>>
>> I posted an eerily similar request to another python group about two weeks
>> ago! I, too, am very new to programming and the guessing game wa
Hey Don!
I posted an eerily similar request to another python group about two weeks
ago! I, too, am very new to programming and the guessing game was my first
shot at writing a script from scratch!
Below is my code (improved with some help from others). I still would like
to make some improveme
Hi folks,
This is a little program I've written to bring together some things
I've been trying to learn (not an attempt, of course, to make an
interesting game).. I've been working my way through a beginner's
tutorial, and except for a very basic program I wrote in C++ one time,
I think this is t
OK!! I see the problem now!
I also did a little change to the code, I open the .txt before the for
stamentet. The script is working properly
gdal.AllRegister()
file_list = [
folders = Non
for root, folders, files in os.walk( "C:\\" ):
file_list.extend(os.path.join(
root,fi) for fi in files if
f
On Thu, Mar 24, 2011 at 1:45 PM, wrote:
> Sent from my BlackBerry® on the MetroPCS Network
> --
> *From: * Louis LEICHTNAM
> *Date: *Thu, 24 Mar 2011 11:51:26 -0400
> *To: *
> *Subject: *Fw: [Tutor] Fw: Fw: Parsing data from a csv file [NC]
>
>
> - Forwarded by Lo
Look again the code from my last message:
import urllib, csv
url=r"http://www.cs.columbia.edu/~joshua/teaching/cs3101/simpsons_diet.csv";
simpsons=urllib.urlopen(url)
reader=csv.reader(simpsons, delimiter=',',quotechar='"')
list_string = []
for char,meal,ate,qty,com in reader:
if char != 'Cha
Sent from my BlackBerry® on the MetroPCS Network
-Original Message-
From: Louis LEICHTNAM
Date: Thu, 24 Mar 2011 11:51:26
To:
Subject: Fw: [Tutor] Fw: Fw: Parsing data from a csv file [NC]
- Forwarded by Louis LEICHTNAM/us/socgen on 03/24/2011 11:51 AM -
Louis LEICHTNAM/us/so
Sent from my BlackBerry® on the MetroPCS Network
-Original Message-
From: Louis LEICHTNAM
Date: Thu, 24 Mar 2011 11:51:26
To:
Subject: Fw: [Tutor] Fw: Fw: Parsing data from a csv file [NC]
- Forwarded by Louis LEICHTNAM/us/socgen on 03/24/2011 11:51 AM -
Louis LEICHTNAM/us/so
On Thu, 24 Mar 2011 09:22 -0600, "Susana Iraiis Delgado Rodriguez"
wrote:
> #This block is wrong, I think here is the problem
> if os.path.exists(shx):
> print 'El archivo ' +shx +' existe'
> else:
> log.write('No existe el archivo ' +shx + "\n")
> i
Ok, I think what you are trying is to get all data in a string list:
import urllib, csv
url=r"http://www.cs.columbia.edu/~joshua/teaching/cs3101/simpsons_diet.csv";
simpsons=urllib.urlopen(url)
reader=csv.reader(simpsons,delimiter=',',quotechar='"')
list_string = []
for char,meal,ate,qty,com in
Hello everyone!
I'm doing a python script that walks through files in my PC. Basically I'm
searching files that end up with .shp, but these files must have extensions
with .shx and .dbf. I want to write a .txt document which tells the user if
a file doesn't exist in the directory. But I haven't be
Thanks, what I'm trying to do is extract the data from the csv file, clean it
to make each line into a sentence.
But for this I think I need to use a dictionary for each and enter the words of
each columns in one no?
Sent from my BlackBerry® on the MetroPCS Network
-Original Message-
F
Hi,
I'm trying to install pygame on my Win XP machine. I'm running Python 3.2. I
can successfully use IDLE to run python scripts, and from the windows
command line can run python from any directory.
My PATH statement includes c:\python32;c:\python32\lib.
pygame .msi file I used:
pygame-1.9.1.win3
I don't know what are you going to do with data, but you can save all data
in either a list or a dictionary, for example:
import urllib, csv
url=r"http://www.cs.columbia.edu/~joshua/teaching/cs3101/simpsons_diet.csv";
simpsons=urllib.urlopen(url)
reader=csv.reader(simpsons,delimiter=',',quotechar=
Thank you for your help
Sent from my BlackBerry® on the MetroPCS Network
-Original Message-
From: Louis LEICHTNAM
Date: Thu, 24 Mar 2011 09:48:04
To:
Subject: Re: Fw: [Tutor] Parsing data from a csv file [NC]
Hello the loops are a bit different, and I definitely don't know if it's
co
On Thu, Mar 24, 2011 at 8:34 AM, louis leichtnam wrote:
> Hello,
>
> I am to extract a csv file from the web and parse it in python and after
> that make it into an html page.
>
> I want to get the data out of the csv file, get rid of the "," and make it
> readable.
>
> Questions:
> I would like t
Hello,
I am to extract a csv file from the web and parse it in python and after
that make it into an html page.
I want to get the data out of the csv file, get rid of the "," and make it
readable.
Questions:
I would like to be able to print the line I want but I don't know how to do
it.
I would
2011/3/24 Rafael Durán Castañeda :
> I can do it with two list comprehensions:
>
list_ = [1, 2, [3, 4], 5, [6, 7, 8], 9]
[x[i] for x in list_ if isinstance(x, list) for i in range(len(x))] + [x
for x in list_ if not isinstance(x, list)]
> [3, 4, 6, 7, 8, 1, 2, 5, 9]
>
> But i lo
I can do it with two list comprehensions:
>>> list_ = [1, 2, [3, 4], 5, [6, 7, 8], 9]
>>> [x[i] for x in list_ if isinstance(x, list) for i in range(len(x))] + [x
for x in list_ if not isinstance(x, list)]
[3, 4, 6, 7, 8, 1, 2, 5, 9]
>>>
But i loose original order, Can anyone do it with just one
Dharmit Shah wrote:
> I am learning Python and yesterday I cam across a definition wherein I was
> supposed to flatten a list recursively. I am getting the solution properly
> but wanted to know if I can optimize the code further.
>
> #!/usr/bin/env python
> new_list=[]
> def flatten(num_list):
>
Dharmit Shah wrote:
> I am learning Python and yesterday I cam across a definition wherein I was
> supposed to flatten a list recursively. I am getting the solution properly
> but wanted to know if I can optimize the code further.
>
> #!/usr/bin/env python
> new_list=[]
> def flatten(num_list):
>
25 matches
Mail list logo