On Jul 17, 2005, at 20:18, Bill Campbell wrote:
Is there any significant performance difference between the
tests, ``key in dictionary'' and ``dictionary.has_key(key)''?
I would prefer using the ``key in'' because it's a bit easier to
type, and can also be used with lists in addition to
On Jul 14, 2005, at 12:26, Negroup - wrote:
To read a file's contents, call f.read(size), which reads some
quantity of data and returns it as a string. size is an optional
numeric argument. When size is omitted or negative, the entire
contents of the file will be read and returned; it's your
On Jul 12, 2005, at 18:44, Gooch, John wrote:
I have a Python script that stores the results of the processing
that it
does in a
database, but it has to have an alternate way of storing its data in a
database-friendly way (XML)in case the database is not available
( connected
down, data
On Jul 9, 2005, at 11:17, Don Parris wrote:
get_Name(prt_Name)
# Calling get_Name with prt_Name as the argument produces this:
C:\Python24python scripts\learning.py
f
function prt_Name at 0x00AEBEF0
At least it found the function. That's little shy of a miracle for
me. :) However, I would
On Jun 17, 2005, at 11:58, Jnos Juhsz wrote:
Dear Guys,
I have a 2D array:
[['1', '2 ', '3'], ['longer ', 'longer', 'sort']]
How can I get what is the max(len(item)) for the columns ?
I would like to get a list with the max_col_width values.
I hope that, it can wrote
On Jun 14, 2005, at 22:56, Pujo Aji wrote:
Hello,
I tried this code in emacs.
for i in range(3):
time.sleep(1)
print i
It shows the result but total result not second per second.
Any one experiance this problem
pujo
Works for me... How do you run it? Do you use a separate
On Jun 14, 2005, at 23:17, Pujo Aji wrote:
I just use Ctrl+C Ctrl+C to run the code.
The code wait for 3 second and show all i all together.
I can't feel every second pass.
pujo
Try running your script from a terminal (outside of emacs, that
is).
-- Max
maxnoel_fr at yahoo dot fr
On Jun 12, 2005, at 00:42, Simon Gerber wrote:
Any hints? I looked up the python reference manual, but couldn't find
any way to force print statements to draw. Should I be looking into
threads, perhaps?
I/O in Python is buffered -- that is, it uses RAM whenever
possible to delay the
On Jun 7, 2005, at 20:42, Bernard Lebel wrote:
repr( myFunc )
Wich returns
'function myFunc at 0x009C6630'
Okay then I run
s = repr( myFunc() )
print s
Wich returns
'None'
That's perfectly normal. Your last assignment calls the
function, then assigns to s the
On Jun 2, 2005, at 23:39, Terry Carroll wrote:
The palette mode (P) uses a colour palette to define the actual
colour for each pixel.
Not sure what that means, exactly, but it looks like im.palette
will get
the palette of a a P-mode image, and im.putpalette will change it.
On May 24, 2005, at 14:22, Mike Hansen wrote:
Excel has some nice database-like queries itself. Take a look at
Advanced Filter
in Help. You can essentially query a worksheet and even send the
results to a
different worksheet. I'd imagine that once you got the query
working, you could
On May 24, 2005, at 02:49, Joseph Quigley wrote:
... to play a .wav music file. I tried w.play() but got an error that
module has no attribute 'play'.
What do I use to get it to play?
Thanks,
The wave module is meant to read, write and manipulate
(transform, filter, whatever) WAV
On May 22, 2005, at 21:07, Jonas Melian wrote:
for line in fileinput.input(glob.glob(os.path.join
(dir_locales, *_[A-Z][A-Z]))):
if re.search(locale for, line):
print line
If you're only looking for the occurrence of a string and not a
regex pattern, you don't
On May 19, 2005, at 20:49, William O'Higgins wrote:
I am trying to discover the syntax for call on a dictionary of
lists by
key and index.
The data structure looks like this:
dol = {'key1':['li1','li2','li3'],'key2':['li1','li2','li3'],\
'key3':['li1'li2,'li3','']}
The keys are
On May 19, 2005, at 22:18, Chelan Farsight wrote:
I am using the online book Dive Into Python.
I ran the first program given and have run into an error on line 7 at
the colon. Now I imagine that there is probably a corrections page at
the site, but I am interested in knowing why it won't
On May 19, 2005, at 22:46, Chelan Farsight wrote:
Thanks!
You were right about the double underscore, however, I am still
getting the error on line 7...hrmm
any other ideas?
In your original code, the space between if and __main__ is also
missing. This may be the source of the
On May 19, 2005, at 23:28, Jonas Melian wrote:
I want get the kernel serie, so 2.x only (2.6 or 2.4)
info_kernel = platform.release() # get the kernel version
info_kernel = '.'.join(info_kernel.split('.',2)[:2])
is there any way of get it in one line only?
Based on your code, that'd
On May 19, 2005, at 23:05, Terry Carroll wrote:
Thanks to you both. I think I may need to step up my development
environment beyond emacs and a command line.
Actually, if you're having problems with debugging your problem,
what you should step up is your approach to debugging/testing.
On May 17, 2005, at 22:00, Smith, Jeff wrote:
Is there a more Pythonic way to get the Perl equivalent of
$#var
other than
len(var) - 1
AFAIK, len(var) - 1 is the only way. Note, however, that the
last element of a list (or of any ordered sequence) can be obtained
with the
On May 16, 2005, at 18:30, Jonas Melian wrote:
To knowing if a directory isn't empty, I use:
dir_example = /usr/foo/
if glob.glob(os.path.join(dir_example, *)):
...
But, as it has to expand all files, i'm supposed that it's a little
slow
to simply knowing if a directory is
On May 15, 2005, at 06:54, Terry Carroll wrote:
if (a == b
a == c
a == d
a == e
a == f
a == g):
do stuff
Well, you can already try this:
if a == b == c == d == e == f == g:
do stuff
-- Max
maxnoel_fr at yahoo dot fr -- ICQ #85274019
Look at you
On May 14, 2005, at 20:09, Aaron Elbaz wrote:
The idea is to print out a multiplication table on the command line
with numbers lining up in the ones column. I want to eventually
emulate programs like top with their spacing. But this code is mostly
for my amusement. How would you make this
On May 13, 2005, at 20:36, [EMAIL PROTECTED] wrote:
Hi,
i am a Biology student taking some early steps with programming. I'm
currently trying to write a Python script to do some simple
processing of a
gene sequence file.
Welcome aboard!
A line in the file looks like:
SCER
On May 13, 2005, at 21:03, Alberto Troiano wrote:
os.system(fec=cam`date +%Y%m%d%H%M%S`.jpg)
0
os.system(echo $fec)
0
os.system(mv hola.txt grabacion/$fec)
0
Then I check for the file and turns out that it moved hola.txt to
grabacion
with the same name
I think that for some
On May 14, 2005, at 01:30, William O'Higgins wrote:
if sys.argv[1]:
do stuff
else:
do different stuff
If I have arguments, the different stuff happens beautifully, thank
you very much. If I don't have arguments I get this:
if sys.argv[1]:
IndexError: list index out of range]
On May 12, 2005, at 02:42, Tony Meyer wrote:
From the email address, chances are that this was a New Zealand
cultural
assumption. Ah, the French, lumping all English speakers under the
American
banner wink.
Touché. :D
-- Max
( What makes it even more unforgivable is that I'm
On May 12, 2005, at 03:00, [EMAIL PROTECTED] wrote:
As was pointed out, I'm not American. I guess the problem stems
from an
American cultural assumption, though, in that Americans (I think)
developed the
ASCII character set without any thought for other languages.
At that time,
On May 13, 2005, at 01:30, Jacob S. wrote:
Okay, I've tried pickling, marshal, marshalling, serialization, and
amazingly pi because I noticed that pickle was under the section 3.14
however, none of this worked, so, I hate to ask again but, could
you go one
step farther?
Thanx,
Jacob
On May 11, 2005, at 07:23, Liam Clarke wrote:
Ack, banner.p eh?
Can anyone explain the significance of the numbers? Are they columns?
Regards,
Liam Clarke
As I said, read about Run-Length Encoding.
-- Max
maxnoel_fr at yahoo dot fr -- ICQ #85274019
Look at you hacker... A pathetic
On May 12, 2005, at 02:22, D. Hartley wrote:
Max - yep, and the hint was BUSY (... BZ...)...
Unfortunately that hint doesnt lead me anywhere (except to bz2, which
involves compression, and didnt seem very likely).
I went through and removed all the \x## 's that represented
On May 9, 2005, at 17:57, Joseph Quigley wrote:
Why do I get the error:
NameError: global name 'main' is not defined
when switching between the two module twice (ie: type: jargon
type:back()
type:jargontype:back() )?
Thanks
JQ
Namespaces. Each module has its own
On May 10, 2005, at 01:18, D. Hartley wrote:
I admitted that my grasp of classes (and constructors) is a bit
fuzzy. I did get this particular class to work, and got the first half
of the problem done. However, now i'm working in another class,
zipinfo. It says:
Instances of the ZipInfo
On May 7, 2005, at 12:28, John Clark wrote:
My question - the creation of the global variable x seems kludged -
when I
first started with this I thought I was going to be coding
something like
sys.stderr.write('\b'+neverEndingStatus()) but that just returns
'\' each
time and I now
On May 7, 2005, at 13:22, John Clark wrote:
(Either that, or I am not following what you mean when you say:
As for how to access it, use a for loop (for i in
neverEndingStatus()). xrange, for example, is a generator function.
Can you please provide an example of how my Test1()
On May 7, 2005, at 13:17, John Carmona wrote:
Hi to everybody reading this thread, can anybody point me to the
URL where I can find these challenges. Many thanks
JC
http://www.pythonchallenge.com/
-- Max
maxnoel_fr at yahoo dot fr -- ICQ #85274019
Look at you hacker... A pathetic
On May 7, 2005, at 15:06, Max Noel wrote:
Try the following code:
for i in neverEndingTest():
print i
Sorry, i meant for in in neverEndingStatus() (not
neverEndingTest()), where neverEndingStatus is the function I gave as
an example in my previous post (not your
On May 7, 2005, at 20:50, D. Hartley wrote:
Ok, I hate to ask another question about this riddle. But I have
looked and looked and looked.
Where can I find more information on 'banner'? Everywhere I look it
starts telling me about banner ads and so on, and that is not what I
want!
On May 8, 2005, at 03:02, Bernard Lebel wrote:
Hello,
I just started using list comprehensions (loving them!)
I know you can add an if statement, but can you put in there an else?
I could not find an example of this.
Apparently, no. I just tried:
b = [i for i in range(10) if (i %
On May 6, 2005, at 21:40, D. Hartley wrote:
I figured out what module you're supposed to use for 5, and the thing
that kills me is it's a module I've actually *used* too! But I don't
know what to . man this is hard to say without using a spoiler. I
dont know what particular thing to
On May 6, 2005, at 21:57, Tim Peters wrote:
What do you have against PIL wink?
Nothing in particular, just no idea how to use it.
simple ways has been part of the fun for me. I don't know how you
solved level 7,
Hint: it's a stupid and inelegant method involving a certain
On May 6, 2005, at 22:20, D. Hartley wrote:
Yes, I realized my original guess was wrong. I think I found the
target file but now none of the module commands I'm used to will do
anything useful on it. I'm just getting file not found errors and
the like. There's something in the big picture
On May 6, 2005, at 22:32, D. Hartley wrote:
Maybe that's my problem. I dont know how to save this particular file
onto my computer first. I can't 'reach' it from the url. It's not
like a picture I can right click on and save image, or something. My
first thought was i needed to use the
On May 5, 2005, at 00:53, [EMAIL PROTECTED] wrote:
As seen on python-announce (via Dr Dobbs):
http://www.pythonchallenge.com/
Good fun!
Very interesting indeed! I'm stuck on number 7, though -- looks
like it requires the use of PIL, which I've never used before.
-- Max
maxnoel_fr
On May 5, 2005, at 19:39, D. Hartley wrote:
Ok, now, I'm sure this sounds like a very dumb question. But I
clicked on riddle 1, and I don't know how this thing works - about
didnt give a lot of extra info. Am I trying to duplicate something on
my screen that looks like the picture on the
On May 6, 2005, at 01:33, D. Hartley wrote:
They do seem to be useful! But with all those special characters, it
certainly doesnt make for an easy read. I think I'm making some
progress - I got it to make me a list of all the
{uppercaseuppercaseuppercaselowercaseuppercaseuppercaseuppercase}
On May 4, 2005, at 16:35, Joseph Quigley wrote:
For those who use Psyco:
Is it any good? I'm searching for instructions on how to use
it, should I
stop?
I hear it's quite good at what it does. Note, however, that it
only works on x86 computers (i.e. IBM PC compatibles).
On May 3, 2005, at 08:57, Danny Yoo wrote:
I believe that cron has a resolution of a minute, so now it doesn't
sound
that cron is so viable. But how about writing a program that just
continues to run as a daemon service in the background? A simple
example is something like:
On May 3, 2005, at 20:52, Danny Yoo wrote:
##
cron(8) examines cron entries once every minute.
The time and date fields are:
field allowed values
- --
minute 0-59
hour
On Apr 30, 2005, at 09:49, Diana Hawksworth wrote:
Hello list!
I have started teaching Python to a group of High School students. I
set them the Guess the Number game as a GUI as an assignment. One of
the students has passed in some script that is foreign to any tutorial
work we have done.
On Apr 30, 2005, at 19:50, Alan Gauld wrote:
If my student has plagiarised - I need to know.
Could you ask him(?) to explain some of the more interesting
features?
Maybe how he came up with the variable names? It is possible that
he/she has come up with it themselves since its not really a great
On Apr 29, 2005, at 04:48, Joseph Quigley wrote:
Hi all,
How could I have the user name his file? I learned that I type
file_name = foo.bar
How could I make it that the use could name it hello.hi?
Thanks,
Joe
Well, all you have to do is have the user input a string, and use this
Begin forwarded message:
From: Joseph Quigley [EMAIL PROTECTED]
Date: April 29, 2005 17:16:22 BST
To: Max Noel [EMAIL PROTECTED]
Subject: Re: [Tutor] cPickle (Joseph Q.)
I tried that and it doesn't work!
I type the name and it just sits there!
Here's the code:
# variables
name = JOTEX
versn
On Apr 28, 2005, at 23:06, Alberto Troiano wrote:
I tried:
import os
os.system(ps --user root)
and I get
0
as a return
How can I get the PID and bind the command above with a variable?? I
mean
varusername=root
os.system(ps --user varusername)
works???
So in essence, what you're trying to do
On Apr 27, 2005, at 22:35, Alberto Troiano wrote:
I'm gonna give you an example:
The program will check for new users and to check record time every 10
seconds. But first the program will have to finish the checking
process that started before so it won't be 10 seconds right?
Unless I have one
On Apr 26, 2005, at 23:57, D. Hartley wrote:
But in any case, font/text will only take strings - i cant pass in a
list, or an index to an item in a list (which is, in this case, a
tuple), and since the items in the list will be changed and updated
obviously i cant just type in the items as strings
On Apr 26, 2005, at 22:01, Alan Gauld wrote:
I had found the first thread you linked. I see what you mean about
the
cure -- my general belief is that *I* am unlikely to have problems
for which meta-classes are really the best solution :-)
Once you get used to them meta-classes are very useful.
On Apr 25, 2005, at 17:03, André Roberge wrote:
I'm writing a program interpreter which has two windows: a program
editing window and a program output window.
The interpreter can either step through the program automatically, at
a slow pace, or step through the program one instruction at a
On Apr 24, 2005, at 18:04, Gavin Bauer wrote:
I've decided it would be cool to make a flashcard program. You would
start by entering all of the cards and their answers, then it would
ask you them in random order, with ones you get right coming up less
often, and ones you consistantly get wrong
On Apr 22, 2005, at 11:41, Chris Smith wrote:
Do you have a suggestion as to what can I give a module so it has
enough information to execute a function that resides in __main__?
Here is a visual of what is going on:
--__main__
def y1():
pass
import foo
foo.run(string_from_main) #what
On Apr 22, 2005, at 21:09, Prasad Kotipalli wrote:
Hello evryone
I am a newbie to python. I have a makefile which i can compile in
UNIX/LINUX, But i
I am planning to write a python script which actually does what my
MAKEFILE does.
Then what you want is SCons (http://www.scons.org/). Haven't
On Apr 20, 2005, at 16:52, Alberto Troiano wrote:
Hey
Didn't work
I try the python2.3 setup.py build
I couldn't print the exact error because it's a lot of pages that says
mostly the same
the final error says
error: mysql ended exit with status 1
I run the other command python2.3 setup.py
On Apr 20, 2005, at 23:57, Alberto Troiano wrote:
Hi
The thing is this
I get an error that says sort() has no arguments
Th error is in the sentence
high_score.sort(reverse=TRUE)
If you put just sort() it will work but the list will show from low to
high and we don't want that 'cause if you make a
On Apr 21, 2005, at 00:19, D. Hartley wrote:
Max -
I thought it might be a version issue as well, thanks. Also, good
luck on your paper! 50 pages, whoo! Haven't done that since grad
school, my condolences man.
~Denise :)
Thanks... I'm almost done now, only a few more pages and all that will
be
On Apr 19, 2005, at 13:49, Alberto Troiano wrote:
Hi
I have another problem. It seems that I manage to solve a problem and
run into another
The problem is that now I can't install MySQLdb (MySQL database module
for Python 2.3.4)
I try to ./configure and it prints a lot of crap and then says
On Apr 19, 2005, at 19:57, Alberto Troiano wrote:
Thanks Danny
I will try to do that and let you know how it went
But one question thou, does it matter the location where I gunzip the
distutil
If so where should I put it???
NOTE: It's just to be sure that I'm understanding
On Apr 19, 2005, at 21:22, Tim Johnson wrote:
Hello Pythonmeisters:
Is it possible to dynamically compose a module name
for import?
Pointers to documentation or other discussions would
be sufficient at this time.
thanks
Ah, metaprogramming. I must admit I can't think of a way. Or rather, I
did
On Apr 18, 2005, at 16:55, Olli Rajala wrote:
Michael,
does it help if you change the second line into:
# -*- coding: iso-8859-15 -*-
?
I *think* that is the correct syntax (at least it works for me).
Thanks, it doesn't give the error message anymore. But non-ascii
letters still don't go well from
On Apr 18, 2005, at 19:59, Smith, Jeff wrote:
Is there a Python equivalent to the Perl
require 5.6.0
Which enforces a minimum interpreter version?
As far as I know, no. But:
import sys
sys.version_info
(2, 3, 0, 'final', 0)
(2, 4, 0) sys.version_info
True
(2, 2, 0) sys.version_info
False
On Apr 18, 2005, at 23:18, D. Hartley wrote:
Another quick question. I tried to send a file to my friend to test
it out, and it gave her the following sound-related error:
Cannot load sound: data\explode2.wav
Traceback (most recent call last):
File D:\Python24\play w paused screen residue.py,
On Apr 17, 2005, at 16:51, Sean Perry wrote:
R. Alan Monroe wrote:
Just curious. Googling for 'python dis module convert another
language ' only got two hits. So maybe no one is trying it? I was
just daydreaming about a native python compiler, and wondered how
feasible it would be.
There is
On Apr 17, 2005, at 17:29, Joseph Quigley wrote:
So what do you use the
def bar(x, y):
return x + y
bar(4, 5)
functions for? (I just need a simple example)
Whenever you have something that you may want to do more than once
and/or in more than one place in your program. Here's a small
On Apr 15, 2005, at 03:32, [EMAIL PROTECTED] wrote:
Interestingly, the key argument is the solution to this problem:
arr = zip(range(10), range(10,0,-1))
arr
[(0, 10), (1, 9), (2, 8), (3, 7), (4, 6), (5, 5), (6, 4), (7, 3), (8,
2), (9, 1)]
arr.sort(key=lambda x: x[1])
arr
[(9, 1), (8, 2), (7, 3),
On Apr 15, 2005, at 21:30, D. Hartley wrote:
Unless you can explain what lambda x:
x[1] does, in preschool-speak ;)
That's an anonymous function, also known as a lambda function. Let's
take an example:
a = range(10)
a
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
map(lambda x: 2*x, a)
[0, 2, 4, 6, 8, 10,
On Apr 14, 2005, at 12:58, Orri Ganel wrote:
a = Node(1)
b = Node(a)
12932600 12932600
1
id(b)
12960632
Any ideas on why this happens, or suggestions as to how to implement
the behavior I'm looking for (in which b and a would refer to the same
object, have the same id, etc.), would be greatly
On Apr 14, 2005, at 14:14, Ben Markwell wrote:
Could somebody explain to me why the code I used to complete this
exercise doesn't work.
And how do you send an integer to len?
Well, I think you've successfully completed that exercise. len()
doesn't work on integers because integers don't have a
On Apr 14, 2005, at 21:06, [EMAIL PROTECTED] wrote:
I've seen a couple of nice tutorials on recursion, and a lot of awful
ones. The latter always trot out the fibonacci and factorial examples
for some reason. And that's about it! The good ones showed me how to
trace through recursive calls and
On Apr 15, 2005, at 01:33, D. Hartley wrote:
This is what I have so far:
high_scorelist = [(1000,Denise), (945,Denise), (883,Denise),
(823,Grant), (779,Aaron), (702,Pete),
(555,Tom), (443,Tom), (442,Robin), (404,Pete)]
userscore = (441,Joe)
def
On Apr 12, 2005, at 23:22, Danny Yoo wrote:
There was an interesting article by Phillip Eby about what conventions
work and don't work when one makes a jump from Java to Python:
http://dirtsimple.org/2004/12/python-is-not-java.html
A very interesting read. Thanks for the link, Danny!
--
On Apr 9, 2005, at 10:36, Danny Yoo wrote:
-- Forwarded message --
Date: Fri, 8 Apr 2005 22:03:58 EDT
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: newb problem running the translator
I will try to make this quick. I am a newb to python, and
programming at
that, but
On Apr 9, 2005, at 21:50, Kent Johnson wrote:
I think you have to return a value when len(t) = 1. You don't return
anything which means you return None which can't be added to a list.
Kent
Yup. Here's a quicksort I did, adapting an example from the Wikipedia
article on Haskell:
def
On Apr 4, 2005, at 16:04, Vines, John (Civ, ARL/CISD) wrote:
Hello. I have a question regarding strings. How do I format a string
to be a specific length?
For example I need 'string1' to be 72 characters long.
Thanks for your time,
John
You can use the string methods ljust, rjust and zfill:
On Apr 2, 2005, at 12:12, Liam Clarke wrote:
Hi,
Out of curiosity, is it possible to create a dictionary like this -
foo = {'a':1, 'b':2, 'c':foo['a']}
I know that as above doesn't work, but was just wondering if it's
possible, and if it's a
Bad Thing?
Regards,
Liam Clarke
It doesn't work because
On Apr 1, 2005, at 09:59, Alan Gauld wrote:
Since the data are obviously related (since you need to keep them
linked),
I'd be inclined to merge the lists into a list of tuples
merged = [(a,b,c,d) for a in l1 for b in l2 for c in l3 for d in l4]
Then you can sort 'merged' and it should just
On Mar 25, 2005, at 15:50, jrlen balane wrote:
how many is the maximum member can a list have???
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
As far as I know, there is no limit hard-coded in the language. So I
On Mar 24, 2005, at 18:07, Ismael Garrido wrote:
Hello.
I have a program that saves/loads to/from XML. I have a main class
Building, and a subclass House(Building). When I save the code I
instruct each object to save itself to XML (using ElementTree), so
House adds itself to the XML tree.
My
On Mar 23, 2005, at 21:55, Bill Mill wrote:
In line 3 of the Conv function, you write str=The name is + str .
However, str has yet to be defined, from what I can tell. Thus, Python
should throw a NameError. Unforutnately, you haven't included the
exception that Python gives you with this email, so
On Mar 18, 2005, at 02:15, Kent Johnson wrote:
Max Noel wrote:
#!/usr/bin/env python
import math
import timeit
def primeConcise(limit):
return [2] + [x for x in xrange(3, limit, 2) if not [y for y in
[2] + range(3,x,2) if x%y==0]]
def primeConciseOptimized(limit):
return [2] + [x for x
On Mar 17, 2005, at 22:28, Gregor Lingl wrote:
Hi!
Who knows a more concise or equally concise but more efficient
expression, which returns the same result as
[x for x in range(2,100) if not [y for y in range(2,x) if x%y==0]]
Gregor
P.S.: ... or a more beautiful one ;-)
Hmm... I don't have
On Mar 17, 2005, at 23:54, Danny Yoo wrote:
Hi Gregor,
Here is one that's traduced... er... adapted from material from the
classic textbook Structure and Interpretation of Computer Programs:
SNIP
Ooh, nifty.
Okay, I decided to learn how to use the timeit module, so I used it to
compare my
Forwarding to the list -- please use Reply to All.
Begin forwarded message:
From: jrlen balane [EMAIL PROTECTED]
Date: March 16, 2005 04:13:40 GMT
To: Max Noel [EMAIL PROTECTED]
Subject: Re: [Tutor] creating a tab delimited filename
Reply-To: jrlen balane [EMAIL PROTECTED]
why is this not working
On Mar 15, 2005, at 16:44, Ron Nixon wrote:
Kent:
The code is below. Here's the error message.
Traceback (most recent call last):
File C:/Python24/reformat.py, line 5, in
-toplevel-
name = x.group(1)
AttributeError: 'list' object has no attribute 'group'
re.findall returns a list object (as
On Mar 15, 2005, at 17:41, Ron Nixon wrote:
Max:
Thanks that seem to do the trick. One question though,
how do you write a tuple out as a list to a new file
like the example I have in my code
Ron
You mean, all the members of the list, separated by commas, with a new
line at the end? Well, this
On Mar 15, 2005, at 21:59, Liam Clarke wrote:
On Tue, 15 Mar 2005 17:09:50 +, Max Noel [EMAIL PROTECTED]
wrote:
re.findall returns a list object (as the error message says).
Use name
= x[1] instead. (and be careful, numbering starts from 0, so this code
may contain a Kenobi error
On Mar 16, 2005, at 02:02, Ian Martin wrote:
Hey I am new at python and i am trying to learn about
it. I was wondering if you could tell me how to write
a range to 100. such as 1+2+3+4+5 ect. without
writing it out.
Well, I'm not going to give you the full solution (that'd spoil the
fun),
On Mar 16, 2005, at 03:54, jrlen balane wrote:
how would i make this the correct path:
filename = %s%s.txt %('C:\Documents and Settings\nyer\My
Documents\Info',time.strftime(%Y%m%d%H%M))
table_file = open(os.path.normpath(filename),a)
running on IDLE, i get the following error:
Traceback (most
On Mar 15, 2005, at 00:28, [EMAIL PROTECTED] wrote:
I have read but don't under stand how to use pydoc. here what i
read can't figer out how to use it.
pydoc is more or less a help browser. Think of it as man for Python.
If you need documentation on a module, just type pydoc [module
On Mar 13, 2005, at 18:38, Brian van den Broek wrote:
Thanks for the explanation, Sean.
The reference to grammatical theory here does seem to make sense. But,
relying on correspondence between the technical terms in
programming/comp. sci. and other fields with similar terminology can
get in the
On Mar 9, 2005, at 01:13, Shitiz Bansal wrote:
Whats worse, I had found that the rule is different
for different versions of windows.Just proves what we
all know...Windows Suxx.
The Windows OS sucks!
And blows!
At the same time!
(name the reference, get a cookie ;) )
-- Max
maxnoel_fr at yahoo dot
On Mar 7, 2005, at 16:46, Kent Johnson wrote:
Gregory Sexton wrote:
Thanks for the help! Sorry for the trivial questions, but I guess we
all have to start somewhere. Beginning python student, OS Windows
XP,using Python 2.4. Also novice to programming. I cant get the
/a command to work.
I
Some day I'm actually going to learn how to hit the Reply All button.
I swear.
Begin forwarded message:
From: Max Noel [EMAIL PROTECTED]
Date: February 23, 2005 18:42:37 GMT
To: Shitiz Bansal [EMAIL PROTECTED]
Subject: Re: [Tutor] threads
On Feb 23, 2005, at 17:50, Shitiz Bansal wrote:
Hi,
I am
1 - 100 of 154 matches
Mail list logo