> From: fredp...@mac.com
> To: tutor@python.org
> Date: Sat, 25 Jul 2009 16:24:13 -0700
> Subject: [Tutor] Need to start learning again
>
> I started learning python, but then life got busy... I need some help
> finding good resources to start learning again.
>
> My main need for python at
On Sat, Jul 25, 2009 at 7:15 PM, Darth Kaboda wrote:
> I'm starting to learn Python as it seems to be adopted by many companies
> that I've been looking to apply to. I used the book Learning Phython to get
> the basics of the language and many of the gotcha's. I think I know enough
> of the basi
On Sat, Jul 25, 2009 at 6:24 PM, Fred @ Mac wrote:
> I started learning python, but then life got busy... I need some help
> finding good resources to start learning again.
>
I learned everything I know from Google ;) or at least sources provided by
Google. I'd also recommend Python for System
> Subject: Re: [Tutor] First code snipet
> From: andr...@kostyrka.org
> To: darthkab...@msn.com
> CC: tutor@python.org
> Date: Sun, 26 Jul 2009 03:02:27 +0200
>
> Some things:
>
> 1) It's Python, not Phython.
> 2) Slightly shorter solution to your problem:
>
> import random
>
> input = ran
Some things:
1) It's Python, not Phython.
2) Slightly shorter solution to your problem:
import random
input = range(53)
random.shuffle(input)
print input
3) The important part here is that reimplementing something that is in
the standard library does not make sense usually.
4) A more sensible
Check out thenewboston's video tutorials at Youtube:
http://www.youtube.com/view_play_list?p=EA1FEF17E1E5C0DA
They're fairly recent and they definitely got me started with learning the
syntax. After you're through with those, he also has a series on wxPython.
A couple ebooks you'd be interested
I started learning python, but then life got busy... I need some help
finding good resources to start learning again.
My main need for python at first would be to write small programs to
perform system commands. Like moving files around, copying or
deleting files, and perhaps some simple
ctc...@gmail.com wrote:
grades = []
names = []
gradeTotal = 0
numStudents = 0
inputFile = open("input.txt", "r"
for line in inputFile:
if line.strip().isdigit():
grade = float(line)
if grade != 0.0:
gradeTotal += grade
grade = grades.append(grade)
else:
name = line.strip()
name = names.append(n
I'm starting to learn Python as it seems to be adopted by many companies that
I've been looking to apply to. I used the book Learning Phython to get the
basics of the language and many of the gotcha's. I think I know enough of the
basic features of the language to start playing around and can u
wrote
Hi I am trying to read a html document into a text file
Hi, welcome to the tutor list.
First thing to point out is that HTML files are just text files with
a particular structure. But so far as reading them in Python
goes they are no different to any other text file.
purpose of spl
Hi I am trying to read a html document into a text file to looks at it for the
purpose of spliting the data. I am not sure I am doing this right. I have my
html
document, my text file and a python script I called convt.py on the desktop in
a
folder. I opened up IDLE (python GUI) opened the fol
"Mac Ryan" wrote
time). I was therefore thinking about separating the classes for each
"tabbed window" in different files, under the impression that this would
make the program faster / with a smaller memory footprint, as only the
needed file will be loaded into memory
The gains would be mi
2009/7/25 David :
> Dear tutors,
>
> I am trying to teach myself the way Python's works with databases.
> I decided to start with SQLite, and am looking at Summerfield's
> 'Programming in Python 3'.
> I got a code snippet that I don't fully understand (the comments are mine):
>
>
> def get_and_set_
grades = []
names = []
gradeTotal = 0
numStudents = 0
inputFile = open("input.txt", "r"
for line in inputFile:
if line.strip().isdigit():
grade = float(line)
if grade != 0.0:
gradeTotal += grade
grade = grades.append(grade)
else:
name = line.strip()
name = names.append(name)
This just loops ove
Thank you Alan for the prompt reply,
> - Put reusable components into modules.
OK: the use of files as "libraries" is quite clear to me and indeed I
am already doing that. What is not clear is if I should _only_ put in
modules stuff that is reusable, or if there are other widely accepted
Dear tutors,
I am trying to teach myself the way Python's works with databases.
I decided to start with SQLite, and am looking at Summerfield's
'Programming in Python 3'.
I got a code snippet that I don't fully understand (the comments are mine):
def get_and_set_director(db, director):
# try
"Emad Nawfal (عماد نوفل)" wrote in message
news:652641e90907250514m1566287aq75f675fd63360...@mail.gmail.com...
On 7/25/09, Dave Angel wrote:
Emad Nawfal (9E'/ FHAD) wrote:
Hi Tutors,
I have a bunch of text files that have many occurrences like the
following
which I believe, given the cont
wrote
With these commands:-
import re
f = open('chem.txt')
for line in f:
if re.search('C = ',line):
print line
I am getting those lines for which C value is there but how to get those
one for which it doesn't have any value, i did google search but still i
am not getting.
Don;
Hi,
I have a file having lines:-
48 ALA H = 8.33 N = 120.77 CA = 55.18 HA = 4.12 C = 181.50
104 ALA H = 7.70 N = 121.21 CA = 54.32 HA = 4.21 C =
85 ALA H = 8.60 N = CA = HA = 4.65 C =
Now i want to make two another file in which i want to put those lines for
which C is missing and another one
I concur with wesley and dave re homework.
Some questions to consider:
do you know how to open a file?
do you know how to read a line from an opened file?
do you know how to incorporate reading lines in a loop?
do you know how to determine whether a character is "numeric"?
do you know how to
maybe because you need to install Gnome-Python
On Sat, Jul 25, 2009 at 1:36 PM, wrote:
> Hello,
> I have searched high and low but for the life of me I am unable to locate
> this module.
>
import cairo
import rsvg
> Traceback (most recent call last):
> File "", line 1, in
> ImportErr
Hello,
I have searched high and low but for the life of me I am unable to locate this
module.
>>> import cairo
>>> import rsvg
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named rsvg
>>>
Basically from my previous post I would like to now manipulate the SVG
On 7/25/09, Dave Angel wrote:
> Emad Nawfal (9E'/ FHAD) wrote:
>> Hi Tutors,
>> I have a bunch of text files that have many occurrences like the following
>> which I believe, given the context, are numbers:
>>
>> ١٨٧٢
>>
>> ٥٧
>>
>> ٢٠٠٨
>>
>> etc.
>>
>> So, can somebody please explain what kind
Chris Castillo wrote:
Okay I really need help with the program I am writing. I've can't seem to
figure out what I need to do and have tried several different methods.
I need to read in a text file in python that contains the following:
Student Name ( could be unknown amount in file )
Numeric G
Jesse Harris wrote:
for d in Decks.all(): #loop thru all available decks
self.response.out.write(''+d.name)
self.response.out.write(''+d.description)
self.response.out.write('')
self.response.out.write('')
: invalid syntax (main.py, line 206)
args =
('invalid syntax'
Emad Nawfal (9E'/ FHAD) wrote:
Hi Tutors,
I have a bunch of text files that have many occurrences like the following
which I believe, given the context, are numbers:
١٨٧٢
٥٧
٢٠٠٨
etc.
So, can somebody please explain what kind of numbers these are, and how I
can get the original numbers bac
"Mac Ryan" wrote
While I am working my way up to a more pythonic and cleaner style in
the code, one thing that I have very confused ideas about is how I
should organise my code, in terms of classes and files.
I don't think there is any definitive answer.
- Put reusable components into module
"Luis Galvan" wrote
little foggy to me, which is where I need help. The 'net always gives me
an
exaggerated technical answer that is simply way over my head, so I'm
asking,
does parsing mean to read and manipulate data? If not, can someone
provide
an answer in lay man's terms?
Others ar
28 matches
Mail list logo