On Thu, 25 Nov 2010 00:58:23 +
Adam Bark wrote:
> Ah yes always avoid giving your modules names that appear in the
> standard library. It goes wrong, sometimes in unexpected ways.
I was wondering... apart from checking each name individually, is there
any easy-peasy way to get a list of nam
On 01/-10/-28163 02:59 PM, Susana Iraiis Delgado Rodriguez wrote:
Hello Peter!
I added the line you suggested me and found out that I was just searching
for the filenames without pointing to a specific directory, so Python took
its directory (Python26) as default. After that I need to add a '\'
Thanks Adam and Alan for responding, I'm very much a non-programmer, but my
14 year old son wants to learn, so I have to learn to teach him...slow
process lol.
Happy Thanksgiving!
Jeff
On Wed, Nov 24, 2010 at 8:27 PM, Alan Gauld wrote:
>
> "Jeff Goodwin" wrote
>
> Ok, I found the problem, I h
"Jeff Goodwin" wrote
Ok, I found the problem, I had saved the file as random.py looks
like that
was a no-no. Its working now that I changed the name.
Yes that's a bad idea. You probably figured out why, but just in
case...
import random
It tries to import itself, which then tries to
"Judy Chen" wrote
I am very new to Python, I worked on C/C++ before.
I would like to know is it a good practice to put Python development
code under
../src/UI/foo.py
../src/businesslogic/bar.py, etc.
Thats fine, especially if its a big project.
src means source code and python is a type o
Hi,
I am very new to Python, I worked on C/C++ before. I would like to know is it
a good practice to put Python development code under
../src/UI/foo.py
../src/businesslogic/bar.py, etc.
or should we eliminate "src' directory since it is not pythonic, or it very
C/C++ like.
I was told that t
On 24/11/10 22:10, Jeff Goodwin wrote:
Ok, I found the problem, I had saved the file as random.py looks like
that was a no-no. Its working now that I changed the name.
Thanks!
Jeff
Ah yes always avoid giving your modules names that appear in the
standard library. It goes wrong, sometimes in un
Ok, I found the problem, I had saved the file as random.py looks like that
was a no-no. Its working now that I changed the name.
Thanks!
Jeff
On Wed, Nov 24, 2010 at 5:06 PM, Jeff Goodwin wrote:
> Thanks Adam, that was a typo on my part, in the program the print is
> actually indented. Any other
Thanks Adam, that was a typo on my part, in the program the print is
actually indented. Any other suggestions?
Thanks again!
Jeff
On Wed, Nov 24, 2010 at 5:00 PM, Adam Bark wrote:
> On 24/11/10 21:51, Jeff Goodwin wrote:
>
> Hello,
>
> I'm trying to find a way to use the random.randint fu
On 24/11/10 21:51, Jeff Goodwin wrote:
Hello,
I'm trying to find a way to use the random.randint function to
generate a random number, but everytime I run the program it locks up
IDLE. Here is what I have so far:
import random
def main():
x = input("Enter a number: ")
y = input("Ente
Hello,
I'm trying to find a way to use the random.randint function to generate a
random number, but everytime I run the program it locks up IDLE. Here is
what I have so far:
import random
def main():
x = input("Enter a number: ")
y = input("Enter a different number: ")
z = random
Hello Peter!
I added the line you suggested me and found out that I was just searching
for the filenames without pointing to a specific directory, so Python took
its directory (Python26) as default. After that I need to add a '\' to
separate the path from the filename because it was reading them a
"Susana Iraiis Delgado Rodriguez"
wrote
I'm writing a python script to validate if files with extension .prj
exist,
if they exist it should write 1 or 0 into an excel cell. I've
working to do
this properly, but I'm not getting the results I need. The script
doesn't
find all the files, is l
"Steven D'Aprano" wrote
And we still wound up with over 50 reported bugs during Beta
test...
But that was much better than the 2000 bugs on an earlier project
:-)
But testing is hard.
Maybe so, but nothing beats running your test suite and seeing
everything pass!
Yes, I should have adde
> > Notice that it uses key as a function inside sorted.
> > And lambda creates a function so sorted applies
> > the lambda to each item in turn to retrieve the sort key.
>
> OK. I get it. Thanks a lot. This should have been clear if I had been
> able to see the code for the sorted() method.
Susana Iraiis Delgado Rodriguez wrote:
> Hello memebers:
>
> I'm writing a python script to validate if files with extension .prj
> exist, if they exist it should write 1 or 0 into an excel cell. I've
> working to do this properly, but I'm not getting the results I need. The
> script doesn't find
Hi, Walter -
Thanks to you, pyserial is installed and imports into Python. Not having
double backslashes was the latest problem that you got me through.
I am grateful for the support and education you have given me.
Cheers,
John
___
Tutor maillist
Hello memebers:
I'm writing a python script to validate if files with extension .prj exist,
if they exist it should write 1 or 0 into an excel cell. I've working to do
this properly, but I'm not getting the results I need. The script doesn't
find all the files, is like the files don't exist but th
On Wed, Nov 24, 2010 at 3:00 PM, Evert Rol wrote:
> Then you haven't read my previous response carefully enough, or I haven't
> phrased it properly. The example I gave was:
>
import mymodule
mymodule.X
>
> where X is defined in a file called mymodule.py
> In your case, replace mymodul
>> You're not really showing what exactly you type. That's often more clearer
>> than describing what you do, although in this case we can get a pretty good
>> picture anyway.
>
> OK, here's what I do:
>
import test
>
> I know the shell is importing the file because I can see the followin
Thanks Evert and Steve,
Both of you are right when you say:
> You're not really showing what exactly you type. That's often more clearer
> than describing what you do, although in this case we can get a pretty good
> picture anyway.
OK, here's what I do:
>>>import test
I know the shell is im
Josep M. Fontana wrote:
One question for Steve (or for whoever wants to answer): you say you
have a terminal with two tabs (neat, I wonder whether I can get tabs
as well for my terminal in OS X) and when you need to do debugging you
turn to your interactive python terminal and do;
import filena
Alan Gauld wrote:
The basic idea in testing is to try to break your code. Try to think
of every kind of evil input that could possibly come along and see
if your code survives. In amongst all of that you should have a
some valid values too, and know what to expect as out put.
Testing is more t
>
> ---
> One question for Steve (or for whoever wants to answer): you say you
> have a terminal with two tabs (neat, I wonder whether I can get tabs
> as well for my terminal in OS X)
In Terminal.app, just type command-T and you get a new tab. Switch with the
mouse or command-shift-[ & com
Hi,
When a thread gets too long and new subtopics appear it gets pretty
hard to keep track of what has been said by whom and what has been
answered. Anyway, in one of the threads I started, Steven d'Aprano
gave me a very nice response telling me what his preferred working
environment was. This pro
Great. Thanks Eike and Alan.
Josep M.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Tue, Nov 23, 2010 at 20:09, R. Alan Monroe wrote:
>
>> I've always disliked using "if not n % 2" to test for even/odd ints
>> because of its convoluted logic. But I ran some speed tests and found
>> it was the way to go over "if n % 2 == 0".
>
> Did you try bitwise-and with
"Robert Sjöblom" wrote
Why would you want to sum them? You start with 30 points in the
pool,
then allocate them to the attributes. The sum will still be 30.
Because the user should be able to spend 30 points, or remove points
from an attribute and get them back in the pool. Like so:
attrib
28 matches
Mail list logo