hat your code does, I think it will be something like:
try:
F_unused = open(path1, 'rb')
F_used = open(path2, 'rb')
except IOError:
print("no")
.
else:
unused_ints = pickle.load(F_unused)
..
HTH
Daniel Sarmiento S.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
gs (
http://en.wikipedia.org/wiki/Time-of-check-to-time-of-use )
Without knowing what your code does, I think it will be something like:
try:
F_unused = open(path1, 'rb')
F_used = open(path2, 'rb')
except IOError:
print("no")
.
else:
unused_ints = p
>
> Date: Wed, 3 Mar 2010 08:17:45 -0500
> From: Kent Johnson
> To: Tutor@python.org
> Subject: [Tutor] Bowing out
> Message-ID:
><1c2a2c591003030517r66cf067fgf2f5a052a4a08...@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi all,
>
> After six years of tutor posts my i
Date: Fri, 5 Feb 2010 17:43:37 +0530
From: Spoorthi
To: "Rohit Roger$"
Cc: tutor
Subject: Re: [Tutor] python function to know the path of the program
in execution *
Message-ID:
<6c9f52051002050413o57bd76bax7ac5986b17304...@mail.gmail.com>
Content-Type: text/plain; charse
[20]: outcomes = {'head':0, 'tail':0}
In [21]: for i in range(100):
: outcomes[choice(pos)] += 1
:
:
In [22]: print outcomes
---> print(outcomes)
{'head': 46, 'tail': 54}
HTH
Daniel Sarmiento.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Hello
I am starting to use PyQt, and I'm trying to send a signal across threads,
but I get the following error:
Traceback (most recent call last):
File "/home/daniel/NetBeansProjects/aeropuerto/main.py", line 34, in
form = AeropuertoDlg()
File "/home/daniel/NetBeansProjects/aeropuerto/ma
I am not an expert and don't know if this is considered 'elegant', but this
is what I would try
conv = [[j[0], int(j[1]), int(j[2])] + j[3:] for j in LoL]
> Hi Your,
>
> I work with genomic datasets as well and have recently only started
> working with python (so my advice is a bit naive)
>
>
Try taking a look at nltk:
http://nltk.org
> Date: Fri, 19 Sep 2008 12:05:39 +0200
> From: Daniele <[EMAIL PROTECTED]>
> Subject: [Tutor] Name Generator
> To: tutor@python.org
> Message-ID:
><[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="utf-8"
>
> Hi list,
> I'd like to implem
Thank you for your suggestions,
I created a working prototype now, http://dpaste.com/73630/
Daniel
> On Sat, Aug 23, 2008 at 4:08 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Graphviz's dot is an amazing way to produce graphics from graph data.
> pydot can produce the dot files needed to creat
Hi
I am working on a red-black binary tree class. I would like to print
it in a nice, graphical way. I have never done any GUI programming, or
generated any graphics in python, before.
What libraries would you use, what's the most straight forward way to
achieve what I want?
Thank you.
_
>(the solution, of course, is to avoid storing all those numbers in the
>first place)
I tried this:
fib = {0:0,1:1}
sum = 0
for j in xrange (2,100):
i = fib[j-1] + fib[j-2]
if i % 2 == 0:
sum += i
fib = {j-1:fib[j-1], j:i}
print sum
I guess it should come up with the ri
Hi
I tried to run your code and checked (with top) the memory ussage and
it uses more than 2 Gb of memory.
I tried to modify the code a little bit to use less memory and came up
with this:
fib = {0:0,1:1}
even = []
def fibonacci(x,y):
return x+y
for j in xrange (2,100):
i = fib[j-1]
What about the following function?
if x == 0:
return False
return True
I am a beginner, but I think it is more clear (at least to me) what
the function does. And it is only one line longer than
value = (x != 0)
return value
___
Tutor maillist -
That's a web server error, not a python error.
You can find more information by checking the server's log.
>From the error message it look like you are using apache and red hat. I use
debian and my error logs are stored is in /var/log/apache2 by default.
Check you apache configuration file and f
14 matches
Mail list logo