Hello,
I am trying to do the exercises in Michael Dawson's "Absolute Beginner"
book. In chapter four ("for Loops, Strings, and Tuples") one of the
challenges is: "Write a program that counts for the user. Let the user
enter the starting number, the ending number, and the amount by which to
count.
which function replaced fork() in Python2.5?
ShivThe idiot box is no longer passé; it's making news and how!
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Guba wrote:
> The code I have come up with so far is further below; basically my
> problem is that I don't know how to feed the range() function with the
> user-input numbers it expects.
> # Telling the player what to do & assigning that info to variables.
> start_num = int(raw_input("Please give
shiv k wrote:
>
>
> which function replaced fork() in Python2.5?
os.fork() hasn't moved, why do you think it was replaced?
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Rikard Bosnjakovic wrote:
> 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.
Please don't start this thread again.
Kent
_
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
I would like to be able to do something along the lines of:
>>> my_list = [1, 2, x for x in range(3,6), 6]
However this doesn't work. Is there any way of achieving this kind of thing?
I tried:
>>> my_list = [1, 2, *(x for x in range(3,6)), 6]
which also doesn't work.
I wrote a quick function
Ed Singleton wrote:
> I would like to be able to do something along the lines of:
>
my_list = [1, 2, x for x in range(3,6), 6]
>
> However this doesn't work. Is there any way of achieving this kind of thing?
my_list = [1, 2] + range(3,6) + [6]
or, to build it in steps,
my_list = [1, 2]
my
Kent Johnson wrote:
> my_list.extent(range(3, 6))
should be
my_list.extend(range(3, 6))
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi,
I am working on an implementation of an L-system in Python. I hate
using turtle module since it uses Tk and as my IDE also uses Tk I have
to close my editor before I can test the program. So I am implementing
the graphics using PIL.
Now to the problem.
Say you have a line AB with co-ords (x1
On 4/18/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Ed Singleton wrote:
> > I would like to be able to do something along the lines of:
> >
> my_list = [1, 2, x for x in range(3,6), 6]
> >
> > However this doesn't work. Is there any way of achieving this kind of
> > thing?
>
> my_list = [1
On 4/18/07, Abu Ismail <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am working on an implementation of an L-system in Python. I hate
> using turtle module since it uses Tk and as my IDE also uses Tk I have
> to close my editor before I can test the program. So I am implementing
> the graphics using PIL.
I never talk to mailboxes, nor to other inanimate objects; I was talking
to you.
Rikard Bosnjakovic wrote:
> 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 provid
use a replyto header, or swap around things so the FROM is the list
address, not the submitter, or kill me, or give me food, or something.
Luke Paireepinart wrote:
> Rikard Bosnjakovic wrote:
>> On 4/17/07, Kirk Bailey <[EMAIL PROTECTED]> wrote:
>>
>>
>>> IF my memory serves well, argument 0 i
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
shiv k wrote:
>
>
>
> MR Kent its there in ubuntu but if we see the same in windows xp there
> is no fork() instead there are spawn family.
fork() is not supported under Windows.
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/ma
As long as the PROBLEM lives, the THREAD will rise from the dead over
and over. Kill the problem, you kill the thread.
Kent Johnson wrote:
> Rikard Bosnjakovic wrote:
>> On 4/17/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
>>
>>> I really wish this list would start mungin' some headers alread
My memory is fine, as is my grip on reality as well as courtesy to my
fellow pythonistas.
Good day to you sir.
Rikard Bosnjakovic wrote:
> 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 int
Hello. I've been playing with Python for a while, and even have some
small scripts in my employ, but I have a bit of a problem and I'm not
sure how to proceed.
I'm starting graduate school (econ!) in the Fall; the school I'll be
attending uses Lotus for email and allows neither forwarding nor
POP/
James Cunningham wrote:
> I'd like to write a daemon that logs into the text-based web client
> every so often, scrapes for new email, and uses smtplib to send that
> email to another email address. But I really don't know how I'd go
> about logging in and staying logged in without a browser.
>
>
On Wed, 18 Apr 2007 12:15:26 -0400, Kent Johnson wrote:
> James Cunningham wrote:
>
>> I'd like to write a daemon that logs into the text-based web client
>> every so often, scrapes for new email, and uses smtplib to send that
>> email to another email address. But I really don't know how I'd go
>
Guba wrote:
> Hello,
>
> I am trying to do the exercises in Michael Dawson's "Absolute Beginner"
> book. In chapter four ("for Loops, Strings, and Tuples") one of the
> challenges is: "Write a program that counts for the user. Let the user
> enter the starting number, the ending number, and the amo
On 4/18/07, Guba <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am trying to do the exercises in Michael Dawson's "Absolute Beginner"
> book. In chapter four ("for Loops, Strings, and Tuples") one of the
> challenges is: "Write a program that counts for the user. Let the user
> enter the starting number
"shiv k" <[EMAIL PROTECTED]> wrote
> which function replaced fork() in Python2.5?
Try the subprocess module.
I think it can do a similar job even on Windows...
Alan G.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/
"Abu Ismail" <[EMAIL PROTECTED]> wrote
> I am working on an implementation of an L-system in Python. I hate
> using turtle module since it uses Tk and as my IDE also uses Tk I
> have
> to close my editor before I can test the program.
Why so? Don''t you have a multi-tasking OS?
If so just run a
"James Cunningham" <[EMAIL PROTECTED]> wrote
> I'd like to write a daemon that logs into the text-based web client
> every so often, scrapes for new email, and uses smtplib to send that
> email to another email address.
Kent has pointed you at useful add-on modules.
Using the standard library co
"Kharbush, Alex [ITCSV]" <[EMAIL PROTECTED]> wrote
> I need multiple entries with the os.system(cmd)line
> MY PROBLEM is that i need to enter multiple lines of
> input into unix. os.system() takes only one argument
How about uysing popen instead?
Or the new Popen class in the subprocess module
Hi Abu,
> Question: how to determine whether point C is to the left or to the
> right of the line AB?
When the line given by A(Xa,Ya) and B(Xb, Yb),
the area of the A-B-C triangle can be calculated with the value of next
determinant / 2
| Xa, Ya, 1 |
| Xb, Yb, 1 |
| Xc, Yc, 1 | / 2
So:
Area =
> I'm starting graduate school (econ!) in the Fall; the school I'll be
> attending uses Lotus for email
You can drive the fat client via COM if you install the Win32
extensions for python.
> (I know I could do it with a torturous combination of applescript and
Except judging by this, you're on
Hello everyone,
I have pretty much finished hacking on my Thesis and I have come to
the conclusion,
I really do not know how to use Python to it "full" extent. Some of
the things I have really messed up in my implementation are
serialization (specifically sub-classes), classes, and instantiating
Writing your own programs is a good idea. However, this is primarily a
good idea with small programs. For example, when learning Python, I
wrote a set of backup scripts for my computer; I still use them and
they've served me well.
If you want to write 'complete applications,' you're probably bette
* Alan Gauld <[EMAIL PROTECTED]> [070418 21:28]:
>
> "shiv k" <[EMAIL PROTECTED]> wrote
>
> > which function replaced fork() in Python2.5?
Replaced?
>>> sys.version, os.fork
('2.5 (release25-maint, Dec 9 2006, 14:35:53) \n[GCC 4.1.2 20061115
(prerelease) (Debian 4.1.1-20)]', )
Andreas
__
Hi,
The sample script below throws the exception "AttributeError: input" rather
than the expected exception "AttributeError: non_existent_attribute".
Please help me write a decorator or descriptor of my own that fixes the
issue.
class Sample(object):
def __init__(self):
sel
I know, this might sound stupid, but property is not a decorator. :)
Andreas
* Jacob Abraham <[EMAIL PROTECTED]> [070419 08:25]:
> Hi,
>
>The sample script below throws the exception "AttributeError: input"
> rather than the expected exception "AttributeError: non_existent_attribute".
>
"R. Alan Monroe" <[EMAIL PROTECTED]> wrote
> You can drive the fat client via COM if you install the Win32
> extensions for python.
>
>> (I know I could do it with a torturous combination of applescript
>> and
>
> Except judging by this, you're on a MAC... so maybe not. Still,
> working WITH the
35 matches
Mail list logo