Sandra-24 wrote:
> Now that is a clever little trick. I never would have guessed you can
> assign to __class__, Python always surprises me in it's sheer
> flexibility.
>
> In this case it doesn't work.
>
> TypeError: __class__ assignment: only for heap types
>
> I suspect that's because this ob
Posted: April 22, 2006
Job title: $300 flat for job in perl, cgi, Visual Basic/Asp.Net,
whatever online project
Company name: Sworde.com
Location:
United States, Colorado, Glenwood Springs
Pay rate: 300.00 flat for job
Travel: 0%
Length of employment: Until job done
Hours: Flexible
Onsite: no
Descr
Gerard Flanagan <[EMAIL PROTECTED]> wrote:
> def distribution(N=2):
> p = [0] + sorted( random.random() for _ in range(N-1) ) + [1]
> for j in range(N):
> yield p[j+1] - p[j]
>
> spread = list(distribution(10))
>
> print spread
> print sum(spread)
This is simpler, easier t
Gaz wrote:
> Hi guys. I've been lookig for this in the numpy pdf manual, in this
> group and on google, but i could not get an answer...
You will probably want to look or ask on the numpy list, too.
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
> Is there a way to create a cust
BTW, i tried the "classe Thinge(): pass" but does not qualify as "data
type" for a numpy array.
--
http://mail.python.org/mailman/listinfo/python-list
Hi guys. I've been lookig for this in the numpy pdf manual, in this
group and on google, but i could not get an answer...
Is there a way to create a custom data type (eg: Name: string(30), Age:
int(2), married: boolean, etc) and then use that custom data in a
matrix? Actually, this is a two questi
Python treats integers as objects, but as I mentioned that I do care
about the value only, and not its object methods. I mean that it's not
possible to share objects among application in different programming
languages, but it's possible to share the scalar values among them.
Strings, booleans, int
Em Dom, 2006-04-23 às 00:20 +0200, Michal Kwiatkowski escreveu:
> Hi!
>
> I was just wondering...
Probably there is another factor involved:
$ python2.3
Python 2.3.5 (#2, Mar 6 2006, 10:12:24)
[GCC 4.0.3 20060304 (prerelease) (Debian 4.0.2-10)] on linux2
Type "help", "copyright", "credits" or "
Hi walterbyrd,
I had also gone through this search earlier, but unfortunately the app
generators generate a lot of code, and more imp is that inspite of
this, they are not very close to what you really need. I had been
evaluating these from time to time. Appgini is good but mostly from an
academic
> I'm creating a GUI program
> with wxPython which will be distributed for Mac and Windows.
[...]
> The program should be able to update itself
[...]
By default, py2exe puts all the .pyc files used in a zip file. The
simplest way to do this it let py2exe do what it normally does. Code
all o
On 23/04/2006 2:21 AM, harold wrote:
> Dear all,
>
> Maybe I stared on the monitor for too long, because I cannot find the
> bug ...
You already have your answer, but below are clues on how to solve such
problems much faster by yourself.
> My script "transition_filter.py" starts with the follow
[Michal Kwiatkowski]
> I was just wondering...
>
> Python 2.3.5 (#2, Mar 6 2006, 10:12:24)
> [GCC 4.0.3 20060304 (prerelease) (Debian 4.0.2-10)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import timeit
> >>> a = timeit.Timer('2**1')
> >>> b = t
thanks for the info, i will likely use the first link you posted with
the async module just to get it going, but i want to learn more about
twisted for later. there is even an O'Reilly book on it i see.
thanks for the tips,
sk
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
"Sandra-24" <[EMAIL PROTECTED]> wrote:
>Now that is a clever little trick. I never would have guessed you can
>assign to __class__, Python always surprises me in it's sheer
>flexibility.
That's because you're still thinking in OO terms.
--
http://mail.python.org/
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
>i think it may be,
Moral: don't use arbitrary values as booleans.
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
I was just wondering...
Python 2.3.5 (#2, Mar 6 2006, 10:12:24)
[GCC 4.0.3 20060304 (prerelease) (Debian 4.0.2-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import timeit
>>> a = timeit.Timer('2**1')
>>> b = timeit.Timer('112233445566778899
Take a look at the newgroup archives over the last week or two - there
seem to have been a glut of people coming from Java to Python and
asking the same sort of questions. There were some links to a bunch of
Python 'gotcha' pages which will be useful.
For my part, I came from Java to Python, and f
Tim Peters wrote:
> [Robert Kern]
>
>>...
>>ph3 = math.atan( ac3.imag / ac3.real )
>>...
>
> Don't do that: atan2 is the correct way to compute the angle, because
> the signs of both inputs are needed to determine the correct quadrant.
> So do:
>
> ph3 = math.atan2(ac3.imag, ac3.real)
Roy Smith wrote:
> In article <[EMAIL PROTECTED]>, Sambo <[EMAIL PROTECTED]>
> wrote:
>
>
>>I have the following module:
>>---
>>import math
>>
>>def ac_add_a_ph( amp1, ph1, amp2, ph2 ):
>>
>>amp3 = 0.0
>>ph3 = 0.0
>>ac1 = ( 0, 0j )
>>ac2 = ( 0, 0j )
would
isinstance(value,(type(None),str,int,float,bool))
be enough? This yields true if the type value is in the list of type
objects given as second argument, or a subtype of one of them. What,
however, do you mean with "I care about the value only, and not its
class method"?
--
http://mail
In article <[EMAIL PROTECTED]>,
"Eli" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to check whether a value is a scalar. A scalar can be:
> - None (null)
> - string
> - number (integer, float)
> - boolean
> How can I validate a value is one of these types?
>
> I care about the value only, and no
Thanks for all your answer!
Of course, I wanted to assign the outcome of the split(), not to
iterate
over them. Thinks are done so easy in python that, sometimes, one
does not even notice that one actually does them ;-)
Cheers,
- harold -
--
http://mail.python.org/mailman/listinfo/python-list
PAolo>any comment, suggestion? Is there something not elegant?<
Here you can see many little differences, some of them reflect just my
style, but some other of them are Python standard style guidelines:
even = []
odd = []
for i in xrange(1, 10):
if i % 2:
odd.append(i)
Like this ?
http://aspn.activestate.com/ASPN/Mail/Message/python-list/1304518
Philippe
vduber6er wrote:
> I have a C program that calls my python script by
>
> exec_pycode(code);
>
> code = "import CheckFasta\nCheckFasta.CheckFasta (\"sampledata.txt\",
> %d)\n", PyNum);
>
> CheckFasta.p
Hi,
I want to check whether a value is a scalar. A scalar can be:
- None (null)
- string
- number (integer, float)
- boolean
How can I validate a value is one of these types?
I care about the value only, and not its class methods.
An object is not a scalar, since it's not a simple value.
An array
[Roy Smith]
> I certainly agree about using atan2() instead of atan(), but I'm surprised
> there's not an easier way to get the phase of a complex, just like abs()
> gives you the modulus. I can see why you wouldn't want to pollute the
> global namespace with another built-in just for this purpose
Ant wrote:
> Fair enough. I've just found this as well, which implies that lambda
> isn't being killed off in 3.0:
>
> http://www.python.org/dev/peps/pep-3100/
>
> In particular:
> "Lambdas will have to be parenthesized [23]"
>
Also: http://www.python.org/doc/essays/ppt/accu2006/Py3kACCU.ppt
s
PAolo wrote:
> any comment, suggestion? Is there something not elegant?
Try this:
even = range(10)[0::2]
odd = range(10)[1::2]
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
"Tim Peters" <[EMAIL PROTECTED]> wrote:
> [Robert Kern]
> > ...
> > ph3 = math.atan( ac3.imag / ac3.real )
> > ...
>
> Don't do that: atan2 is the correct way to compute the angle, because
> the signs of both inputs are needed to determine the correct quadran
I started a long email to a friend about how to get up and running on
Python, then I thought, why not make something I can post?
It's NOT a tutorial. Just a specific, narrow, quick installation guide
for Windows XP users.
Would love comments, but probably can't incorporate them until Monday,
beca
No substantive problems. The str() calls are unnecessary, print calls
list.__str__ already. You can replace the loop with list comprehensions or
slices. Same result, a bit more succinct. See these pages for more:
http://docs.python.org/lib/typesseq.html
http://docs.python.org/tut/node7.html
Hi,
I wrote this small example to illustrate the usage of lists:
even=[]
odd=[]
for i in range(1,10):
if i%2:
odd.append(i)
else:
even.append(i)
print "odd: "+str(odd)
print "even: "+str(even)
numbers=even
numbers.extend(odd)
print "numbers:"+str(
Did you try mplot3D ?
http://www.scipy.org/Wiki/Cookbook/Matplotlib/mplot3D
-- N
--
http://mail.python.org/mailman/listinfo/python-list
[Robert Kern]
> ...
> ph3 = math.atan( ac3.imag / ac3.real )
> ...
Don't do that: atan2 is the correct way to compute the angle, because
the signs of both inputs are needed to determine the correct quadrant.
So do:
ph3 = math.atan2(ac3.imag, ac3.real)
instead.
--
http://mail.python.o
Thanks a lot, Alex and Gerard.
I am actually not very concerned about the
inter-dependency of the floating numbers generated
randomly. They are good enough if they are subject to
the constraint of summing up to 1.
It is simply not worth the time to get an HMM by
training it on a large corpus.
Now that is a clever little trick. I never would have guessed you can
assign to __class__, Python always surprises me in it's sheer
flexibility.
In this case it doesn't work.
TypeError: __class__ assignment: only for heap types
I suspect that's because this object begins its life in C code.
The
Em Sáb, 2006-04-22 às 15:14 -0400, Sambo escreveu:
> when I import it (electronics) in python.exe in windows2000 and
> try to use it, it croaks. ???
$ python2.4
Python 2.4.3 (#2, Mar 30 2006, 21:52:26)
[GCC 4.0.3 (Debian 4.0.3-1)] on linux2
Type "help", "copyright", "credits" or "license" for m
http://dirtsimple.org/2004/12/python-is-not-java.html
http://dirtsimple.org/2004/12/java-is-not-python-either.html
http://dirtsimple.org/2004/12/python-interfaces-are-not-java.html
This link seems to be down at the moment.
http://naeblis.cx/rtomayko/2004/12/15/the-static-method-thing
The above a
Sambo wrote:
> I have the following module:
> ---
> import math
>
> def ac_add_a_ph( amp1, ph1, amp2, ph2 ):
>
> amp3 = 0.0
> ph3 = 0.0
> ac1 = ( 0, 0j )
> ac2 = ( 0, 0j )
> ac3 = ( 0, 0j )
>
Sambo <[EMAIL PROTECTED]> wrote:
> I have the following module:
> ---
> import math
>
> def ac_add_a_ph( amp1, ph1, amp2, ph2 ):
>
> amp3 = 0.0
> ph3 = 0.0
> ac1 = ( 0, 0j )
> ac2 = ( 0, 0j )
> ac3 = ( 0, 0j )
You're defining ac1, ac2, ac3 as tup
In article <[EMAIL PROTECTED]>, Sambo <[EMAIL PROTECTED]>
wrote:
> I have the following module:
> ---
> import math
>
> def ac_add_a_ph( amp1, ph1, amp2, ph2 ):
>
> amp3 = 0.0
> ph3 = 0.0
> ac1 = ( 0, 0j )
> ac2 = ( 0, 0j )
>> Does Perl have something like Python's repr() function?
Mirco> Have a look at this:
...
Thanks, I'm getting set up to try it just for the exercise. I went with
John Lee's Data::Dumper suggestion simply because I already had it installed
and have neither String::Escape nor Inlin
>> Does Perl have something like Python's repr() function?
John> perldoc Data::Dumper
Thanks. Just what the doctor ordered (after setting Useqq).
Skip
--
http://mail.python.org/mailman/listinfo/python-list
I have the following module:
---
import math
def ac_add_a_ph( amp1, ph1, amp2, ph2 ):
amp3 = 0.0
ph3 = 0.0
ac1 = ( 0, 0j )
ac2 = ( 0, 0j )
ac3 = ( 0, 0j )
ac1 = complex( amp1 * math.cos( mat
robert wrote:
> Yes - start them explore. I'd not want to be "teached" a specific
> _language_ in a course longer that one day. A language cannot be teached.
> Who of the posters in this thread want themselves to be _teached_ more
> than one day on a language?
>
> Isn't the fun, finding the ri
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
harold wrote:
> Thank you Gerard.
> This must be the problem. Now I can get it working.
Good! I got confused thinking about it too, but I think you just had
one loop too many.
for line in sys.stdin :
try :
a,b,c,d = line.split()
not:
for line in sys.stdin :
try :
for a
Em Sáb, 2006-04-22 às 14:25 -0300, Felipe Almeida Lessa escreveu:
> Em Sáb, 2006-04-22 às 09:21 -0700, harold escreveu:
> > for line in sys.stdin :
> > try :
> > for a,b,c,d in line.split() :
> > pass
> >
> > except ValueError , err :
> > print line.split()
> >
>> I would like a given module to be created as an
>> instance of that particular subclass on import, so that if I do:
>>
>> import foo
>> type(foo)
>>
>> I get instead of .
>>
>> Is there any way to effect this? Something like __metaclass__
>> = ... but
>> at the beginning of a module instead
harold:
>A similar error happens in an interpreter session, when typing
for line in ["1 2 3 4"] :
>...for a,b,c,d in line.split() :
>...pass
>...
>Traceback (most recent call last):
> File "", line 2, in ?
>ValueError: need more than 1 value tyo unpack
>
>maybe this might help to
Em Sáb, 2006-04-22 às 09:21 -0700, harold escreveu:
> for line in sys.stdin :
> try :
> for a,b,c,d in line.split() :
> pass
>
> except ValueError , err :
> print line.split()
> raise err
Try this:
for a, b, c, d in sys.stdin:
print a, b, c, d
-
Thank you guys, you are great!
--
http://mail.python.org/mailman/listinfo/python-list
Michael Yanowitz wrote:
> How about having something from Monty Python in the logo rather
>than something snakelike. Python was named after Monty Python and not
>the snake. Snakes also don't appear friendly to me.
>
I think the new logo, while professionally done (bravo!) is
unmemmorable. And
Thank you Gerard.
This must be the problem. Now I can get it working.
--
http://mail.python.org/mailman/listinfo/python-list
Rene Pijlman schrieb:
> harold:
> >The output (when given the data I want to parse) is:
>
> If you'd told us that data, and told us what version of Python you're
> using, we could have reproduced the problem to look into it.
>
Thank you for the answers and sorry that I did not provide more
inform
harold wrote:
> Dear all,
>
> Maybe I stared on the monitor for too long, because I cannot find the
> bug ...
> My script "transition_filter.py" starts with the following lines:
>
> import sys
>
> for line in sys.stdin :
> try :
> for a,b,c,d in line.split() :
> pass
>
>
harold:
>The output (when given the data I want to parse) is:
If you'd told us that data, and told us what version of Python you're
using, we could have reproduced the problem to look into it.
>ValueError: need more than 3 values to unpack
>
>Why does python think that I want to unpack the outcom
> for a,b,c,d in line.split() :
>
[snip]
>
> The output (when given the data I want to parse) is:
> ['0.0','1','0.04','0']
You'll notice that you're not passing any parameters to
split(). By default, it splits on whitespace, and your
input doesn't have any whitespace in it. Thus, you'
[EMAIL PROTECTED]:
>i have a script that waits for message packets from a data server over
>a socket.
Using what network protocol?
>it works fine for a while, but the server requires that i send a
>heartbeat ping every 600 seconds or it will terminate the connection.
[...]
>should i do this with
Dear all,
Maybe I stared on the monitor for too long, because I cannot find the
bug ...
My script "transition_filter.py" starts with the following lines:
import sys
for line in sys.stdin :
try :
for a,b,c,d in line.split() :
pass
except ValueError , err :
pri
Can you be more specific? Which module do you mean at python.org?
Stani
--
http://mail.python.org/mailman/listinfo/python-list
Mike,
Excellent artwork!
I don't like reinventing the wheel so I propose we reuse someone else's
work.
I propose something like:
http://www.dvdweb.co.uk/reviewgfx/bompfc1.jpg
which symbolizes Python's ability to quickly implement many coding
ideas or:
http://www.phill.co.uk/comedy/python/pyth
of course!
your can be carefully if you do it.
but why you ask some here ? in http://www.python.org completly a module
for your problem
look and try again!
[roRoNoaZoro]
--
http://mail.python.org/mailman/listinfo/python-list
hey there,
i have a script that waits for message packets from a data server over
a socket.
it goes a little like this:
while 1:
x+=1
databack = sockobj.recv(158)
if databack:
print 'caught a message %s bytes ' % len(databack)
if len(databa
Greetings Group!
I'm trying to do a project for my CS class. I'm using this program
from Mark Guzdial Jython text:
def echoes(snd, delay, factor):
sound1 = makeSound(snd)
sndlen1 = getLength(sound1)
sndlen2 = sndlen1 + (delay * factor)
sound2 =decideLen(sound1, sndlen2) # this function
Clodoaldo Pinto wrote:
> I know how to format strings using a dictionary:
>
> >>> d = {'list':[0, 1]}
> >>> '%(list)s' % d
> '[0, 1]'
>
> Is it possible to reference an item in the list d['list']?:
>
> >>> '%(list[0])s' % d
> Traceback (most recent call last):
> File "", line 1, in ?
> KeyError:
I have found the way to solve .
So long as alter and establish reading account number and password of
the database , finish.
Thank you very mush.
--
http://mail.python.org/mailman/listinfo/python-list
Gerard Flanagan wrote:
> Gerard Flanagan wrote:
> > Anthony Liu wrote:
> > > I am at my wit's end.
> > >
> > > I want to generate a certain number of random numbers.
> > > This is easy, I can repeatedly do uniform(0, 1) for
> > > example.
> > >
> > > But, I want the random numbers just generated s
[EMAIL PROTECTED] enlightened us with:
> ?z?n?A
> ?O?o?A?e???b???s "Mining Google Web Services
>: Building Applications with
> the Google API"[EMAIL PROTECTED] 6??"Using SQL Server as a
> Database"??
> ?M?B?A???q???w?g?w??SQL Server 2000
> sp4?A?b?d???{?A.net?X
I think by "regular expressions" you mean "expressions". "regular
expressions" are what you get from "import re" .
mt
--
http://mail.python.org/mailman/listinfo/python-list
Clodoaldo Pinto wrote:
> I know how to format strings using a dictionary:
>
d = {'list':[0, 1]}
'%(list)s' % d
> '[0, 1]'
>
> Is it possible to reference an item in the list d['list']?:
>
'%(list[0])s' % d
> Traceback (most recent call last):
> File "", line 1, in ?
> KeyError:
[EMAIL PROTECTED] wrote:
> I found that multi-threaded program(io-centralize ) runs very slowly
> on linux while the same program runs very quickly on windows.If I
> change the thread number to one ,the program runs quickly on linux, in
> fact the speed is quicker than the multi-threaded vers
i think it may be,
i am just doing a while 1: loop to just wait for whatever comes in.
thanks
--
http://mail.python.org/mailman/listinfo/python-list
I know how to format strings using a dictionary:
>>> d = {'list':[0, 1]}
>>> '%(list)s' % d
'[0, 1]'
Is it possible to reference an item in the list d['list']?:
>>> '%(list[0])s' % d
Traceback (most recent call last):
File "", line 1, in ?
KeyError: 'list[0]'
Regards, Clodoaldo Pinto
--
htt
Hi,
I'm creating a GUI program
with wxPython which will be distributed for Mac and Windows. The
audience of the program is not technical at all (eg they've never
heard about Python yet ;-), so everything should go automatically. The
program should be able to update itself and to update its databa
Hi skip
> Sorry to ask a Perl question here, but... Does Perl have something like
> Python's repr() function? I want to print out a string and have CR print as
> \r, LF as \n, etc. I looked in the Perl/Python phrasebook:
Have a look at this:
# cmp_rep.pl --- #
#!/usr/bin/perl
I found that multi-threaded program(io-centralize ) runs very slowly
on linux while the same program runs very quickly on windows.If I
change the thread number to one ,the program runs quickly on linux, in
fact the speed is quicker than the multi-threaded version .
It turns out that python'
[EMAIL PROTECTED] writes:
> Sorry to ask a Perl question here, but... Does Perl have something like
> Python's repr() function? I want to print out a string and have CR print as
> \r, LF as \n, etc. I looked in the Perl/Python phrasebook:
>
> http://wiki.python.org/moin/PerlPhrasebook
>
>
Wildemar> Are there any concepts that python has not borrowed, concepts
Wildemar> that were not even inspired by other languages?
I'd say Guido's willingness to borrow heavily from the best ideas present in
other languages ranks right up there as one of its key concepts.
Skip
--
http://
Sorry to ask a Perl question here, but... Does Perl have something like
Python's repr() function? I want to print out a string and have CR print as
\r, LF as \n, etc. I looked in the Perl/Python phrasebook:
http://wiki.python.org/moin/PerlPhrasebook
but saw nothing along those lines.
Thx,
Michael Spencer wrote:
> Alternatively, you could edit visitName to allow 'True' and any other
> identifiers you specify e.g. (untested):
>
> allowed = {"True": True, "False": False}
> def visitName(self,node, **kw):
> try:
> return self.allowed[node.name]
> e
Alex Martelli wrote:
> > But Now You've Violated The DRY Principle!!!
>
> Just as with any other unrolled loop, yes -- loop unrolling is an
> optimization which is based exactly on exchanging some textual
> repetition for a tiny bit more speed.
I had hoped that the Unusual Capitalization would ha
There is my version too:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438599
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Edward Elliott wrote:
> Alex Martelli wrote:
>
>> While Mozart appears cool, I really think that a wider variety of
>> languages would help -- some machine code (possibly abstract a la
>> Mixal), C (a must, *SO* much is written in it!), at least one of C++, D,
>> or ObjectiveC, either Scheme or L
ToddLMorgan wrote:
> I'm just starting out with python, after having a long history with
> Java. I was wondering if there were any resources or tips from anyone
> out there in Python-land that can help me make the transition as
> successfully as possible? Perhaps you've made the transition yoursel
In article <[EMAIL PROTECTED]>,
"gangesmaster" <[EMAIL PROTECTED]> wrote:
>as we all know, * (asterisk) can be used to "inline" or "flatten" a
>tuple into an argument list, i.e.:
>
>def f(a, b, c):
>...
>x = (1,2,3)
>f(*x)
>
>so... mainly for symmetry's sake, why not make a "flattening" opera
In article <[EMAIL PROTECTED]>,
Ralf Muschall <[EMAIL PROTECTED]> wrote:
>Christos Georgiou wrote:
>> ... that I can sing to my newborn son (actually, born yesterday)?
>
>...but the baby probably won't see the difference.
Boy, some people do take the "born yesterday" bit to heart. don't they.
:
In article <[EMAIL PROTECTED]>,
Felipe Almeida Lessa <[EMAIL PROTECTED]> wrote:
>"list(set(x))" is the clear winner with almost O(1) performance.
Moral: in an interpreted language, use builtins as much as possible.
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Paul Sijben <[EMAIL PROTECTED]> wrote:
>I found that the problem was caused by the sending thread not giving
>control back quickly enough to the receiving thread.
>
>Also in going through the code I found an old self.s.setblocking(0)call
>that was no longer relevan
Zachary Pincus wrote:
> Hi folks,
>
> I'm sure this has come up before, but the search terms I've been using
> are so non-specific that I can't get any traction on Google.
>
> Here's my question:
> I have written a subclass of ModuleType that handles lazy loading of
> some slow resources. I
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (John J. Lee) wrote:
>"No," scolded Yoda. "Do, or do not. There is no try."
Convincing argument against exceptions, don't you think. :)
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
>databack = sockobj.recv(1028)
>if databack:
> print 'caught a message %s bytes ' % len(databack)
>else:
> print 'fail to recieve data from server'
>
>the output in the terminal runs fine until it fails to get the
>databack, it
In article <[EMAIL PROTECTED]>,
David Hirschfield <[EMAIL PROTECTED]> wrote:
>When I attempt to perform a file operation on a non-existent file, I get
>an OSError: [Errno 2], but what if I want to raise one of those myself?
raise OSError(2, "No such file or directory")
--
http://mail.python.or
In article <[EMAIL PROTECTED]>,
"ToddLMorgan" <[EMAIL PROTECTED]> wrote:
>Are there python specific equivalents to the common Patterns,
>Anti-Patterns and Refactoring books that are so prevalent as
>reccomended reading in C++ and Java?
I don't think they exist. Such books are targeted more towar
In article <[EMAIL PROTECTED]>,
"ToddLMorgan" <[EMAIL PROTECTED]> wrote:
>I'm looking for the common types of mistakes that say a Java/C# or
>even C++ developer may commonly make.
Using subclassing when you don't have to. For instance, you might have a
Java method which takes an argument of typ
In article <[EMAIL PROTECTED]>,
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>On Fri, 21 Apr 2006 16:13:53 -0700, "Carl J. Van Arsdall"
><[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>> Lawrence D'Oliveiro wrote:
>> >
>> > Six words: copyright violation ... trademark violatio
Gaz:
> Right now im trying to dl Jython (SF.net server down?), if it's
> language sintaxis is just like Python and allows to use numpy and PIL,
> im in! (i think :) )
I don't think you can do that, but you can create and show images
anyway (and maybe read the pointer position too).
Sorry for the "
Hello!
I tried to use this class in my work. But I Can't understand the next.
I have an XML file, where I store an information by this way
Wesley
Hunter ie.
How can I get the value between and ?
Thanks in advance.
aum wrote:
> Hi folks,
>
> I've just released an XML object wrapper called XMLO
Gerard Flanagan wrote:
> Anthony Liu wrote:
> > I am at my wit's end.
> >
> > I want to generate a certain number of random numbers.
> > This is easy, I can repeatedly do uniform(0, 1) for
> > example.
> >
> > But, I want the random numbers just generated sum up
> > to 1 .
> >
> > I am not sure h
Anthony Liu wrote:
> I am at my wit's end.
>
> I want to generate a certain number of random numbers.
> This is easy, I can repeatedly do uniform(0, 1) for
> example.
>
> But, I want the random numbers just generated sum up
> to 1 .
>
> I am not sure how to do this. Any idea? Thanks.
>
---
1 - 100 of 103 matches
Mail list logo