Ross Ridge wrote:
> Nonetheless, Cygwin applications are not generally considered native
> Win32 applications because of the dependency on CYGWIN1.DLL and the
> related environment. While what you're saying a strictly true, the
> term "native Win32" is used to make a distinction between a port of
print '127.0.0.1'
:-P
--
http://mail.python.org/mailman/listinfo/python-list
[Please don't top-post]
Steven Bethard wrote:
> Panos Laganakos wrote:
>> we usually define private properties and provide public functions
>> to access them, in the form of:
>> get { ... } set { ... }
>>
>> Should we do the same in Python:
>>
>> self.__privateAttr = 'some val'
>>
>> def
I have some data and I need to put it in a list in a particular way. I
have that figured out but there is " stuff " in the data that I don't
want.
Example:
10:00am - 11:00am: The
Price Is Right
All I want is " Price Is Right "
Here is the re.
findshows =
re.compile(r'(\d\d:\d\d\D\D\s-\s\d\d:\
it now comes up with the error message
Traceback (most recent call last):
File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
return self.func(*args)
File "C:\Documents and Settings\chris\Desktop\Python\client.py", line
30, in sendMessage
self.sendLine("Test")
AttributeErr
Why is that ? to me it makes sense when I see self.__m_var that I'm dealing
with a member variable taht derived classes will not see/access.
Philippe
Steven Bethard wrote:
> Panos Laganakos wrote:
>> we usually define private properties and provide public functions
>> to access them, in the f
Question background: I've been using Python as my primary language for several years now and have done all my non-trivial development in Python. I've now got a Mac and want to do some development using the Core * features in OS X in ObjC. I know I could use the PyObjC bindings, but ObjC seems to
"gene tani" <[EMAIL PROTECTED]> wrote:
>
> John Bokma wrote:
>> Roedy Green <[EMAIL PROTECTED]> wrote:
>>
>> I leave that up to Xah's ISP/USP and hosting provider to decide :-D
>
> he's solidified position as top troll of 2003-2006
Maybe because people rather post a reply instead of sending an
Tim,
Greatly appreciate your help. You are right - the functions work
from the list; i don't actually need the string with events.
Thanks again - great list and great people...
Val
--
http://mail.python.org/mailman/listinfo/python-list
Hi Kent,
Thanks. Great help. It does work now,
and with expressions as well.
my very best,
Val
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> On 27/04/2006 10:38 AM, val bykoski wrote:
> > Hi The List:
> > I have a modeling app where i'm detecting events (in temporal
> > dynamics) applying a set of (boolean) functions - kind of:
> >
> > event_list = "f1 f2 etc".split() # each fi detects a specific event
> > i have
Panos Laganakos wrote:
> we usually define private properties and provide public functions
> to access them, in the form of:
> get { ... } set { ... }
>
> Should we do the same in Python:
>
> self.__privateAttr = 'some val'
>
> def getPrivateAttr(self):
> return self.__privateAttr
>
> Or th
[EMAIL PROTECTED]
> I see a C/python program that we're using spending a lot of time in
> this function, far more than we think it should. What is it?
PyEval_EvalFrame is the heart of the CPython interpreter: it's a very
large function that _implements_ the interpreter, marching through the
byte
Panos Laganakos wrote:
> i.e. we usually define private properties and provide public functions
> to access them, in the form of:
> get { ... } set { ... }
>
> Should we do the same in Python:
>
> self.__privateAttr = 'some val'
>
> def getPrivateAttr(self):
> return self.__privateAttr
>
>
basically, you can create new types on the fly using type() with three
arguments:
my_class = type("className",(BaseClass,),class_dict)
then, you can assign this vlass to the golbal namespace using
globals():
globals()["className"] = my_class
In your case, you would need to populate the class_di
Chris wrote:
> hehe, works a charm, cheers mate.
Beware that if you have a different entry in your hosts file you can match a
different name.
Test it:
- add "127.0.0.2yourhost.yourdomain yourhost" to /etc/hosts
- rerun the code.
You'll see "127.0.0.2" as the result. So take that into acco
I've been thinking if there's a point in applying some specific OOP
techniques in Python as we do in other languages.
i.e. we usually define private properties and provide public functions
to access them, in the form of:
get { ... } set { ... }
Should we do the same in Python:
self.__privateAttr
For a listbox, I would give a width and go with string
formatting. In your case, I guess that what I'll do is
to limit the width to something acceptable, and show
only the tail of the line.
Say, your width is w, then I'll show only the last w-4
chars, preceded by '... ' (ellipsis+space). It might
In article <[EMAIL PROTECTED]>,
NavyJay <[EMAIL PROTECTED]> wrote:
>For such a simple task, I would use MATLAB.
>http://www.mathworks.com/products/matlab/
.
[pertinent Python comments]
.
.
... and some people wo
Generate your function as a string. Be careful to
indent correctly and append \n at line's end. Then
execute the string with exec(name_of_string). Then
edit your string as necessary, and execute again.
An example follows, directly from one of my projects:
# create a "function" to apply on
I see a C/python program that we're using spending a lot of time in
this function, far more than we think it should. What is it?
Thanks in advance! There seems to be nothing (but a bunch of stack
traces) when I google this.
Brett
--
http://mail.python.org/mailman/listinfo/python-list
It doesn't think you're on an intel box, it thinks you want to compile
universal libraries, since you installed a universal python.
The problem is likely to be that you haven't installed SDK's for intel
as well as powerpc when you installed Apple's Developer Tools. Do that,
and it should work ...
Hello all,
I have released version 0.6 of my functional module, a collection of
higher-order and functional programming tools for Python. Currently
offered are tools for function composition, partial function
application, plus flip, foldl, foldr, scanl and scanr functions.
Two version of the rele
Ian Bicking wrote:
> I got a puzzler for y'all. I want to allow the editing of functions
> in-place. I won't go into the reason (it's for HTConsole --
> http://blog.ianbicking.org/introducing-htconsole.html), except that I
> really want to edit it all in-process and in-memory. So I want the
> id
Julien Fiore wrote:
> Thanks for your remark, Sturlamolden.
>
> Is there a free version of the "Visual C++ 2003" compiler available on
> the web? I have found "Visual C++ 2005 Express edition"
> (http://msdn.microsoft.com/vstudio/express/visualc/). According to
> Micrsoft, it replaces VC++2003
> (
Michele Petrazzo wrote:
>
import FreeImagePy as FIPY lst_names = ("/tmp/f1.png",
"/tmp/f2.jpg") F = FIPY.freeimage() F.convertToMultiPage(lst_names,
"out.tif", FIPY.FIF_TIFF)
> (0, 'All ok!! File saved on out.tif')
>
Sorry for this bad copy/paste/thunderbird :)
>>> import FreeI
Iain King wrote:
<-cut pytiff->
> (or alternatively tell me how to get PIL to save a multipage tiff).
>
PIL can't.
If you need to work with multi-page images (tiff and others), you can
use freeimagepy (freeimagepy.sf.net)
>>> import FreeImagePy as FIPY lst_names = ("/tmp/f1.png",
>>> "/tmp/f2
I installed the Universal Mac OSX binary for Python 2.4.3
When I execute 'python setup.py install' for any of my applications
that I need to build, I get errors like the following:
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -
fno-strict-aliasing -Wno-long-double -no-cpp-
Hi,
I thought it would be nifty to create a class that created other classes for
me. The method below shows what I would like to do. The problem is that the
class the method creates is local to the method. Is it possible to make the
class visible in the global scope so I can import the module s
In article <[EMAIL PROTECTED]>,
Alex Martelli <[EMAIL PROTECTED]> wrote:
><[EMAIL PROTECTED]> wrote:
> ...
>> Brett Cannon's thesis in which he tweaks the compiler and shows that
>> type-defing python would not help the compiler achieve a 5% performace
>> increase.
>>
>> Brett Cannon, "Localized
Chris wrote:
> Exception in Tkinter callback
> Traceback (most recent call last):
> File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
> return self.func(*args)
> TypeError: unbound method sendMessage() must be called with ChatFactory
> instance as first argument (got nothing i
If you are opening a file for read and write access use "rb+" or "wb+".
Seeking and subsequent read/write will then work fine. Without the "b",
Windows opens the file in its "text" mode. Don't seek on files opened
in "text" mode.
--
http://mail.python.org/mailman/listinfo/python-list
Does anyone have a link for a compiled-for-windows version of pytiff?
(or alternatively tell me how to get PIL to save a multipage tiff).
Iain
--
http://mail.python.org/mailman/listinfo/python-list
eicwo01 wrote:
> Without to know the names, is it possible to dump all attributes of a
> com object?
> from win32com.adsi import *
from module import * is Bad(tm)
> objDom = ADsOpenObject("LDAP:/ ...
> print ???"all attributes"??? of objDom
Look at dir() and the inspect module.
--
bruno dest
Does anybody have experiences of Python and ILOG Server (distribution
framework) integration?
I need to access to a server application "exposed" through ILOG Server.
Thanks
Vieri
--
http://mail.python.org/mailman/listinfo/python-list
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
return self.func(*args)
TypeError: unbound method sendMessage() must be called with ChatFactory
instance
as first argument (got nothing instead)
I have simplifie
hehe, works a charm, cheers mate.
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> Firstly, this should be 'content.xml', not 'contents.xml'.
Right, the code doesn't do *anything* :-( Thanks for pointing that out.
At least it doesn't do much harm either :-|
> Secondly, as pointed out by Sergei, the data is encoded by OOo as UTF-8
> e.g. what is '\x94' in
Without to know the names, is it possible to dump all attributes of a
com object?
from win32com.adsi import *
objDom = ADsOpenObject("LDAP:/ ...
print ???"all attributes"??? of objDom
Thanks
Wolfgang
--
http://mail.python.org/mailman/listinfo/python-list
One way:
>>> import socket
>>> socket.getaddrinfo(socket.gethostname(), None)[0][4][0]
It was the first google hit
--
http://mail.python.org/mailman/listinfo/python-list
Chris schrieb:
> How do I find and print to screen the IP address of the computer my
> python program is working on?
>
IP adresses are bound to network interfaces not to computers.
One Computer can have multiple network interfaces.
--
Servus, Gregor
http://www.gregor-horvath.com
--
http://
Panos Laganakos <[EMAIL PROTECTED]> wrote:
> Is there some other practice than reading all the strings and slicing
> them later?
>
> They're stored in the form of:
> List Group[10]:
> char[17] name;
>
> So I thought of doing:
> unpacked = unpack('%s' % (10*17), data)
>
> And then slicing th
Micah wrote:
> I'm looking for a simple tree implementation: 0-n children, 1 root.
> All the nice methods would be appreciated (getLeaves, isLeaf, isRoot,
> depthfirst, breadthfirst,...) That's really all I need. I could code
> one up, but it would take time to debug, and i'm really short on tim
How do I find and print to screen the IP address of the computer my
python program is working on?
--
http://mail.python.org/mailman/listinfo/python-list
Hi all
I can not write anything if I have read something.
the code as:
Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)]
on win32
IDLE 1.1.3
>>> a=open('d:\\a','r+')
>>> a
>>> a.read()
'11\n22\n33\n'
>>> a.seek(0)
>>> a.read(1)
'1'
>>> a.write("a")
>>> a.seek(0)
>>> a.read()
Fredrik Lundh wrote:
> Øyvind Østlund wrote:
>
> > I am trying to visit a limited amount of web pages that requires cookies. I
> > will get redirected if my application does not handle them. I am using
> > urllib.urlopen() to visit the pages right now. And I need a push in the
> > right direction
Hello List,
I'm very beginner on programming, I''m studing some fix on the Bluez's
bluepin, which is rather vague to control the given input.
Code /start:
=
def main(*args):
if len(sys.argv) < 2:
print "ERR"
sys.exit
Fredrik Lundh wrote:
> Diez B. Roggisch wrote:
>
>> This is not to discourage you - just don't expect people to greet you as
>> the next messiah who finally brought one of CS most fundamental data
>> structures to Python... :)
>
> xml.etree was added to Python 2.5 before christmas :-)
Can't wai
Peter Otten wrote:
(snip)
>
> Can you cheat and just assign another known good func_code object?
def hello(): print "hello"
> ...
def world(): print "world"
> ...
def use_it(hello=hello, world=world):
> ... hello()
> ... world()
> ...
use_it()
> hello
> world
world.func
bruno at modulix wrote:
> Thomas Guettler wrote:
>
>>Hi,
>>
>>I like python because it is compatible to old versions. That's way I think
>>string exceptions should not be deprecated.
>>
>>I use string exceptions if the condition for an assertion is
>>to complex:
>>
>>if foo and bar and i>10:
>>
"Chris" wrot:
> Sorry. The error message is normally AttributeError: 'NoneType' object
> has no attribute 'sendLine'"
please post the *entire* traceback, including the part that lists
filenames, line numbers, and source code lines.
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Guettler wrote:
> Hi,
>
> I like python because it is compatible to old versions. That's way I think
> string exceptions should not be deprecated.
>
> I use string exceptions if the condition for an assertion is
> to complex:
>
> if foo and bar and i>10:
> raise "if foo and bar i must
You could also use the "assert" statement:
>>> if foo and bar:
... assert i <= 10, "if foo and bar then i must not be greater than
10"
...
--
http://mail.python.org/mailman/listinfo/python-list
Sorry. The error message is normally AttributeError: 'NoneType' object
has no attribute 'sendLine'"
[EMAIL PROTECTED] wrote:
> Posting that error message would be helpful
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I like python because it is compatible to old versions. That's way I think
string exceptions should not be deprecated.
I use string exceptions if the condition for an assertion is
to complex:
if foo and bar and i>10:
raise "if foo and bar i must not be greater than 10"
This way I can e
Øyvind Østlund wrote:
> I am trying to visit a limited amount of web pages that requires cookies. I
> will get redirected if my application does not handle them. I am using
> urllib.urlopen() to visit the pages right now. And I need a push in the
> right direction to find out how to deal with page
Posting that error message would be helpful
--
http://mail.python.org/mailman/listinfo/python-list
I have to use a Listbox that shows a list of entries. Every entry is a
char string quite long in size and I cannot set "width" to a large
value due to limitations of screen resolution. The rightmost part is
more important, so I thought that I could show only the end of the
string by aligning the fi
Fredrik Lundh wrote:
> Gerard Flanagan wrote:
>
> > I'm trying to find a webpage I remember reading which contained a
> > layman's description of how Python binds names to objects. It used some
> > ASCII-art illustrations where an arrow represented a 'binding'. Anyone
> > got a link for that? (Go
Unfortunately I'm familiar with the generator concept, I'll look into
it though, 'cause it saved me at least once already :)
Thanks mate.
--
http://mail.python.org/mailman/listinfo/python-list
On 27 Apr 2006 02:35:50 -0700, Leonardo da Vinci
<[EMAIL PROTECTED]> wrote:
> Greetings gentlemen and ladies,
> I have a question: in Tkinter, how to align a Listbox entry (i.e. a
> line of text) to the right?
In a real Listbox, the answer is simple: you can't.
What are you trying to do? Maybe
Schüle Daniel wrote:
> and now the obvious one (as I thought at first)
>
> >>> lst=[]
> >>> for i in range(10):
> ... lst.append(lambda:i)
> ...
> >>> lst[0]()
> 9
> >>> i
> 9
> >>>
>
> I think I understand where the problem comes from
> lambda:i seems not to be fully evalutated
> it jus
val bykoski wrote:
> Hi The List:
>I have a modeling app where i'm detecting events (in temporal
> dynamics) applying a set of (boolean) functions - kind of:
>
> event_list = "f1 f2 etc".split() # each fi detects a specific event
> i have defs for functions fi, or simple boolean expressions
OK, totally dumb !
g_dict[s] = p
Philippe Martin wrote:
> Hi,
>
> I do not know if there is a way to overload the instantiation of all
> objects in Python but I thought of something like this to fetch any object
> with its name:
>
> g_dict = {}
>
>
> def create_object (v,s):
>p = v
>
Hi,
I do not know if there is a way to overload the instantiation of all objects
in Python but I thought of something like this to fetch any object with its
name:
g_dict = {}
def create_object (v,s):
p = v
g_dict[s] = id(p)
return p
#ex
object = create_object ([1,2,3,4], 'A LIST')
Ph
Is there some other practice than reading all the strings and slicing
them later?
They're stored in the form of:
List Group[10]:
char[17] name;
So I thought of doing:
unpacked = unpack('%s' % (10*17), data)
And then slicing the list by a step of 17.
Is there some way to have unpack return a
On behalf of the Python development team and the Python
community, I'm happy to announce the second alpha release
of Python 2.5.
This is an *alpha* release of Python 2.5. As such, it is not
suitable for a production environment. It is being released to
solicit feedback and hopefully discover bugs,
sturlamolden wrote:
> [...] The problem is actually *licensing issues* related to CYGWIN1.DLL. It
> cannot always be linked. CYGWIN1.DLL can only be used for Open Source
> development. [...]
Of course Redhat offers an alternative license that does not have the
GPL restrictions: http://www.redhat.
Martin v. Löwis wrote:
> > Nonetheless, Cygwin applications are not generally considered native
> > Win32 applications because of the dependency on CYGWIN1.DLL and the
> > related environment.
> - Is winword.exe not a native Win32 library because it uses "MSO.DLL"?
> - A cygwin application does
On Thu, Apr 27, 2006 at 02:48:46AM -0700, [EMAIL PROTECTED] wrote:
> why the output of this code :
> x = 0
> while x < 10:
> z = 0
> print x
> x = x + 1
> while z < x:
> print z,
> z = z + 1
>
> is
>
> 0
> 0 1
> 0 1 2
> 0 1 2 3
> 0 1
Martin v. Löwis wrote:
> > Nonetheless, Cygwin applications are not generally considered native
> > Win32 applications because of the dependency on CYGWIN1.DLL and the
> > related environment.
> - Is winword.exe not a native Win32 library because it uses "MSO.DLL"?
> - A cygwin application does
Martin v. Löwis wrote:
> > Nonetheless, Cygwin applications are not generally considered native
> > Win32 applications because of the dependency on CYGWIN1.DLL and the
> > related environment.
> - Is winword.exe not a native Win32 library because it uses "MSO.DLL"?
> - A cygwin application does
I am trying to visit a limited amount of web pages that requires
cookies. I will get redirected if my application does not handle them.
I am using urllib.urlopen() to visit the pages right now. And I need a
push in the right direction to find out how to deal with pages that
requires cookies. Anyone
Gerard Flanagan wrote:
> I'm trying to find a webpage I remember reading which contained a
> layman's description of how Python binds names to objects. It used some
> ASCII-art illustrations where an arrow represented a 'binding'. Anyone
> got a link for that? (Google's not my friend!)
http://www
TG wrote:
> Hmm ... I'm definitely not a python wizard, but it seems to be quite a
> special case that breaks the rules ...
Yes and no. The primary use case for __new__ was to allow subclassing of
immutable types. array.array is not immutable, but it's still a special
case, in that it enforce typ
Hello
I'm trying to find a webpage I remember reading which contained a
layman's description of how Python binds names to objects. It used some
ASCII-art illustrations where an arrow represented a 'binding'. Anyone
got a link for that? (Google's not my friend!)
Thanks
Gerard
--
http://mail.pyt
Martin v. Löwis wrote:
> That's not how I read it. To me, it says: it can be used by other
> parts of Windows itself (i.e. system-level components), but it is not
> intended to be used by third-party applications (such as Python),
> as these are not system-level components.
That is correct. And
Panos Laganakos wrote:
> What I don't understand is what are you doing with *(...), this is
> supposed to pack its contents as a list?
the *arg form treats each value in the arg sequence as a separate argument.
for example,
arg = 1, 2, 3
function(*arg)
is the same thing as
function
robert wrote:
> When employing complex UI libs (wx, win32ui, ..) and other extension
> libs, nice "only Python stack traces" remain a myth.
>
> Currently I'm hunting again a rare C-level crash bug of a Python based
> Windows app with rare user reports - and still in the dark (I get
> snippets o
Damn! Missed the boat ;-)
--
http://mail.python.org/mailman/listinfo/python-list
Hmm ... I'm definitely not a python wizard, but it seems to be quite a
special case that breaks the rules ... unpythonic, isn't it ?
Has anyone seen a PEP on this subject ?
Just in case a troll reads this message : i'm not saying python sucks
or has huge design flaws here ...
--
http://mail.pyt
Dan Sommers wrote:
> On 27 Apr 2006 02:48:46 -0700,
> [EMAIL PROTECTED] wrote:
>
> > why the output of this code :
> > x = 0
> > while x < 10:
> > z = 0
> > print x
> > x = x + 1
> > while z < x:
> > print z,
> > z = z + 1
>
> > is
>
Hi
Ive been using midipy in my blender3d python scripts on windowsXP, now
im trying to run them from ubuntu and i cant find the midipy.py module
compiled for linux anywhere.
Is it possible to complie it under linux and how would i go about doing
it --or--
Is there another module which does the sam
hi,
I want some simple program for :
timer thread
running program in timer thread
how to get notified when program is closed
Thanks in advance
Regards
Ums
UMASANKAR L.
704-B, SHIVARANJANI APARTMENTS 213, NAGAPRABHA CHAMBERS
ITI LAYOUT, BSK III STAGE 3rd MAIN, 4th CROSS
NEAR
Hallo !!!
I am new in Python and my doubts are basics.I would like to a window appears
when press a button. This window would have only an advise. Therefore it would
be a simple window. I don't know which window to choose.
Thank you.
--oOo
Hi!
I am a new user to python. I want to draw a 2D graph with
coordinates data as input. In the graph i want to fill some area and
also include image maps.
Can any one suggest which is the best library to use and some links for
examples.
Thanks in advance. Your help will be most appreciated.
try something like this:
x = 0
while x < 10:
z = 0
print '-' + str(x) + '-'
x = x + 1
while z < x:
print '.' + str(z) + '.',
z = z + 1
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> why the output of this code :
> x = 0
> while x < 10:
> z = 0
> print x
> x = x + 1
> while z < x:
> print z,
> z = z + 1
>
> is
>
> 0
> 0 1
> 0 1 2
> 0 1 2 3
> 0 1 2 3 4
> 0 1 2 3 4 5
> 0 1 2 3 4 5 6
> 0 1
[EMAIL PROTECTED] wrote:
> why the output of this code :
> x = 0
> while x < 10:
> z = 0
> print x
> x = x + 1
> while z < x:
> print z,
> z = z + 1
>
> is
>
> 0
> 0 1
> 0 1 2
> 0 1 2 3
> 0 1 2 3 4
> 0 1 2 3 4 5
> 0 1 2 3 4 5 6
> 0
On 27 Apr 2006 02:48:46 -0700,
[EMAIL PROTECTED] wrote:
> why the output of this code :
> x = 0
> while x < 10:
> z = 0
> print x
> x = x + 1
> while z < x:
> print z,
> z = z + 1
> is
> 0
Okay, that was x, from the print statement
pydoc gc.collect
pydoc xrange
--
http://mail.python.org/mailman/listinfo/python-list
This is so great!!! I know i have alot of work left to do and i
probobly wont make it in time which means that i can only get the grade
E on the assignment... But at this stage it feels like ill be happy
with any grade i get, just to have this behind me. Programming is
apparently not my thing. It f
For such a simple task, I would use MATLAB.
http://www.mathworks.com/products/matlab/
However, if you have to do generic programming in addition to this, I
would use Python with the libraries ImageMagick or Python Image Library
(PIL). Just search for them and you'll have all the examples you need
Woohoo!
You rock, Gerhard. That's inspired. I'm sure I can sort this out now.
Both you and Tim have been an enormous help.
Cheers, Al.
(Oh, and Tim: tip noted. I feel bad about not posting complete code- I
do normally (not in python), but can't for this one. Thanks for wading
your way through it
Python version 2.4.3
>>> l=range(50*1024*100)
after this code, you can see the python nearly using about 80MB.
then I do this
>>> del l
after this, the python still using more then 60MB, Why the python don't free my
memory?
Is there any way to force the python free my memory?
Thanks.
Kyo.
why the output of this code :
x = 0
while x < 10:
z = 0
print x
x = x + 1
while z < x:
print z,
z = z + 1
is
0
0 1
0 1 2
0 1 2 3
0 1 2 3 4
0 1 2 3 4 5
0 1 2 3 4 5 6
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6
[EMAIL PROTECTED] a écrit :
> I think there might be something wrong with the implementation of
> modulus.
>
> Negative float values close to 0.0 break the identity "0 <= abs(a % b)
> < abs(b)".
>
> print 0.0 % 2.0 # => 0.0
> print -1e-010 % 2.0 # =>1.99
>
> which is correct, but
Greetings gentlemen and ladies,
I have a question: in Tkinter, how to align a Listbox entry (i.e. a
line of text) to the right?
Google did not show up the answer to my request.
Thanks very much.
L
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch wrote:
> This is not to discourage you - just don't expect people to greet you as the
> next messiah who finally brought one of CS most fundamental data structures
> to Python... :)
xml.etree was added to Python 2.5 before christmas :-)
--
http://mail.python.org/mailman/li
> I may start a tree data structure project - it's something I've been
> thinking about for a while, and now it's clear that it's not just me
> who uses trees as data structures!
Oh, people do use them. It's just to easy to cough one up when you need it -
either as nested tuples, lists, dicts or a
101 - 200 of 226 matches
Mail list logo