Please enlighten me. This seemed so easy yust inherit from a Java class
overwrite one method - done. At the moment I do not know how to proceed
:-((
Jython or jythonc?
==
In general is it better to run programms with the jython interpreter or
is it better to compile them first? I ha
On 2/10/06, David M. Cooke <[EMAIL PROTECTED]> wrote:
> "linda.s" <[EMAIL PROTECTED]> writes:
>
> > where to download numpy for Python 2.3 in Mac?
> > Thanks!
> > Linda
>
> I don't know if anybody's specifically compiled for 2.3; I think most
> of the developers on mac are using 2.4 :-)
>
> But (as
John Salerno wrote:
> Can anyone tell me how complicated it might be to install Python on my
> server so I can use it for web apps? Is it a one-time process, or
> something to maintain?
I'm not sure what you would expect to maintain. Do you expect some kind
of "bit-rot" to occur, requiring you
What's wrong with wxPython? (http://www.wxpython.org)
Didn't see it mentioned here.
David Berlin
http://farpy.holev.com - Python GUI Editor
--
http://mail.python.org/mailman/listinfo/python-list
I figured someone out there must have written a minimal code size prime
number generator. I did not find one after a bit of searching around.
For primes up to 100 the best I could do was 70 characters (including
spaces):
r=range(2,99)
m=[x*y for x in r for y in r]
[x for x in r if not x in m]
--
att, thx.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 10 Feb 2006 20:24:34 -0800, Ross Ridge wrote:
> Steven D'Aprano wrote:
>> It is highly unlikely that any judge will be fooled by a mere change in
>> format ("but Your Honour, I converted the TTF file into a bitmap").
>
> If that were true, almost the entire X11 bitmap font collection woul
Hi, where I can find the pyserial handbook??
THanks
--
http://mail.python.org/mailman/listinfo/python-list
linda.s wrote:
> where to download numpy for Python 2.3 in Mac?
I don't think anybody has a binary package compiled for you. However, if you
have gcc installed, numpy should build out-of-box.
$ tar zcf ~/downloads/numpy-0.9.4.tar.gz
$ cd numpy-0.9.4
$ python setup.py build
$ sudo python setup.py
"slogging_away" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> SystemError: com_backpatch: offset too large
This message is generated in the backpatch function in Python/compile.c in
the source tree. (See below: sorry, tab indents did not survive cut and
paste operation.) As t
swisscheese wrote:
> I figured someone out there must have written a minimal code size prime
> number generator. I did not find one after a bit of searching around.
> For primes up to 100 the best I could do was 70 characters (including
> spaces):
>
> r=range(2,99)
> m=[x*y for x in r for y in r]
Steve Holden wrote:
> Albert Leibbrandt wrote:
> >
> > jeffhg582003 wrote:
> >
> >
> >>Hi,
> >>
> >>I am developing a python script which add records to
> >>a microsoft access tables. All my tables have autogenerated number
> >>fields. I am trying to capture the number generated from the insert bu
slogging_away wrote:
> Magnus Lycka wrote:
>
>
>>What happens if you run it from the command line instead
>>of IDLE? After all, it might be some problem in IDLE involved
>>here. Even if it doesn't work correctly outside IDLE, I was
>>thinking that IDLE might swallow some kind of error message.
>
Hello,
How can I check that a string does NOT contain NON English characters?
Thanks
L.
--
http://mail.python.org/mailman/listinfo/python-list
At 58, very nice :-) Building on yours we get 57:
r=range(2,99)
[x for x in r if sum([x%d==0 for d in r])<2]
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 11 Feb 2006 02:03:46 -0800, swisscheese wrote:
> I figured someone out there must have written a minimal code size prime
> number generator. I did not find one after a bit of searching around.
> For primes up to 100 the best I could do was 70 characters (including
> spaces):
>
> r=range(2
Hello,
try using regular expressions. I'afraid that i don't have any
documentation right here but i think there is a starting point for a
web search now.
Greetings
--
http://mail.python.org/mailman/listinfo/python-list
Additional info: You will documentation in the Python help utility by
typing the module name 're' or 'sre'
--
http://mail.python.org/mailman/listinfo/python-list
john peter wrote:
> I'd like to write two generators: one is a min to max sequence number
> generator that
> rolls over to min again once the max is reached. the other is a generator
> that cycles
> through N (say, 12) labels. currently, i'm using these generators in nested
> loops like
>
You can save two bytes with
r=range(2,99)
[x for x in r if sum(x%d==0 for d in r)<2]
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I use the Boost.Python lib for a couple of weeks now and i am
facing a pb.
To sum up i have a small hierarchy of objects and have a factory to
build concrete object. The pb is i think aroud the auto_ptr object that
is not correctly managed by my code ( i use version 1.33 )
I think that t
Frank LaFond wrote:
> Jython 2.2 Alpha 1 supports Java 1.5
It is also buggy and IIRC has a broken jythonc which is what the OP is
trying to use.
Kent
--
http://mail.python.org/mailman/listinfo/python-list
>You can save two bytes with
56 - nice catch.
55:
r=range(2,99)
[x for x in r if sum(x%d<1 for d in r)<2]
--
http://mail.python.org/mailman/listinfo/python-list
swisscheese wrote:
> I figured someone out there must have written a minimal code size prime
> number generator. I did not find one after a bit of searching around.
> For primes up to 100 the best I could do was 70 characters (including
> spaces):
>
> r=range(2,99)
> m=[x*y for x in r for y in r]
Mark Fink wrote:
> Please enlighten me. This seemed so easy yust inherit from a Java class
> overwrite one method - done. At the moment I do not know how to proceed
> :-((
It should be easy.
> Jython or jythonc?
> ==
> In general is it better to run programms with the jython inter
On 2/10/06, Kevin Walzer <[EMAIL PROTECTED]> wrote:
> ...with a twist.
>
> I'm undertaking my first semi-substantial Python GUI application after a
> long time dabbling with the language.
>
> I'm fairly experienced with Tcl/Tk, so Tkinter seems the obvious choice
> to reduce my Python learning curv
Mark Fink wrote:
> Alan, Kent, many thanks this really helped!
> But there is still a problem I guess with inheritance. I use the java
> testsuit supplied with the original to test the server. If I use the
> Java FitServer the testsuite can be completed. I commented everything
> out from my class a
On Sat, 11 Feb 2006 12:43:23 +, Ian Bygrave wrote:
> p,r=[],range(2,99)
> while r:p,r=p+r[:1],[x for x in r if x%r[0]]
>
> And the result's in p.
Well, given a hypothetical new function 'sieve'
def sieve(f,l):
if not l:
return l
head,tail=l[0],l[1:]
def filter_func(x):
Hi Kevin!
I have no experience with Tkinter, but I did some small GUIs with
wxPython and PyGTK.
wxPython works very well on Windows, but on Linux (Ubuntu/Debian in my
case) it is very difficult to work with and buggy.
PyGTK-Applications on the other hand maybe do not look totally like
Windows-
On Sat, 11 Feb 2006 13:33:58 +, Ian Bygrave wrote:
> Well, given a hypothetical new function 'sieve'
which should have been:
def sieve(f,l):
if not l:
return l
head,tail=l[0],l[1:]
def filter_func(x):
return f(x,head)
tail=filter(filter_func,tail)
return [
On 2006-02-11, Alex Martelli <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>> Problem:
>>
>> You have a list of unknown length, such as this: list =
>> [X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
>> the X's are all up front and you know that
On 2006-02-11, Kenneth Xie <[EMAIL PROTECTED]> wrote:
> att, thx.
A lot of the ideas discussed in Effective C++ et al are things that
Python does for us already. C++ works at a much lower layer of
abstraction and you need to deal explicitly with freestore for any
nontrivial class.
EC++ is mostly
Hi all. I don't know if Python is good for this kind of jobs but I'm
wondering if it's possible emulate the "netstat" command in Python.
I'd need to know if a certain executable opened a socket and, in that case,
I'd like to know what kind of socket it uses (TCP or UDP), its src/dst PORT,
and th
On Thu, 09 Feb 2006 12:38:26 +, Dave Cook wrote:
>
> particularly the last section on how to create an EXE from your pygtk program.
>
That recipe isn't optimal with newer gtk versions (starting from 2.8 if I
remember correctly). Look here instead:
http://starship.python.net/crew/theller/moin
On 2006-02-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> What's wrong with wxPython? (http://www.wxpython.org)
Nothing. A lot of us use it.
> Didn't see it mentioned here.
I'm sorry, I didn't realize we were supposed to.
You might want to check the wxpython mailing list if you want
to se
On 2006-02-11, Florian Nykrin <[EMAIL PROTECTED]> wrote:
> wxPython works very well on Windows, but on Linux (Ubuntu/Debian in my
> case) it is very difficult to work with and buggy.
That's odd. I've been using wxPython for many years on both
Windows and on many distributions and haven't found
On 2006-02-11, swisscheese <[EMAIL PROTECTED]> wrote:
>>You can save two bytes with
>
> 56 - nice catch.
> 55:
> r=range(2,99)
> [x for x in r if sum(x%d<1 for d in r)<2]
And if this were FORTRAN:
r=range(2,99)
[xforxinrifsum(x%d<1fordinr)<2]
;)
--
Grant Edwards grante
On 2006-02-11, Zarathustra <[EMAIL PROTECTED]> wrote:
> Hi, where I can find the pyserial handbook??
I don't think there is anything called the "pyserial handbook".
The documentation for pyserial is at http://pyserial.sourceforge.net/
It's the first hit when you google "pyserial". Shocker, eh?
I have a strange problem : some code that fetches queries from an mssql
database works fine under Idle but the very same code run from a shell
window obtains its strings garbled as if the encoding codepage was
modified. This occurs only when using pymssql to connect; if I connect
through odbc
> (to email use "boris at batiment71 dot ch")
oops, that's "boris at batiment71 dot net"
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Problem:
>
> You have a list of unknown length, such as this: list =
> [X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
> the X's are all up front and you know that the item after the last X is
> an O, or that the list ends with an X. There are neve
[EMAIL PROTECTED] wrote:
> What's wrong with wxPython? (http://www.wxpython.org)
> Didn't see it mentioned here.
>
>
> David Berlin
> http://farpy.holev.com - Python GUI Editor
>
I did mention it...see "scaling the wxPython mountain."
--
Kevin Walzer
iReveal: File Search Tool
http://www.w
Alex Martelli wrote:
> [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>>Problem:
>>
>>You have a list of unknown length, such as this: list =
>>[X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
>>the X's are all up front and you know that the item after the last X is
>>an O,
Florian Nykrin wrote:
> Hi Kevin!
>
> I have no experience with Tkinter, but I did some small GUIs with
> wxPython and PyGTK.
>
> wxPython works very well on Windows, but on Linux (Ubuntu/Debian in my
> case) it is very difficult to work with and buggy.
> PyGTK-Applications on the other hand mayb
billie enlightened us with:
> Hi all. I don't know if Python is good for this kind of jobs but I'm
> wondering if it's possible emulate the "netstat" command in Python.
On Linux, you can read /proc for that info, iirc.
Sybren
--
The problem with the world is stupidity. Not saying there should be
Kevin Walzer wrote:
> I believe Martin Franklin wrote a Tile.py wrapper for the Tk/Tile
> extension, which adds theming to the core Tk widget set. It used to
> reside here:
>
> http://mfranklin.is-a-geek.org/docs/Tile/index.html
>
> That server seems to be down. Anyone know if the wrapper is avai
Hi!
[EMAIL PROTECTED] wrote:
> Problem:
>
> You have a list of unknown length, such as this: list =
> [X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
> the X's are all up front and you know that the item after the last X is
> an O, or that the list ends with an X. There are
Lonnie Princehouse wrote:
> Here's a curious hack I want to put up for discussion. I'm thinking of
> writing a PEP for it.
A minor library change wouldn' t need a PEP.
> Observation
> -
> I found myself using this construct for assembling multiple lists:
>
> foo = []
> qu
On 2/10/06, Kevin Walzer <[EMAIL PROTECTED]> wrote:
> I'm undertaking my first semi-substantial Python GUI application after a
> long time dabbling with the language.
>
...
> So: my question is, would it be more productive for me to wrestle with
> these extensions when there doesn't seem to be muc
Kevin Walzer <[EMAIL PROTECTED]> writes:
> Unfortunately, PyGTK does not run natively on the Mac (it's X11 only).
There's some work in progress:
http://developer.imendio.com/wiki/Gtk_Mac_OS_X
--
Lawrence - http://www.oluyede.org/blog
"Anyone can freely use whatever he wants but the light at the
> I've spent a pleasant hour or so trying to bring up a top-level Tk menu at
> the same spot as it would appear if I had actually clicked the menu. That
> is, I want to bring up a menu from the keyboard.
I'm going to investigate how to locate the 'button' that forms the anchor
for the menu. T
billie wrote:
> Hi all. I don't know if Python is good for this kind of jobs but I'm
> wondering if it's possible emulate the "netstat" command in Python.
As a general recommendation, use strace(1) to answer this kind of
question. Run "strace -o tmp netstat", then inspect tmp to find out
how nets
Steven D'Aprano wrote:
> In any case, even in the USA, hinted fonts are copyrightable, and merely
> removing the hints (say, by converting to a bitmap) is no more legal than
> whiting out the author's name from a book and claiming it as your own.
That's an absurd comparison. By making a bitmap fo
swisscheese wrote:
>
> r=range(2,99)
> m=[x*y for x in r for y in r]
> [x for x in r if not x in m]
How about:
[2]+[x for x in range(1,99) if 2**x%x==2]
Mark
--
http://mail.python.org/mailman/listinfo/python-list
I just installed from .tar.gz on fedora FC5 x86_64. I ran into 1 small
problem:
sudo python setup.py install --verbose
running install
running bdist_egg
running egg_info
writing functional.egg-info/PKG-INFO
writing top-level names to functional.egg-info/top_level.txt
reading manifest file 'functi
Lad wrote:
>How can I check that a string does NOT contain NON English characters?
try:
foobar.encode('ascii')
except:
bla
or use string.ascii_letters and enhance it.
mfg
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
Wow you are so wrong about Tk on OSX. Soon this is just not going to be
the case at all for any of the system Tcl/Tk runs on. The Tcl folks
have come out with a package called "Tile" that is going to be rolled
in. It gives you native L&F on OSX, Windows, Linux.
Robert
--
http://mail.python.org/m
This should be just a matter of determining how your string is encoded
(ASCII, UTF, Unicode, etc.) and checking the ord of each character to
see if it is in the contiguous range of English characters for that
encoding. For example, if you know that the string is ASCII or UTF-8,
you could check
Charles Krug <[EMAIL PROTECTED]> wrote:
> On 2006-02-11, Alex Martelli <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >> Problem:
> >>
> >> You have a list of unknown length, such as this: list =
> >> [X,X,X,O,O,O,O]. You want to extract all and only the X's.
[EMAIL PROTECTED] schrieb:
> How about:
>
> [2]+[x for x in range(1,99) if 2**x%x==2]
If the range goes beyond 340, it also gives non-primes...
-- Christoph
--
http://mail.python.org/mailman/listinfo/python-list
Robert Hicks wrote:
> Wow you are so wrong about Tk on OSX. Soon this is just not going to be
> the case at all for any of the system Tcl/Tk runs on. The Tcl folks
> have come out with a package called "Tile" that is going to be rolled
> in. It gives you native L&F on OSX, Windows, Linux.
>
This i
[EMAIL PROTECTED] wrote:
> swisscheese wrote:
>
>>r=range(2,99)
>>m=[x*y for x in r for y in r]
>>[x for x in r if not x in m]
>
>
> How about:
>
> [2]+[x for x in range(1,99) if 2**x%x==2]
43.
I'll be chewing on this one for a while. Thank you. :)
--
http://mail.python.org/mailman/listinfo
> [2]+[x for x in range(1,99) if 2**x%x==2]
42 - brilliant!
41:
[2]+[x for x in range(1,99)if 2**x%x==2]
... although it appears Christoph is right that it's not scalable.
--
http://mail.python.org/mailman/listinfo/python-list
This is a little shorter :-)
[2]+[x for x in range(2,99)if 2**x%x==2]
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Chris Mellon wrote:
>
> If you're planning on selling an application, especially to OS X
> users, then Tk is absolutely out of the question. It doesn't have even
> the slightest resemblence to native behavior, and lacks the polish and
> flash that occasionally lets a non-native app get away with
Steve Holden wrote:
> Robert Hicks wrote:
>> Wow you are so wrong about Tk on OSX. Soon this is just not going to be
>> the case at all for any of the system Tcl/Tk runs on. The Tcl folks
>> have come out with a package called "Tile" that is going to be rolled
>> in. It gives you native L&F on OSX,
> 42
Make that 41 and 40.
--
http://mail.python.org/mailman/listinfo/python-list
Carl Banks <[EMAIL PROTECTED]> wrote:
...
> > class better_list (list):
> > tail = property(None, list.append)
>
> This is an impressive, spiffy little class.
Yes, nice use of property.
> growing_lists = foo,qux
> while some_condition:
> for (s,x) in zip(growing_list,calculate
I try to port a server application to Jython. At the moment I use
Jython21\Lib\socket.py
Currently I do face problems with casting the string "localhost" to the
desired value:
D:\AUT_TEST\workspace\JyFIT>jython fit/JyFitServer2.py localhost 1234
23
['fit/JyFitServer2.py', 'localhost', '1234', '23']
Peter Decker wrote:
> On 2/10/06, Kevin Walzer <[EMAIL PROTECTED]> wrote:
>
>> I'm undertaking my first semi-substantial Python GUI application after a
>> long time dabbling with the language.
>>
> ...
>> So: my question is, would it be more productive for me to wrestle with
>> these extensions wh
Alex Martelli wrote:
> Carl Banks <[EMAIL PROTECTED]> wrote:
>...
> > > class better_list (list):
> > > tail = property(None, list.append)
> >
> > This is an impressive, spiffy little class.
>
> Yes, nice use of property.
>
> > growing_lists = foo,qux
> > while some_condition:
> >
In article <[EMAIL PROTECTED]>,
Lonnie Princehouse <[EMAIL PROTECTED]> wrote:
>
>> Why did you want to customize "is"?
>
>Well, mostly out of principle ;-)
>
>But also because I'm wrapping a C library which passes around C structs
>which are wrapped in shim C++ classes for a Boost.Python layer. Bo
> This is the code section of my server class (I cut this from a Python
> example):
> def establishConnection(self):
> self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> self.socket.connect((self.host, self.port))
> Do I have to use explicit typecasting? How can t
Many thanks I will do so in the future.
David
--
http://mail.python.org/mailman/listinfo/python-list
On 2/11/06, Kevin Walzer <[EMAIL PROTECTED]> wrote:
> Dabo looks interesting, but isn't it mainly for database applications?
> Has any other kind of application been developed with it? Also, it seems
> very Windows/Linux-centric. Is anyone using it on OS X?
The Dabo demo comes with several games
On 2/11/06, Kevin Walzer <[EMAIL PROTECTED]> wrote:
> Also, it seems
> very Windows/Linux-centric. Is anyone using it on OS X?
I almost forgot: take a look at this screencast:
http://leafe.com/screencasts/sizers2.html
It's the second part of a demonstration on using sizers in the Dabo
visual de
Ian Leitch <[EMAIL PROTECTED]> wrote:
...
> 2. I'm at a loss as how to calculate the size of a long object -- any tips?
#include "longintrepr.h" (from the Python sources). Then, given a
PyLongObject *l, abs(l->ob_size) is the number of "digits", each taking
SHIFT bits.
> Many thanks to anyone
On 2/11/06, Kevin Walzer <[EMAIL PROTECTED]> wrote:
> Chris Mellon wrote:
>
> >
> > If you're planning on selling an application, especially to OS X
> > users, then Tk is absolutely out of the question. It doesn't have even
> > the slightest resemblence to native behavior, and lacks the polish and
Raymond Hettinger <[EMAIL PROTECTED]> wrote:
...
> The intersection step is unnecessary, so the answer can be simplified a
> bit:
>
> >>> filter(set(l2).__contains__, l1)
> [5, 3]
> >>> filter(set(l1).__contains__, l2)
> [3, 5]
...and if one has time to waste, "setification" being only an
opti
[EMAIL PROTECTED] wrote:
> The only thing I must read is the response I get from a EPP server.
> A response like this:
>
>
> http://www.eurid.eu/xml/epp/epp-1.0";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:contact="http://www.eurid.eu/xml/epp/contact-1.0";
> xmlns:domain="htt
On 2/11/06, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Fri, 10 Feb 2006 20:24:34 -0800, Ross Ridge wrote:
>
> > Steven D'Aprano wrote:
> >> It is highly unlikely that any judge will be fooled by a mere change in
> >> format ("but Your Honour, I converted the TTF file into a bitmap").
> >
> > I
On 10 Feb 2006 03:51:01 -0800, Paul Boddie <[EMAIL PROTECTED]> wrote:
> John McMonagle wrote:
>> On Thu, 2006-02-09 at 17:53 -0600, Larry Bates wrote:
>> > You don't have to determine it. Just os.startfile('page1.html')
>> > and let the OS figure it out.
>>
>> Works great for Windows - not availab
I think you guys are up to something. We need some way to aggregate,
update, and extend not just tutorials but all kinds of informatory
material on Python. The Python Wiki is a good place for all that,
although it hasn't become anything resembling a Wikipedia so far.
AdSR
--
http://mail.python.o
Is there a road map for python a 2.5 releases yet? I'd like to begin
testing the new hashlib module with some old scripts I have that
currently use the md5 and sha modules.
Thanks,
Brad
--
http://mail.python.org/mailman/listinfo/python-list
Jorgen Grahn wrote:
>
[desktop module]
> Note that those do not, of course, work on all Unices.
Correct: they work only for the stated desktop environments.
> On my machines, there is One Correct Way of doing these things, and that's
> to look in the MIME support/configuration files (~/.mailcap
Hi all. I'm just starting out with Python, so I'm a little slow right
now. :)
Can someone explain to me why the expression 5 / -2 evaluates to -3,
especially considering that -2 * -3 evaluates to 6?
I'm sure it has something to do with the negative number and the current
way that the / operato
Dennis Lee Bieber wrote:
> On Sat, 11 Feb 2006 01:02:46 -0500, John Salerno
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>> Yikes, that's all the stuff I don't know. Maybe this is over my head
>> right now.
>
> Let's start with something simple then... Do you have a
On Sat, 11 Feb 2006 07:54:46 -0600, Charles Krug <[EMAIL PROTECTED]> wrote:
> On 2006-02-11, Kenneth Xie <[EMAIL PROTECTED]> wrote:
>> att, thx.
>
> A lot of the ideas discussed in Effective C++ et al are things that
> Python does for us already. C++ works at a much lower layer of
> abstraction
Y
I'm doing some python programming for a linux terminal (just learning).
When I want to completely redraw the screen, I've been using
os.system("clear")
This command works when using python in terminal mode, and in IDLE.
However, when running a little .py file containing that command, the
screen doe
On Sat, 11 Feb 2006 16:28:06 +0100, Martin v. Löwis <[EMAIL PROTECTED]> wrote:
> billie wrote:
>> Hi all. I don't know if Python is good for this kind of jobs but I'm
>> wondering if it's possible emulate the "netstat" command in Python.
>
> As a general recommendation, use strace(1) to answer thi
Em Sáb, 2006-02-11 às 12:04 -0800, mwt escreveu:
> I'm doing some python programming for a linux terminal (just learning).
> When I want to completely redraw the screen, I've been using
> os.system("clear")
> This command works when using python in terminal mode, and in IDLE.
> However, when runnin
Em Sáb, 2006-02-11 às 14:52 -0500, John Salerno escreveu:
> Hi all. I'm just starting out with Python, so I'm a little slow right
> now. :)
>
> Can someone explain to me why the expression 5 / -2 evaluates to -3,
> especially considering that -2 * -3 evaluates to 6?
>
> I'm sure it has somethin
rtilley <[EMAIL PROTECTED]> wrote:
> Is there a road map for python a 2.5 releases yet? I'd like to begin
> testing the new hashlib module with some old scripts I have that
> currently use the md5 and sha modules.
http://python.org/peps/pep-0356.html -- but it's still a draft, being
discussed i
John Salerno wrote:
> Hi all. I'm just starting out with Python, so I'm a little slow right
> now. :)
>
> Can someone explain to me why the expression 5 / -2 evaluates to -3,
> especially considering that -2 * -3 evaluates to 6?
>
> I'm sure it has something to do with the negative number and t
'/' is a floor division (1/2 == 0) unless validated by a from
__future__ import division.
So:
5/2=2.5 -> nearest lowest non-decimal number makes it 2.
5/-2=-2.5 -> nearest lowest non-decilmal number makes it -3
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno <[EMAIL PROTECTED]> writes:
> Can someone explain to me why the expression 5 / -2 evaluates to -3,
> especially considering that -2 * -3 evaluates to 6?
>
> I'm sure it has something to do with the negative number and the
> current way that the / operator is implemented, but why doesn
"Steve Holden" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Clearly it would be a good idea to remove whatever problem is causing
> the error,
The problem (see my post of the com_backpatch code) is writing a compound
statement (here a for loop) with a body so large as to requir
Alex Martelli wrote:
> http://python.org/peps/pep-0356.html -- but it's still a draft, being
> discussed in the last few days on python-dev.
Thank you, that's exactly what I was looking for!
--
http://mail.python.org/mailman/listinfo/python-list
I have just started to learn python. Some said that its slow. Can
somebody pin point the issue.
Thans
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I have just started to learn python. Some said that its slow. Can
> somebody pin point the issue.
It depends on what you are doing. Much of Python is just wrapped C. So
many things are very fast.
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 142 matches
Mail list logo