On 7 September 2014 21:01, Danny Yoo d...@hashcollision.org wrote:
snip
Let's use a concrete example: say that we'd like to make sure a
Person's name is always capitalized. We might try to enforce this
capitalization property in the constructor.
Hi all,
rant on
I've just again
On May 7, 2014 7:30 PM, C Smith illusiontechniq...@gmail.com wrote:
snip
Someone suggested projecteuler.net and I started blazing through
things I had done before, when I realized this would be a good time to
start more efficient practices instead of code that just happens to
work and may be
On May 7, 2014 8:42 PM, C Smith illusiontechniq...@gmail.com wrote:
I guess intuiting efficiency doesn't work in Python because it is such
high-level? Or is there much more going on there?
Hi,
The level is a good part, yes. If, like me, you don't know what C
constructs are under python
On 5 May 2014 13:53, Steven D'Aprano st...@pearwood.info wrote:
On Sun, May 04, 2014 at 07:00:24PM -0400, Brian van den Broek wrote:
Hi all,
I am playing with the smtp and email modules from the standard library
of Python 2.7.3 (I also want it to run on 2.6.6). I've not found the
going easy
Hi all,
I am playing with the smtp and email modules from the standard library
of Python 2.7.3 (I also want it to run on 2.6.6). I've not found the
going easy; the SMTP and RFC 2822 standards are not ones I have worked
with before. I have something that works, but I am not confident I am
doing
On May 4, 2014 8:31 PM, Jake Blank jakenbl...@gmail.com wrote:
Hi,
So I'm doing a problem on the Alice_in_wonderland.txt where I have to write a
program that reads a piece of text from a file specified by the user, counts
the number of occurrences of each word, and writes a sorted list of
statement? I understand how i have to
sort the words by their associated values i'm confused where in my code i
would do that.
Thanks, Jake
On Sun, May 4, 2014 at 9:16 PM, Brian van den Broek
brian.van.den.br...@gmail.com wrote:
On May 4, 2014 8:31 PM, Jake Blank jakenbl...@gmail.com wrote
On May 4, 2014 11:13 PM, Jake Blank jakenbl...@gmail.com wrote:
To figure that last part out I just did a simple if statement.
for k in sorted(word_count, key=lambda x:word_count[x], reverse=True):
if word_count[k] =300:
print (k, word_count[k])
And the output was
On 24 December 2013 16:21, Brian van den Broek
brian.van.den.br...@gmail.com wrote:
On 23 December 2013 13:32, Danny Yoo d...@hashcollision.org wrote:
I've got a puzzle: so there's a well-known function that maps the
naturals N to N^2: it's called Cantor pairing:
http://en.wikipedia.org
On 23 December 2013 13:32, Danny Yoo d...@hashcollision.org wrote:
I've got a puzzle: so there's a well-known function that maps the
naturals N to N^2: it's called Cantor pairing:
http://en.wikipedia.org/wiki/Pairing_function
It's one of those mind-blowing things that I love. I ran
On Aug 20, 2013 3:04 PM, Andy McKenzie amckenz...@gmail.com wrote:
On Tue, Aug 20, 2013 at 2:53 PM, Alan Gauld alan.ga...@btinternet.com
wrote:
On 20/08/13 13:15, Andy McKenzie wrote:
Yep. Someone decided it didn't make sense for reply to go to the list
that sent the message
Lists never
On 5 May 2013 22:10, boB Stepp robertvst...@gmail.com wrote:
On Sun, May 5, 2013 at 7:54 PM, Steven D'Aprano st...@pearwood.info
wrote:
snip
So my main question is there a truly clean, cross-platform solution to
the clear screen dilemma? If my online searching is accurate, then the
On 5 May 2013 23:12, Steven D'Aprano st...@pearwood.info wrote:
On 06/05/13 12:37, Brian van den Broek wrote:
snip
Try:
def pragmatic_as_if_clear():
print '\n' * 100
which isn't too far off of what clear does in bash.
Not in the version of bash I am using in an xterm window
On 12 Apr 2013 21:25, Steven Dapos;Aprano st...@pearwood.info wrote:
Also, you might find it easier to process the list if you strip out empty
items. There are two simple ways to do it:
lst = [x for x in list if x != '']
# or
lst = filter(None, lst)
Hi all,
For the first, I would use
lst
On 10 February 2013 15:29, Ghadir Ghasemi ghasemm...@leedslearning.net wrote:
Hi guys, I wondered if you knew what I could add to this code so that when
the user enters 1 from the menu and then doesn't enter a valid binary number
the program should ask them over and over again until valid
On 9 January 2013 01:56, ken brockman krush1...@yahoo.com wrote:
I was looking through some lab material from a computer course offered at UC
Berkeley and came across some examples in the form of questions on a test
about python.
1 and 2 and 3
answer 3
I've goggled it till i was red in the
On 4 January 2013 03:34, Alan Gauld alan.ga...@btinternet.com wrote:
On 04/01/13 07:10, Brian van den Broek wrote:
...
confirm that the code works as intended when written, but that it
continues to work several moths later
moths? They'll be the bugs I guess?
Sorry I couldn't resist
On 3 January 2013 14:46, Luke Thomas Mergner lmerg...@gmail.com wrote:
* Albert-Jan Roskam fo...@yahoo.com wrote:
Hi,
I am trying to learn a bit of test-driven programming using unittests and
nosetests. I am having trouble finding resources that explain how to write
effective tests.
On 19 December 2012 01:19, Brandon Merritt merrit...@gmail.com wrote:
Sorry, I am just so confused and aggravated as to why this won't work - why
doesn't it print out the whole list? :
number = raw_input('Enter a 7-unit number: ')
for i in number:
count = []
count.append(i)
print
Forwarding to the list what I sent privately. Stupid android UI.
-- Forwarded message --
From: Brian van den Broek brian.van.den.br...@gmail.com
Date: 14 Dec 2012 10:01
Subject: Re: [Tutor] Tutor Digest, Vol 106, Issue 31
To: Waters, Mike [ITSCA Non-JJ] mwat...@its.jnj.com
On 14
On 1 December 2012 10:40, richard kappler richkapp...@gmail.com wrote:
I'm working through Mark Lutz's Python, reviewing the section on lists. I
understand the list comprehension so far, but ran into a snag with the
matrix. I've created the matrix M as follows:
M = [[1, 2, 3[, [4, 5, 6], [7,
On 1 December 2012 20:12, Dave Angel d...@davea.name wrote:
On 12/01/2012 11:28 AM, Brian van den Broek wrote:
On 1 December 2012 10:40, richard kappler richkapp...@gmail.com wrote:
I'm working through Mark Lutz's Python, reviewing the section on lists. I
understand the list comprehension so
On 29 Oct 2012 02:30, Saad Javed sbja...@gmail.com wrote:
I've come up with this:
try:
sys.argv[1]
x = sys.argv[1]
main(x)
except IndexError:
main(x)
It works but seems hackish.
Saad
Saad,
The first sys.argv is not needed.
Notice how i have replied below the text i am quoting? That
On 14 October 2012 02:15, Ray Jones crawlz...@gmail.com wrote:
On 10/13/2012 07:50 PM, Steven D'Aprano wrote:
snip
If you can do `print e.info()`, then you can also do `info = e.info()`
and inspect the info programmatically.
One would expect that to be true. But when I do info = e.info(),
On 13 October 2012 19:44, Ray Jones crawlz...@gmail.com wrote:
I am attempting to capture url headers and have my script make decisions
based on the content of those headers.
Here is what I am using in the relative portion of my script:
try:
urllib2.urlopen('http://myurl.org')
except
On 6 Oct 2012 22:40, Richard D. Moores rdmoo...@gmail.com wrote:
snip
I remain bewildered. Where did these strangely named things come from,
strftime and strptime? I see that
Hi Dick,
These names carry over from well entrentched names from C. My guess is
format time and print time are what
On 4 Oct 2012 13:22, medusa magicwizards...@gmail.com wrote:
Hello
i got stuck with the last bit of my programming practice.
snip
Instead of printing off a number beside the email, i got another email
and i
dont know how to fix it.
http://python.6.n6.nabble.com/file/n4990842/9.4_stuck.png
On 2 Oct 2012 23:17, boB Stepp robertvst...@gmail.com wrote:
snip
I am puzzled by the results of the following:
x = Test
x
'Test'
print(x)
Test
I understand that 'Test' is the stored value in memory where the
single quotes designate the value as being a string data type. So it
On 1 Oct 2012 15:28, Matthew Dalrymple computer_dud...@hotmail.com
wrote:
I don't need to hear how bad my programs are...either you are gonna help
or your not...if
Matthew,
Bob didn't cuddle you and he may have been a bit more brusque than you'd
have liked. However, his response to you was
On 30 September 2012 04:37, Alan Gauld alan.ga...@btinternet.com wrote:
off topic rant
One of the things that makes math hard for people to grasp is its insistence
on abstracting functions/values to single letter names etc. (especially when
those names are in a foreign language/symbology,
On 1 October 2012 19:30, Alan Gauld alan.ga...@btinternet.com wrote:
translation for them, not just complain of their 'ignorance'. But that's now
taking things way, way off topic!! :-)
I think you meant ``way^2 off topic'' ;-)
Brian vdB
___
Tutor
On 1 Oct 2012 19:58, Mark Rourke mark.rour...@gmail.com wrote:
hello, I am a college student in my first year of computer programming, I was
wondering if you could look at my code to see whats wrong with it.
# Mark Rourke
# Sept 29, 2012
# Write a program to calculate the sales tax at the
On 28 Aug 2012 18:33, Benjamin Fishbein bfishbei...@gmail.com wrote:
Hello,
I wrote a program that I want to have running 24/7. But the problem is
that I also want to write and run other programs. I'm using Idle and it
won't let me run more than one script at a time. Do you know if there's a
On 17 Jul 2012 12:39, Mark Lawrence breamore...@yahoo.co.uk wrote:
On 17/07/2012 16:28, Paul McNally wrote:
snip enough context to perhaps have lost attributions
I was able to get it working like this...
password = foobar
attempt = 0
while (password != unicorn) and (attempt = 3):
On 10 Jul 2012 11:31, Chris Hare ch...@labr.net wrote:
This piece of code works:
Big-Mac:Classes chare$ more tmp.py
import re
snip
return not bool(search(string))
snip
However, when I use the EXACT same code in the context of the larger
code, I get the error
return not
On 27 May 2012 20:52, Dave Angel d...@davea.name wrote:
On 05/27/2012 01:03 PM, Kimberly McManus wrote:
help
Sure. Head for the nearest exit, stopping before each door to make sure
it's not hot before opening it.
Hi Kimberly,
While I share Dave's sadness at the general decline of
On 23 May 2012 05:17, boB Stepp robertvst...@gmail.com wrote:
but I will not be able to provide much (any?) help in the immediate
future.
(If emacs seems like you will stick to it, do have a look at orgmode.)
Brian, does org-mode amount to a personal information manager? What
are the
On 22 May 2012 06:58, boB Stepp robertvst...@gmail.com wrote:
Many thanks for all of the helpful input to my original questions. The
deciding factors came down to the fact that GNU Emacs, vintage year
2001, is available on the Sun Blade at work, I already own the book
Learning GNU Emacs and
On 21 May 2012 03:39, Steven Dapos;Aprano st...@pearwood.info wrote:
boB Stepp wrote:
snip
now on learning an IDE if it will save me time overall. IF it would be
beneficial now to learn an IDE, then it begs the question
No it doesn't. It RAISES the question -- begging the question means
On 21 May 2012 01:19, boB Stepp robertvst...@gmail.com wrote:
On Sun, May 20, 2012 at 4:44 PM, Brian van den Broek
brian.van.den.br...@gmail.com wrote:
snip
With you polyglot agenda, I would say you would be much better off to
learn
a powerful multipurpose editor well than to try to find
On 20 May 2012 23:04, boB Stepp robertvst...@gmail.com wrote:
snip
Goals: Learn Python. While learning Python, learn all of the good
C.Sc. stuff that I should have learned the first go-around, Learn Java
and C/C++. Reevaluate.
snip
Finally to the question: With the stated goals above,
On 17 May 2012 16:31, Surya K sur...@live.com wrote:
Hi,
I want to write a python code which read blog's RSS/ Atom feeds and gives
us the all post's content of blog...
I am currently trying to use FeedParser (Universal Feed Parser). I am
able to get all post's titles and URL's but not a
On 8 May 2012 23:23, Jacob Bender benderjaco...@gmail.com wrote:
Dear Tutors,
My original email was this:
Dear tutors,
I'm trying to create a neural network program. Each neuron is in a
dictionary and each of its connections and their strengths are in a nested
dictionary. So {0:{1:4,
On 6 April 2012 15:54, John Fabiani jo...@jfcomputer.com wrote:
Hi,
I want to create a class that inherits two other classes.
class NewClass( A,B)
But both A and B contain a method with the same name (onKeyDown).
If my NewClass does not contain something to override the methods which one
On 6 Apr 2012 02:43, Greg Christian glchrist...@comcast.net wrote:
I am just wondering if anyone can explain how the return statement in
this function is working (the code is from activestate.com)? Where does x
come from – it is not initialized anywhere else and then just appears in
the return
On 19 Mar 2012 11:42, Yan, Xianming xianming@intercallapac.com
wrote:
I'm following http://docs.python.org/tutorial/interpreter.html to type in
the first script into python.
According to the link, I typed below:
the_world_is_flat = 1
if the_world_is_flat:
... print Be careful not
On 15 Mar 2012 04:14, bob gailer bgai...@gmail.com wrote:
On 3/14/2012 12:12 PM, Tamar Osher wrote:
I can run a python program in Notepad++, but what happens is that the
black box flashes and disappears immediately, so that I never see the
results.
How can I style it so that the results of
On 14 Mar 2012 02:56, Tamar Osher emeraldoff...@hotmail.com wrote:
Hello. Is there someone who can tutor me about how to run Python files
on my windows7 computer? I have IDLE (the white box, the Python shell). I
have the command prompt (the black box). And I also have Notepad++ on my
On 22 February 2012 12:57, David Craig dcdavem...@gmail.com wrote:
Hi,
I have a function that calculates the distance between two points on a
sphere. It works but I cant get it to return a float for use in another
script. Anyone know how I do that??
snip code
cos =
On 12 Feb 2012 15:28, William Stewart williamjstew...@rogers.com wrote:
I am trying to get 2 string variables and 2 integer variables to be able
to be multiplied
can anyone tell me what I did wrong
str1 = raw_input(Type in a String: )
str2 = raw_input(Type in a String: )
int1 =
On 12 Feb 2012 05:23, Tonu Mikk tm...@umn.edu wrote:
I am learning Python using the Learn Python the Hard Way book by Zed
Shaw. I reached exercise 42 where we learn about Python classes. The
exercise shows a game with one class that includes all the definitions for
playing the game. For extra
van den Broek brian.van.den.br...@gmail.com
wrote:
From: Brian van den Broek brian.van.den.br...@gmail.com
Subject: Re: [Tutor] string integers?
To: William Stewart williamjstew...@rogers.com
Cc: tutor@python.org
Date: Sunday, February 12, 2012, 8:53 AM
On 12 Feb 2012 15:28, William
On 13 February 2012 01:34, William Stewart williamjstew...@rogers.com wrote:
this is the code I have
str1 = raw_input(Type in a String: )
str2 = raw_input(Type in a String: )
int1 = raw_input(Type in a integer variable: )
int2 = raw_input(Type in a integer variable: )
print str1 + str2 +
On 12 Feb 2012 00:29, amt 0101...@gmail.com wrote:
Hello! I'm currently stuck at the Extra Credit 3 from LPTHW.
Link to the actual exercise:
http://learnpythonthehardway.org/book/ex19.html
The exercise:
Write at least one more function of your own design, and run it 10
different ways.
On 9 Feb 2012 13:34, David Craig dcdavem...@gmail.com wrote:
Hi,
I'm trying to write a function that will either take arguments when the
function is called, such as myFunc(x,y,z) or if the user does not enter any
arguments, myFunc() the raw_input function will ask for them. But I dont
know how
Alan Gauld said unto the world at 14/01/09 07:34 PM:
Brian van den Broek van...@gmail.com wrote
icon for Idle launching as expected. When run from IDLE, `print
sys.executable' yields `C:\\Python26\\pythonw.exe'.
He reports that C:\Python26 contains both python.exe and pythonw.exe.
I've had
Brian van den Broek said unto the world at 15/01/09 11:27 AM:
Alan Gauld said unto the world at 14/01/09 07:34 PM:
Brian van den Broek van...@gmail.com wrote
snip my account of Windows using friend unable to invoke python at
DOS prompt and replies including Alan's suggestion to get a text
Kent Johnson said unto the world at 15/01/09 12:33 PM:
On Thu, Jan 15, 2009 at 11:48 AM, Brian van den Broek
br...@cc.umanitoba.ca wrote:
The (recognized by me as) relevant bits of output are:
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\texlive\2008\bin\win32;C
Hi all,
I'm trying, via email, to help a friend set up python on his Windows
XP computer. I've been strictly linux for some time now, and don't
have a Windows machine on which to investigate. We've hit a problem,
and I'd appreciate a push.
He's got python 2.6.1 installed as evidenced by the
Hi all,
I'm trying, via email, to help a friend set up python on his Windows
XP computer. I've been strictly linux for some time now, and don't
have a Windows machine on which to investigate. We've hit a problem,
and I'd appreciate a push.
He's got python 2.6.1 installed as evidenced by the
Sara Johnson said unto the world upon 07/08/2007 01:34 AM:
Sorry, this is probably too general a question, but I can't find
any specific information on it. What exactly is a key error and
how do I clear it?
I entered something like this:
abcd=h[key]['ABCD']
and when I run it I'm
Terry said unto the world upon 06/28/2007 02:55 PM:
I am going to need to be handling money calculations and was wondering
about the float problem
in my calculations.
Should I simply run the results of all calculations through something
like this:
from __future__ import division
...
Hi all,
I want to have a script launch an editor open to a particular file and
wait until that editor has closed before continuing. The aim is to
allow the user to make edits to the file, have to script know that the
edits are completed, and then make use of the newly saved file contents.
Matt Smith said unto the world upon 06/03/2007 04:12 PM:
Hi,
I've got my program working correctly (or so it seems) with my original
data file (r-pentomino.txt - attached) but when I run it with a larger
(30*30) file (big-r-pentomino - also attached) in an attempt to make it
work with out
[EMAIL PROTECTED] said unto the world upon 06/01/2007 10:46 AM:
I think I may have sent an incomplete version of this question a moment ago
(sorry). Here is the complete question:
I'm designing something along the lines of a flash card program. It's mostly
just an exercise in learning
Adam Urbas said unto the world upon 05/30/2007 11:01 AM:
I can't exactly show you the error message anymore, because the program is
now screwed up in so many ways that I can't even get it to do the things it
used to.
It says things like ERROR: Inconsistent indentation detected!
1) Your
adam urbas said unto the world upon 05/29/2007 12:39 PM:
The scary part is, I think I understand this. I copied your last
example and put it in IDLE and it doesn't like you code. Never
mind. I figured it out. So that is so it will notify you if your
choice is invalid. Nice lil tidbit of
to reply to the list and the original sender
rather than just the sender.
Best,
Brian vdB
Original Message
Subject: Re: [Tutor] trouble with if
Date: Tue, 29 May 2007 23:07:57 -0500
From: Adam Urbas [EMAIL PROTECTED]
To: Brian van den Broek [EMAIL PROTECTED]
References: [EMAIL
adam urbas said unto the world upon 05/27/2007 01:49 PM:
Thank you for the help Brian. I would like to ask you about these
things. Which one of the examples you gave would be most fool
proof.
snip of all previous exchanges which are too badly formatted to be
readable
Hi Adam and all,
adam urbas said unto the world upon 05/28/2007 12:24 AM:
Thanks for the clarification, but I'm still a tad confused. I'm
not sure when to indent. I understand that it has to be done.
That link was really confusing. Very newb non-friendly. Arrg...
That site is doom. So confusing. I need
adam urbas said unto the world upon 05/23/2007 11:57 AM:
Hi all,
I've been working with this new program that I wrote. I started out
with it on a Ti-83, which is much easier to program than python. Now
I'm trying to transfer the program to python but its proving to be quite
adam urbas said unto the world upon 05/23/2007 01:04 PM:
Sorry, I don't think Hotmail has turn off HTML. If it does I
havn't been able to find it. I think you're going to have to
explain your little bit of text stuff down there at the bottom. I
have no idea what most of that means. All my
Jessica Brink said unto the world upon 05/22/2007 09:08 AM:
How would I round to the nearest cent when doing calculations with dollar
amounts?
-Jess
Hi Jess,
The decimal module was introduced in large part to facilitate
financial calculations. Have a look at
Dick Moores said unto the world upon 02/21/2007 08:08 PM:
At 05:17 PM 2/21/2007, Terry Carroll wrote:
snip
I like the approach of mapping hex or octal digits posted by Alan and Bob,
but, not thinking of that, this would be my straightforward approach:
def computeBin(n):
converts
Alan Gauld said unto the world upon 11/04/2006 06:47 PM:
[EMAIL PROTECTED]:~/test$ ls -la shebangtest.py
-rwxr-xr-- 1 brian brian 68 2006-11-04 02:29 shebangtest.py
so the file is called shebangtest.py...
[EMAIL PROTECTED]:~/test$ shebangtest
bash: shebangtest: command not found
but
Hi all,
I'm still getting comfortable with Linux and this might be an OS
rather than a python problem.
I am trying to make a script directly executable. I've reviewed the
2nd ed of the Nutshell, and I cannot work out what I'm doing wrong.
I'm running ubunutu 6.10 (edgy eft). Here's a copy past
Asrarahmed Kadri said unto the world upon 19/10/06 12:55 PM:
My algorithm is like this:
first count the number of lines in the file by using a loop.
Use a second loop and when teh counter reaches the num_of_lines values:
take
the line.
Is there any other way to do it??
On 10/19/06,
Dick Moores said unto the world upon 03/10/06 01:41 PM:
At 10:01 AM 10/3/2006, Mike Hansen wrote:
snip Dick asking about the point of projects in Wing IDE and Mike
replying
I've been doing some web programming, so my projects consist of
cheetah template files, CSS, config files, a handful of
linda.s said unto the world upon 17/09/06 02:03 PM:
snip
I checked sys.path and environemntal variables:
since the desktop directory is not listed in either of them,
why there is no error report when I import a module which is in the
desktop into test.py which is under a different folder?
Kent Johnson said unto the world upon 16/09/06 07:49 PM:
Brian van den Broek wrote:
Kent Johnson said unto the world upon 16/09/06 04:35 PM:
Brian van den Broek wrote:
You say you are new to Python. Well, it might not now be obvious why
dictionaries are especially useful
Morten Juhl Johansen said unto the world upon 16/09/06 08:29 AM:
# Newbie warning
I am making a timeline program. It is fairly simple.
I base it on appending lists to a list.
Ex.
[[year1, headline1, event text1], [year2, headline2, event text2]]
This seemed like a brilliant idea when I did
Kent Johnson said unto the world upon 16/09/06 04:35 PM:
Brian van den Broek wrote:
Morten Juhl Johansen said unto the world upon 16/09/06 08:29 AM:
# Newbie warning
I am making a timeline program. It is fairly simple.
I base it on appending lists to a list.
Ex.
[[year1, headline1, event
user name, except when
it doesn't ;-)
Brian van den Broek
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Danny Yoo said unto the world upon 17/08/06 12:16 PM:
Suggest an alternative way of transmitting code.
Hi Kermit,
snip
Just as a side note: you may want to investigate a good email client such
as Thunderbird if you have spare time.
http://www.mozilla.com/thunderbird/
Much of
Nagendra Singh said unto the world upon 17/08/06 12:14 PM:
Hi All,
I have very little programming experience, I have decided to learn
Python..there are tons of material and refernces on the web-pages, can
you guys please suggest what is the best way to start or which ONE
book which I should
Kermit Rose said unto the world upon 17/08/06 02:38 PM:
Now if I can only get Thunderbird to quit treating the up and down arrow
as a page up or page down,
whenever it's at the top line or bottom line of what it thinks is a page.
Hi Kermit,
I'm glad you've given Thunderbird a try and that
Alan Gauld said unto the world upon 08/08/06 12:59 PM:
I've been on the internet for over 20 years now and every mail
tool/newreader I've ever used has (at least) two reply options:
...
I don't understand why this seems to come as a surprise?
What am I missing?
Alan, I think you are judging
Alan Gauld said unto the world upon 07/08/06 04:43 PM:
this list is setup to send to the poster by default. I made the
mistake of doing such a thing earlier myself.
I know this is a huge item of contention, but do people favor having
the default be to send replies to the list?
OK, I've got
Danny Yoo said unto the world upon 31/03/06 08:27 PM:
Then, the output is like so:
atoms = [a,b,c]
tvas = tva_dict_maker(atoms)
display_tvas(tvas)
a:Trueb:True c:True
a:Trueb:True c:False
a:Trueb:False c:True
a:Trueb:False c:False
a:False b:True
Orri Ganel said unto the world upon 01/04/06 03:04 PM:
Brian van den Broek wrote:
snip
Then, the output is like so:
atoms = [a,b,c]
tvas = tva_dict_maker(atoms)
display_tvas(tvas)
a:Trueb:Truec:True
a:Trueb:Truec:False
a:Trueb:Falsec:True
a:True
Kaushal Shriyan said unto the world upon 06/04/06 08:06 AM:
Hi
I am referring to http://www.ibiblio.org/obp/thinkCSpy/chap04.htm
about Logical operators
I didnot understood
x = 5
x and 1
1
y = 0
y and 1
0
How 5 and 1 means 1 and 0 and 1 means 0
Thanks
Regards
Danny Yoo said unto the world upon 06/04/06 04:38 PM:
snip
Yes, I agree that the readability of the code is primary. Understandng
the recursive approach depends on the reader's comfort with recursive
functions, and the non-recursive code depends on the reader's comfort with
arithmetic
Michael Broe said unto the world upon 17/02/06 03:57 PM:
snip
Second question. Do I really have to write the sort_print() function
like this:
def sort_print(L):
L.sort()
print L
i.e. first perform the operation in-place, then pass the variable? Is
this the
Thanks to all for the replies. Indeed, it must have been the DOS vs.
Unix line terminators as several people suggested.
A couple of comments in-line below.
Roel Schroeven said unto the world upon 16/02/06 11:14 AM:
On 16/02/06, *Brian van den Broek* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED
Hi all,
I've switched to Linux fairly recently and am still at the fumbling
about stage :-) I'm having a devil of a time with the shebang line
and running a py file from a command line.
I wrote the following little test script with IDLE 1.1.2 under Python
2.4.2 on Ubuntu 5.10:
code
[EMAIL PROTECTED] said unto the world upon 16/02/06 08:22 AM:
bash: ./testerlybar.py: /usr/bin/python^M: bad interpreter: No such
file or directory [EMAIL PROTECTED]:/media/windata$
Note the ^M the additional fileformat character inserted. That is
causing the problem.
Instead of copying
catherine curley said unto the world upon 16/01/06 08:26 AM:
Hi
Has anyone got an easy way of printing the Python documentation in PDF
format. Its all in HTML and is time consuming to print.
Catherine
pdf format is available here: http://docs.python.org/download.html.
Best,
Brian vdB
bob said unto the world upon 11/01/06 10:47 PM:
At 08:31 PM 1/11/2006, Steve Haley wrote:
Hello everyone,
I need to do something very simple but I'm having trouble finding
the way to do it - at least easily. I have created a tuple and now
need to find the position of individual members of
Liam Clarke said unto the world upon 12/01/06 12:32 AM:
Hi all,
Let's say I have a script called bob.py in a directory called
c:\pythonstuff, which is in my PATH env_var, and python is also in my
PATH, and from a completely different directory I call python bob.py
is there a right way to
Logesh Pillay said unto the world upon 10/01/06 11:28 PM:
Hello list
I want to declare a list of a specific size as global to some nested
function like so
Hi Logesh,
what problem are you trying to solve by doing this? Knowing that will
help generate more useful answers, I suspect.
1 - 100 of 258 matches
Mail list logo