On 06/11/2007, Michael H. Goldwasser <[EMAIL PROTECTED]> wrote:
>We are pleased to announce the release of a new Python book.
[...yadayada...]
I thought this list was supposed to be clean from commercial advertisements.
--
- Rikard.
___
Tutor ma
On 04/10/2007, Fangwen Lu <[EMAIL PROTECTED]> wrote:
> What's the problem?
We have no idea. Perhaps you could give us some info of what errors
the Python-process returns. Things will be easier to help out that
way.
--
- Rikard - http://bos.hack.org/cv/
_
On 04/10/2007, Kamal <[EMAIL PROTECTED]> wrote:
> Basically, I want to call functionOne() every x minutes, and wondering
> whats the best way to do it.
If you need to run the functions concurrently, use threads. Else you
can setup a simple signal-handler for SIGALRM and set the time
accordingly:
On 26/09/2007, Eric Brunson <[EMAIL PROTECTED]> wrote:
> You can't use append() on a tuple, because a tuple is, by design, immutable.
Yes, and that's why he appends to a list, then converts the list to a tuple.
--
- Rikard - http://bos.hack.org/cv/
_
On 15/09/2007, Lamonte Harris <[EMAIL PROTECTED]> wrote:
> Command prompt is a pain and it would be pretty nice to have this feature.
If you are using a Unixish system, do "python myscript.py 2> error.log".
--
- Rikard - http://bos.hack.org/cv/
___
T
On 13/09/2007, sacha rook <[EMAIL PROTECTED]> wrote:
> [CODE]
>
> from BeautifulSoup import BeautifulSoup
> doc = ['Page title',
>'This is paragraph
> one.',
>'This is paragraph two.',
>'http://www.google.co.uk";>',
>'http://www.bbc.co.uk";>',
>'http://www
On 14/09/2007, Terry Carroll <[EMAIL PROTECTED]> wrote:
> The second one, which just checks "if x" and is satisfied with any false
> value, including an empty tuple, does not raise the error condition, even
> though the data is bad. This is a bad thing.
For me, "if x" would be enough. If you thi
On 10/09/2007, Lawrence Barrott <[EMAIL PROTECTED]> wrote:
> is it possible to run other non-python files using python such as .exe or
> other files.
Have a look at os.system().
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@pytho
On 01/07/07, elis aeris <[EMAIL PROTECTED]> wrote:
[...]
> GainFocus(handle)
>
> Keyboard_event ( "hello python!")
> Mouse_event (x,y, left, 2)
>
> the (x,y) = should be relative to the active window and independent of the
> window's position.
> 2 as in clicking twice.
This sounds the renta
On 7/6/07, Richard Querin <[EMAIL PROTECTED]> wrote:
> I'm writing a very simple python script which writes out some
> predefined text to a file (which will later become part of an html
> file). I need to write out a pound sign '#' to the file and I can't
> figure out how to escape it. I've tried
On 6/7/07, Ramanuj Pandey <[EMAIL PROTECTED]> wrote:
> i want to embed Python code in C code, need any tutorial for starting.
http://www.codeproject.com/cpp/embedpython_1.asp
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@python.or
On 6/6/07, Martin Walsh <[EMAIL PROTECTED]> wrote:
> I can't think of a windows parallel to /dev/null.
"nul".
Try "dir > nul" in a command shell.
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@python.org
http://mail.python.org/ma
On 5/30/07, Treloar, Nick <[EMAIL PROTECTED]> wrote:
> how do you import sounds
Do you mean a module named "sounds", or sounds in general? If the
latter, what do you mean by "import" sounds? Read a sound-file? Play a
sound-file?
There is a wav-module you can use: http://docs.python.org/lib/modul
On 5/28/07, Thorsten Kampe <[EMAIL PROTECTED]> wrote:
> Do you really think someone can or will read what you wrote? I've
> never seen something so horribly formatted like you emails - and I've
> seen lots of awful formatted emails...
Looks fine at my end.
--
- Rikard - http://bos.hack.org/cv/
On 5/27/07, adam urbas <[EMAIL PROTECTED]> wrote:
> It says:
>
> can't multiply sequence by non-int of type 'str'
The reason is that raw_input() returns a string. What you are trying
to do is multiply a string with a string, which - in Python - is an
illegal operation.
What you want to do is to
On 5/26/07, Alan Gilfoy <[EMAIL PROTECTED]> wrote:
> How do you refer to the filename? Do you put it in quotes?
Yes. open("foo")
> Do you put
> in the file's full directory path? Or do file() and open() refer to
> the same directory as the one the script is in?
Yes, and yes. If you dont supply
On 5/19/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Please be gentle and forgiving of mistakes
> so beginners feel welcome as they learn.
My intention was not to be harsh or rude in any manner, I was just
trying to hint to encourage the use of subjects for posts.
Should Teresa feel hurt, my hu
On 5/18/07, Matt Smith <[EMAIL PROTECTED]> wrote:
> I am not sure
> how to suppress or avoid this error so that neighbour_count is not
> incremented for indexes outside the matrix.
Something like this:
try:
the_index_outside_matrix_test()
except IndexError:
suppress_the_error()
> Is there
On 5/18/07, Teresa Stanton <[EMAIL PROTECTED]> wrote:
> Remember when I was having problems moving my .gif around my Tkinter maze?
No, but we will all hereby remember you forever for posting a new
thread without a proper subject on this list. Perhaps at the same time
as our eyes will start peerin
On 5/18/07, Stephen Adler <[EMAIL PROTECTED]> wrote:
> or something like that which would create a string 100 characters
> long. And then use that as input into the array module so that I can
> build up an array. What's the standard convention to do this?
a = " " * 100
> How do I create
On 5/16/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
> Not Quite, I think.
I'm sorry, I missed the fact about using the tempfile. I parsed Mike's
post being a sole question about sending a var-args string to
os.command().
--
- Rikard - http://bos.hack.org/cv/
__
On 5/16/07, Emad Nawfal <[EMAIL PROTECTED]> wrote:
> What's wrong with it, and how can I fix it?
Alas, we are not mind readers. Instead of letting others guess, it's
usually a better idea to write any syntax errors - or whatever -
Python complains, or what the result you expect it to be, and what
On 5/15/07, Mike Hansen <[EMAIL PROTECTED]> wrote:
> Should the os.system command be something like
> command = "dsspcmbi -v %s %s" %(Pdb, temp1)
> os.system(command)
>
> ?
Yes.
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@pytho
On 5/9/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
> Please don;t hijack a thread to ask something unrelkated.
> Start a new threead it helps keep things clear and makkes
> it easier to find responses later.
What do you mean by hijack a thread?
Her subject "Type conversion" is the only occurence i
On 5/9/07, Bob Gailer <[EMAIL PROTECTED]> wrote:
[...]
> If you don't have to include it, please consider omitting it.
Considering the OP's domain name, he might not be able to omit it.
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tu
On 5/7/07, Dave C <[EMAIL PROTECTED]> wrote:
> when you are doing print these two characters keep showing up in this book
> "%s" %
>
> What do they do?
http://docs.python.org/lib/typesseq-strings.html
--
- Rikard - http://bos.hack.org/cv/
___
Tutor ma
On 5/6/07, Jason Coggins <[EMAIL PROTECTED]> wrote:
> Is there a way to send a command to the Linux Terminal from inside a Python
> program?
os.system(), os.popen(), etc.
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@python.org
ht
On 5/5/07, Jason Coggins <[EMAIL PROTECTED]> wrote:
> I can see how to use it to execute a script of code embedded in the program
> (that example was provided in the documentation) but I cannot figure out the
> syntax to use it to run another python program in another file.
Use execfile().
--
On 4/28/07, Alexander Dering <[EMAIL PROTECTED]> wrote:
> But I can't get it to run directly from Python. If I go to the terminal and
> type "python hello.py" (which is what the instructions say I should be
> doing!) I get the following:
>
> >>> hello.py
> Traceback (most recent call last):
>
On 4/27/07, shiv k <[EMAIL PROTECTED]> wrote:
> When I launch a command-line interpreter, mpcp exists
Sounds like a PATH-issue (environment variable). Check both your
PYTHONPATH and PATH, and make sure mpcp is in either python's
site-lib/ or in your PYTHONPATH.
--
- Rikard - http://bos.hack.o
On 4/26/07, Stevie Broadfoot <[EMAIL PROTECTED]> wrote:
> How can I get around this problem?
def printout(somelist):
for x in somelist:
print x
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@python.org
http://mail.python.or
On 4/26/07, Switanek, Nick <[EMAIL PROTECTED]> wrote:
> Can someone help me better understand how I ought to manage the modules and
> packages that I download? I often find that I can't use the code I've just
> downloaded, despite putting it into Lib/site-packages. Often I've added the
> subdirect
On 4/25/07, John Washakie <[EMAIL PROTECTED]> wrote:
> cat raw.html |
> sed 's/ImagePathReplaceMe/NewPathToImage/g' |
> sed 's/TitleReplaceMe/NewTitle/g' > new.html
One line's sufficient:
sed -e 's/ImagePathReplaceMe/NewPathToImage/g;s/TitleReplaceMe/NewTitle/g'
raw.html > new.html
> However, t
On 4/24/07, shawn bright <[EMAIL PROTECTED]> wrote:
> is there something i can do to make this happen?
Use the keyword "return".
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tut
On 4/24/07, Ketan Joshi <[EMAIL PROTECTED]> wrote:
> If so, why isn't this function defined as:
>
> def copy(self):
> import copy
> return copy.copy(self)
The if-case in your code makes sure that the property __class__ is of
UserDict-inheritance. I believe it's there in case of multiple
c
On 4/24/07, ammar azif <[EMAIL PROTECTED]> wrote:
> i am able to access the variable declared in that loop after the loop
> finishes which i am not able to do in languages like c/c++ or java. Is it
> different in python?
I'm not sure what you mean with "different", but the loop-variable is
not de
On 4/22/07, Vince Teachout <[EMAIL PROTECTED]> wrote:
> I just twit-filtered him. I got tired of his one line robotic complaint
> in MY mailbox.
Good for you, because as long as this list keeps being braindead about
not adding reply-to-tags (i.e. forever) I'm piping it back in here.
And now, Al
On 4/22/07, Jia Lu <[EMAIL PROTECTED]> wrote:
> SPE under Linux
> PyScripter under windows
Stop replying to my mailbox.
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On 4/22/07, Rohan Deshpande <[EMAIL PROTECTED]> wrote:
> What does everyone use as their development environment for Python,
Emacs.
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/
On 4/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Im confused When i had python 2.4 all my scripts work correctly should i
> reinstall python 2.4? Or should I keep 2.5? Where can I find information
> on coding for python 2.5?
Context?
--
- Rikard - http://bos.hack.org/cv/
__
On 4/18/07, Kirk Bailey <[EMAIL PROTECTED]> wrote:
> I never talk to mailboxes, nor to other inanimate objects; I was talking
> to you.
I'm not interested in listening to your ifs about your memory.
--
- Rikard - http://bos.hack.org/cv/
___
Tutor mail
On 4/18/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Please don't start this thread again.
We didn't start it, rather it just never ends.
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/li
On 4/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I found this site and I'm practicing coding and I write this script, but
> I'm unsure why its not working. Everything goes well until it gets to the
> part where it tries to calculate the formula. Inputs work fine anyone
> know what I di
On 4/17/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
> I really wish this list would start mungin' some headers already.
I second that.
Not using a reply-to-tag is braindead.
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@pyt
On 4/17/07, Kirk Bailey <[EMAIL PROTECTED]> wrote:
> IF my memory serves well, argument 0 in that list is the name of the
> program itself, as well as the path to it if any was provided.
Stop replying to my mailbox.
--
- Rikard - http://bos.hack.org/cv/
On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I've been reading the python tutorial trying to get used to the style
> tryna understand it. So I come across this: "sys.argv[0]" in the tutorial
> on python.org. What is "sys.argv"? How does it work? Can someone give me
> a simple exam
On 4/13/07, Øyvind Dale Spørck <[EMAIL PROTECTED]> wrote:
> Does anyone know of any modules that works towards the central
> Exchange-server or any example scripts that can give me any hints?
Try this list instead: http://mail.python.org/mailman/listinfo/python-win32
--
- Rikard - http://bos.h
On 4/10/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
> vim 8?!!
> I didn't hardly notice that vim 7 was out!
alias vim='/usr/bin/env emacs'
--
- Rikard.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On 4/8/07, linda.s <[EMAIL PROTECTED]> wrote:
> how i can randomly reassign the values to different location in the list?
>>> import random
>>> mylist = [1,2,3,4,5,6,7,8,9]
>>> mylist
[1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> random.shuffle(mylist)
>>> mylist
[3, 6, 9, 4, 7, 1, 2, 8, 5]
--
- Rikard - ht
On 4/7/07, János Juhász <[EMAIL PROTECTED]> wrote:
May you recommend anything to build them easy ?
I use this C-shell script for the same purpose. Even if it doesn't add
up to the features you want, you can always use it as reference for
re-hacking.
--
- Rikard - http://bos.hack.org/cv/
ma
On 4/8/07, Kirk Bailey <[EMAIL PROTECTED]> wrote:
> It works. but when you mouse copy and paste, you get this:
[...]
This has what to do with Python?
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@python.org
http://mail.python.org
On 4/5/07, Keegan Johnson <[EMAIL PROTECTED]> wrote:
> Is there any way to clean up all these files
> that I've accrued trying to get things to work? I've been able to do
> a little bit but nothing more than that. Also, what should I use?
> There's lots of different versions different sites recomm
Jay, PLEASE shorten your posts by removing all unnecessary quoting.
On 4/5/07, Jay Mutter III <[EMAIL PROTECTED]> wrote:
> Whether I attempt to just strip the string or attempt to
>
> if line.endswith('No.\r'):
> line = line.rstrip()
>
> It doesn't work.
That's because you assume the linef
On 4/1/07, Jay Mutter III <[EMAIL PROTECTED]> wrote:
> For some reason this never works for me;
That's because you are ignoring the linefeed character:
[...]
> if line.endswith('No.'):
>>> s1 = "some line\n"
>>> s2 = "some line"
>>> s1.endswith("line"), s2.endswith("line")
(False, True)
J
On 3/31/07, Dhiraj Sharma <[EMAIL PROTECTED]> wrote:
> 2. Also, is it possible to cancel (abort) a blocking read (say, to stdin) in
> a function that can be called by a timer? The goal is to cancel the read if
> input is not forthcoming within a specified time.
For Windows, no idea. For Unix I'd
On 30 Mar 2007 20:23:00 -0400, Greg Perry <[EMAIL PROTECTED]> wrote:
> Yeah I figured that. I am trying to find a way to have the program detect if
> the user input is a file or directory, which is easy enough with os.path.
> However, os.path makes no distinction between a regular file and a ma
On 3/31/07, Kirk Bailey <[EMAIL PROTECTED]> wrote:
> I replied off list due to just clicking reply, not replyall, and this
> list is not set up with a replyto header. so away it went.
Youre not the first one, and definately not the last one...
--
- Rikard - http://bos.hack.org/cv/
_
On 3/27/07, James Rocks <[EMAIL PROTECTED]> wrote:
[...]
> So, if anyone can offer any help I'd appreciate it :)
FWIW, your code works fine for me. I tested on my local pop3-server
and I got all the messages on it. Perhaps it's a server issue of
yours.
--
- Rikard - http://bos.hack.org/cv/
___
On 3/25/07, Utkarsh Tandon <[EMAIL PROTECTED]> wrote:
> realtext = str(realtext)
Here's the problem. Use this instead:
realtext = "".join(realtext)
> realtext = realtext.replace('[', "").replace(']', "").replace(',',
> "").replace("'", "").replace('\\n', "").replace('\\t', "")
And d
On 3/25/07, Jay Mutter III <[EMAIL PROTECTED]> wrote:
[snip huge post]
92% of the lines in your post contained quotes from earlier posts.
Please try to reduce the amount of quoted lines.
--
- Rikard.
___
Tutor maillist - Tutor@python.org
http://mai
On 3/23/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
> Read the 'Whats in a name?' topic in my tutor for more about this
> and how to deal with it.
http://www.catb.org/~esr/faqs/smart-questions.html as well.
--
- Rikard - http://bos.hack.org/cv/
___
Tuto
On 3/21/07, p l <[EMAIL PROTECTED]> wrote:
> im a new python programmer and iv been given a task to get as much details
> that i can on my system memory...
Since this is very low level hacking, you need to specify which
operating system you use.
--
- Rikard - http://bos.hack.org/cv/
_
On 3/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> my actual question is "is this a rare case related to the
> scipy distribution, or something general in python"
The first.
I've never ever stumbled on an error like yours, and I use from FOO
import BAR alot without any whole module-impor
On 3/16/07, Ben <[EMAIL PROTECTED]> wrote:
> Is anyone can point me where I can find a good tutorial about pywin for
> someone like me?
Pywin itself is not a package for making GUIs, it's merely a IDE for
Windows and got the win32all-package included.
For GUIs, you want to look at wxPython, pygt
On 3/16/07, ammar azif <[EMAIL PROTECTED]> wrote:
> Is there any built-in function to convert a hex number to a decimal number?
>>> int("ff", 16)
255
--
- Rikard.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On 3/15/07, Clay Wiedemann <[EMAIL PROTECTED]> wrote:
> If doing a loop, how can one skip forward a specific amount randomly
> determined within the loop?
y = 0
while y < HEIGHT:
linewidth = random(3, 9)
# drawlines etc
y += linewidth
The reason why you cannot alter the for-variable beats
On 3/8/07, Joydeep Mitra <[EMAIL PROTECTED]> wrote:
> I would like to know what's the best IDE for python (having all important
> IDE features like debug, etc), other than IDLE.
Which IDE to use is no more than a matter of taste and laziness.
Myself, I use Emacs (as for to everything).
--
- Ri
On 3/6/07, zannah marsh <[EMAIL PROTECTED]> wrote:
> step through them as you would in an array or list. so i had this:
> for i in word1
> if word1[i] == word2[i]...
For this construction to work in Python, you use the range()-function.
for index in range(len(word1)):
Say word1 i
On 3/6/07, zannah marsh <[EMAIL PROTECTED]> wrote:
> thanks Rikard, that makes sense.
No problems, but please post answers to the list and not to my mail adress.
This list is braindead that doesn't use a reply-to-tag for the posts,
but we've had that debate already so there's no need for another.
On 3/6/07, zannah marsh <[EMAIL PROTECTED]> wrote:
> if item == item in word2: #checks characters against each other
Here's the error.
Loop variable "item" contains the actual character in word1. The
syntax "item in word2" checks if this character is _anywhere_ in
word2. What you want to
On 3/5/07, Vasile Filat <[EMAIL PROTECTED]> wrote:
> I just started learning Python from a book translated intro Russian. It is my
> first exercise from the book and I don't know why it is not working. Help me
> please to correct my code which I will include below.
You need to tell us why it's
On 3/1/07, Purcell, Brittany Nicole <[EMAIL PROTECTED]> wrote:
> I have no idea how to even begin to program something like this and
> what I need to do is:
We won't do your homework unless you atleast show that you are
interested in learning what you are doing, and not only going for
grade point
On 2/27/07, Doug Stone <[EMAIL PROTECTED]> wrote:
> Hi. I just started investigating Python and was wondering about the origin
> of Python's name.
> What did van Rossum have in-mind when he named Python?
http://en.wikipedia.org/wiki/Guido_van_Rossum
About the origin of Python, Van Rossum wrote
On 2/22/07, Nagendra Singh <[EMAIL PROTECTED]> wrote:
> How can I get python to display
> the results in the interactive window or what is the right way to do this.
Use os.popen:
http://docs.python.org/lib/os-newstreams.html#os-newstreams
--
- Rikard.
_
On 2/21/07, Kirk Bailey <[EMAIL PROTECTED]> wrote:
[...]
> Discussion on or off list is saught. Constructive criticism will be
> graciously received and thanked.
Without links, pointers, code or anything grippable I find it
difficult to comment or discuss anything, since i haven't got the
faintes
On 2/21/07, John Fouhy <[EMAIL PROTECTED]> wrote:
> (because you are using a generator expression, and they were only
> introduced in 2.4)
List comprehensions were implemented in v2.0. The OP probably does not
use an older version, but as far as I can see, his syntax error line
uses parenthesis -
On 2/19/07, Dick Moores <[EMAIL PROTECTED]> wrote:
> Is there one? If there is, where is it?
Yes, there is one. It'sbuiltin(!) in the interpreter! ;-)
--
- Rikard.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tut
On 2/19/07, Dick Moores <[EMAIL PROTECTED]> wrote:
> It's the remaining seven I'm wondering about, or really about >>, <<,
> &, ^, and | .
This webpage will tell you - in detail - about all the operators:
http://www.lnf.infn.it/Calcolo/doc/aixcxx/html/language/ref/ruclxbin.htm
The bitwise operat
On 2/19/07, Dick Moores <[EMAIL PROTECTED]> wrote:
> I've tried "^=" out a bit:
[...]
> and get that strange alternating behavior. Can someone explain?
> And while at it, please also explain "&=" and "|=".
^ is XOR, & is AND, | is OR, all bitwise.
You can read more about them here: http://www.so
On 2/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> import classctof
> y=classctof.fahrenheit(1)
> print y
>
> What am I doing wrong to get it to pass the answer back to the calling
> program?
You need to instancify the class first before calling its methods:
import classctof
# make an
On 2/16/07, C. Gander <[EMAIL PROTECTED]> wrote:
> I downloaded py2exe and I thought it was a program that you just browsed
> your driver and gave it the .py file and it would do the rest. But I
> downloaded it and I cannot figure out how to use it. Please help.
You don't have to "figure it out",
On 2/14/07, Mike Hansen <[EMAIL PROTECTED]> wrote:
> The following tutor faq has an explanation:
>
> http://www.python.org/infogami-faq/tutor/tutor-why-do-my-replies-go-to-t
> he-person-who-sent-the-message-and-not-to-the-list/
I think the argument in that "explanation" sucks.
A asks something,
On 2/15/07, Andre Engels <[EMAIL PROTECTED]> wrote:
> It's getting to be the majority of mailing lists that do it the other way,
> and I find it quite irritating that this list does not - I have had several
> times that I sent a mail, and after sending it, sometimes long after sending
> it, I real
On 2/15/07, Nathan Pinno <[EMAIL PROTECTED]> wrote:
> and that was a suggestion. (Thanks!) But can anyone explain why I can
> shorten the code? I looked at it a long while yesterday, and came up with
> nothing. The only thing I decided was to try to get it to the GUI stage.
If you take a look at
On 2/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Every example of a list that I've seen involves working with, sorting, etc
> pre-populated list. How can I create a list where the user inputs a string
> of numbers and then sorts it?
The code of yours gets a commaseparated _string_, whi
All texts that I reply to this list are automatically sent to the
author, or - by selecting "Reply all" in my mail client - the
tutorlist gets a CC.
Why is there no reply-to-tag in all the posts, making the list
recipient at all times?
--
- Rikard.
__
On 2/14/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
> I don't think that's a problem. The fact that the computers numbers
> don't correspond with the users numbers shouldn't matter provided
> the 'if' tests align with the choice result, which they do.
Alan,
You're right, ofcourse. I approached the
On 2/14/07, Nathan Pinno <[EMAIL PROTECTED]> wrote:
> I wrote a rock, paper, scissors game and every time you play without
> exiting, it chooses the same number. How can I fix this problem? The
> relative code is below:
[...]
> compchoice = choice(range(3))
[...]
>>> range(3)
[0, 1, 2]
On 2/13/07, Shadab Sayani <[EMAIL PROTECTED]> wrote:
[...]
> /usr/local/lib/python2.4/config/libpython2.4.a(dynload_shlib.o)(.text+0x1f6):Python/dynload_shlib.c:133:
> undefined reference to `dlerror'
[...]
You have not provided enough information for us to help you. What
system do you use?
It l
On 2/13/07, Jalil <[EMAIL PROTECTED]> wrote:
> I was wondering if its possible to go about writing a code to find out all
> the installed program on a windows machines. Basically everything under Add
> Remove Programs in the control panel.
There is no support for this in the standard Python-dis
On 2/12/07, Hazlett, Les <[EMAIL PROTECTED]> wrote:
> If I pass a large list via a parameter, there will be two copies of the
> list.
No. You pass a *reference* to the list, not the list itself.
>>> a = [1,2,3,4]
>>> b = a
>>> b is a
True
>>> id(b), id(a)
(1075562604, 1075562604)
>>> b = [1,2,3,
On 2/9/07, johnf <[EMAIL PROTECTED]> wrote:
> Is there a Python tool/document that is similar? Just a simple way to help
> understand.
Yes, use the __doc__ property.
>>> print list.__doc__
list() -> new list
list(sequence) -> new list initialized from sequence's items
>>> import os.path
>>> pri
On 2/8/07, Alan Gauld <[EMAIL PROTECTED]> wrote:
> > I am really just asking about applications here, not libraries or
> > frameworks.
> The same rules apply. A module is a library in Python terms.
I think he meant that he's developing applications only.
--
- Rikard.
___
93 matches
Mail list logo