On Saturday 20 August 2011 23:53:53 Alan Gauld wrote:
> On 20/08/11 15:25, Lisi wrote:
> > ridiculous. I think that I understand how to write a basic function, but
> > I can't work out how to save and call it.
[snip]
> There is a full worked example in the Functions and Modules
> topic in my tutor
If sys.py is a file, it must be somewhere; but I can't find it. Where is it?
I would like to look at it.
The modules within it must surely be somewhere too. But since I can't find
sys, I obviously can't find the modules. Again, I'd like to look at them.
In case it is relevant, I am using Py
> -Original Message-
> From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor-
> bounces+bermanrl=cfl.rr@python.org] On Behalf Of Lisi
> Sent: Sunday, August 21, 2011 7:58 AM
> To: tutor@python.org
> Subject: [Tutor] Where is sys.py?
>
> If sys.py is a file, it must be some
Lisi wrote:
> If sys.py is a file, it must be somewhere; but I can't find it. Where is
> it? I would like to look at it.
You are out of luck, there is no sys.py. The sys module is so tightly
integrated that Python cannot run without it; it has to be part of the
interpreter and is written in C.
On Sunday 2011 August 21 04:57, Lisi wrote:
> If sys.py is a file, it must be somewhere; but I can't find it. Where is
> it? I would like to look at it.
>
> The modules within it must surely be somewhere too. But since I can't find
> sys, I obviously can't find the modules. Again, I'd like to lo
On Sunday 21 August 2011 12:57:50 Lisi wrote:
> If sys.py is a file, it must be somewhere; but I can't find it. Where is
> it? I would like to look at it.
>
> The modules within it must surely be somewhere too. But since I can't find
> sys, I obviously can't find the modules. Again, I'd like to
On 8/21/2011 4:57 AM Lisi said...
If sys.py is a file, it must be somewhere; but I can't find it. Where is it?
I would like to look at it.
The modules within it must surely be somewhere too. But since I can't find
sys, I obviously can't find the modules. Again, I'd like to look at them.
In c
Hello Programmers,
I am trying to learn Python on my own through a book called "Python
Programming for the Absolute Beginner". I am stuck on a challenge at the
end of a chapter and I am hoping for a little help.
The challenge is to write a program that flips a coin 100 times and tells
you the nu
On Sunday 2011 August 21 09:14, Joel Preston wrote:
> Hello Programmers,
>
> I am trying to learn Python on my own through a book called "Python
> Programming for the Absolute Beginner". I am stuck on a challenge at the
> end of a chapter and I am hoping for a little help.
>
> The challenge is to
I have just received the following.* In what way have I transgressed? I
apologise to you all - but as I mentioned, I had been stuck for weeks and am
running out of time. And I certainly tried to help myself - I just didn't
succeed! Anyhow, if someone will tell me in what way I have transgress
Hey
I am executing a grep command in my python program using os.system. I
want to store the output somewhere but because of GUI's involved
(generated using tkinter and pyzenity) I am unable to store my output
or the result of the executed grep command in some form. Can you guys
tell me how to store
On 8/21/2011 10:08 AM Lisi said...
I have just received the following.* In what way have I transgressed? I
apologise to you all - but as I mentioned, I had been stuck for weeks and am
running out of time. And I certainly tried to help myself - I just didn't
succeed! Anyhow, if someone will tel
On 21/08/11 17:14, Joel Preston wrote:
tells you the number of heads and tails that come up. So far I can
write a program that will flip a coin 100 times but it will only come up
tails or heads all 100 times.
Look again at your code, you only assign a value to coin once, before
you enter the
On 8/21/2011 10:15 AM ANKUR AGGARWAL said...
Hey
I am executing a grep command in my python program using os.system. I
want to store the output somewhere but because of GUI's involved
(generated using tkinter and pyzenity) I am unable to store my output
or the result of the executed grep command
Thanks for the reply, Emile. :-)
On Sunday 21 August 2011 18:25:44 Emile van Sebille wrote:
> The sender's email address is verified and those 'new to the list' get
> this message -- do you have multiple email accounts
Yes - but I consistently use the same one for this list, and have checked my
Hi Joel,
Someone has asked this question before and I think it was dealt with.
That said, in my opinion, starting out with python 3 reduces the number of
assist you can get on the fly.
I for one have dealt with this issue before but can't help with the python 3
areas.
Have you checked Ala
On Sun, Aug 21, 2011 at 7:25 PM, Emile van Sebille wrote:
> On 8/21/2011 10:08 AM Lisi said...
>
> I have just received the following.* In what way have I transgressed? I
>> apologise to you all - but as I mentioned, I had been stuck for weeks and
>> am
>> running out of time. And I certainly
Same here as Andre said. I've gotten that email probably a dozen times by now.
It's based on an amount of absence I believe.
-
Sent from a mobile device. Apologies for brevity and top-posting.
-
On Aug 21, 2011, at 2:37 PM, Andre Engels wr
On 21/08/11 18:15, ANKUR AGGARWAL wrote:
Hey
I am executing a grep command in my python program using os.system.
I guess the first question is why?
Python's re module can do pretty much anything that grep can do
and do it inside your program with no extra processes being
started.
Why not just
Python documentation says:
> exception TypeError
>
> Raised when an operation or function is applied to an object of
> inappropriate type. The associated value is a string giving details
> about the type mismatch.
For example:
>>> 'foo' + (1, 2)
Traceback (most recent call last):
File "", line
Suppose I have this TestCase class.
class C(TestCase):
def setUp():
# very time consuming and resources intensive stuffs.
pass
def test_A(self):
pass
def test_B(self):
pass
def test_C(self):
pass
The unittest docs says:
> Each instance of the TestCas
On 08/21/2011 05:35 PM, D. Guandalino wrote:
Python documentation says:
exception TypeError
Raised when an operation or function is applied to an object of
inappropriate type. The associated value is a string giving details
about the type mismatch.
For example:
'foo' + (1, 2)
Traceback (mo
On 22 August 2011 00:17, Dave Angel wrote:
> On 08/21/2011 05:35 PM, D. Guandalino wrote:
>
>> Python documentation says:
>>
>> exception TypeError
>>>
>>> Raised when an operation or function is applied to an object of
>>> inappropriate type. The associated value is a string giving details
>>>
On 21 August 2011 22:35, D. Guandalino wrote:
> >>> class C(object):
> ... def __init__(self):
> ... pass
> ...
> >>> C(1)
> Traceback (most recent call last):
> File "", line 1, in
> TypeError: __init__() takes exactly 1 argument (2 given)
>
> I'm having hard times understandin
Lisi wrote:
I have just received the following.* In what way have I transgressed? I
apologise to you all - but as I mentioned, I had been stuck for weeks and am
running out of time. And I certainly tried to help myself - I just didn't
succeed! Anyhow, if someone will tell me in what way I ha
Lisi wrote:
If sys.py is a file, it must be somewhere; but I can't find it. Where is it?
I would like to look at it.
Others have already answered this, but consider how you might explore
the answer at the interactive interpreter:
>>> import os
>>> os.__file__
'/usr/lib/python2.5/os.pyc'
>>
D. Guandalino wrote:
Suppose I have this TestCase class.
class C(TestCase):
def setUp():
# very time consuming and resources intensive stuffs.
pass
def test_A(self):
pass
def test_B(self):
pass
def test_C(self):
pass
The unittest docs says:
Each i
D. Guandalino wrote:
class C(object):
... def __init__(self):
... pass
...
C(1)
Traceback (most recent call last):
File "", line 1, in
TypeError: __init__() takes exactly 1 argument (2 given)
I'm having hard times understanding why a TypeError is raised here.
Could you exp
28 matches
Mail list logo