How about one of these that works on Windows XP? I know there's no
files.cache, but I wonder if your script could be combined with another
function that would generate a list of paths on a Windows XP machine.
Anyway, thanks for the script.
--
http://mail.python.org/mailman/listinfo/python-list
> I can't see anything
>> called a T2100. I have 3 X2100 servers which are opterons.
Right I meant X2100's, sorry.
> Python cannot use psyco on opterons at all -
> 32 bit mode or otherwise.
Are you sure? I'm not saying I have reason to believe differently, but
I just want to be sure.
The Ps
[EMAIL PROTECTED] writes:
> I need to execute sql command using a "here document" like in unix.
>
> os.popen("osql", "w").write("""\
> select * from table
> go
> """)
>
> how can i pipe these result of the select into a variable?
popen doesn't work that way. you can only open them read or writ
Find a new release of python-ldap:
http://python-ldap.sourceforge.net/
python-ldap provides an object-oriented API to access LDAP directory
servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for
that purpose. Additionally it contains modules for other LDAP-related
stuff (e.g. p
John Salerno wrote:
> Is 'Python 3000' just a code name for version 3.0, or will it really be
> called that when it's released?
Actually, there's an official response these days in `PEP 3000`_:
"""
Naming
Python 3000, Python 3.0 and Py3K are all names for the same thing. The
project is called
John Salerno wrote:
> > At which level in the 'python challenge' did
> > you get stuck - and why?
>
> Ugh, don't remind me! :)
>
> I'm stuck on level 12, which is yet another image processing puzzle. I'm
> getting tired of those, and I think it's really a shame that there is a
This is EXACTLY why
Robert Kern wrote:
> Francisco Reyes wrote:
>
>>Shane Hathaway writes:
>>
>>
>>>I must saay that i am fully in favor of this change. The ppython
>>>developerrs need to eat too. Iis no one ellse aware off the perils oof
>>>ooutright open source llicenssing?
>>
>>I disagree with the change. I th
Tim Peters wrote:
> [John Salerno]
>> Is 'Python 3000' just a code name for version 3.0, or will it really be
>> called that when it's released?
>
> The smart money is on changing the name to Ecstasy, to leverage
> marketing publicity from the hallucinogenic club drug of the same
> name. "class"
hi
I need to execute sql command using a "here document" like in unix.
os.popen("osql", "w").write("""\
select * from table
go
""")
how can i pipe these result of the select into a variable?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Andrew Trevorrow wrote:
> Our app uses embedded Python to allow users to run arbitrary scripts.
> Scripts that import Tkinter run fine on Windows, but on Mac OS X there
> is a serious problem. After a script does "root = Tk()" our app's menus
> are permanently changed in the following way:
>
> -
Dennis Lee Bieber wrote:
> Or... just to save "3000" as a "time way down the road"... The next
> major version of Python will be: Python PI (and each build will add
> another digit... "3.1, 3.14, 3.141, ...")
I like this idea a lot. This way, people ALWAYS know what the next
release's name w
Duh! Headsmack.
Thanks. But also, I discovered something else. If I name the script
findmyfiles.py and run it from the command line while in the directory
where it is stored (on windows), I must run it as:
findmyfiles.py d:/notes notes*.*
I was used to being able to run scripts by just typing th
mwt wrote:
> Is there a function in python that does what "locate" does in a bash
> shell?
>
> I know I could do it by using os.popen('locate'), but I'm curious if
> there's a Python "native" way to go about it. Only needs to work in
> Unix, but would be interesting if it was cross-platform.
>
>
Em Dom, 2006-04-09 às 19:41 -0700, BartlebyScrivener escreveu:
> for path in all_files(sysargv[1], sysargv[2]):
Instead of sysargv, use sys.argv.
--
Felipe.
--
http://mail.python.org/mailman/listinfo/python-list
wow, this looks nice.
thanks a lot.
--
http://mail.python.org/mailman/listinfo/python-list
I'm still new at this. I can't get this to work as a script. If I just
manually insert the values for sys.argv[1] and sys.argv[2] it works
fine, but I can't pass the variables from the command line. What am I
doing wrong? On windows xp, python 2.4.3
Thank you
import os
import fnmatch
import sys
Mr. John Machin
This question come form the flow codes. I use the PyXml to build a DOM
tree.
from xml.dom.ext.reader import HtmlLib
doc =
HtmlLib.FromHtmlUrl('http://stock.business.sohu.com/q/nbcg.php?code=600028')
title_elem = doc.documentElement.getElementsByTagName("TITLE")[0]
title_string = t
You might find http://www.cafepy.com/article/python_types_and_objects/
and http://www.cafepy.com/article/python_attributes_and_methods/
useful. These articles assume you know Python, and describe some of the
mechanisms behind Python new-style objects - including descriptors (but
not decorators).
-
Mr. John Machin, Thank you very much!
--
http://mail.python.org/mailman/listinfo/python-list
this cgi script write different files, request 1 will write 1.html, 2
will write 2.html and so on.
Its not updating the current file.
For example create.py processes a form and write user.html file and
every user is unique.
so if 10 users fill up the form at the same time and click submit
button, c
[John Salerno]
> Is 'Python 3000' just a code name for version 3.0, or will it really be
> called that when it's released?
The smart money is on changing the name to Ecstasy, to leverage
marketing publicity from the hallucinogenic club drug of the same
name. "class" will be renamed to "rave", and
In article <[EMAIL PROTECTED]>,
"gregarican" <[EMAIL PROTECTED]> wrote:
> Here are a few languages I recommend most programmers should at least
> have a peek at:
>
> 1) Smalltalk - The original object oriented programming language.
> Influenced anything from Mac/Windows GUI to Java language. Ter
thanks, I will try pycurl.
--
http://mail.python.org/mailman/listinfo/python-list
Is there a function in python that does what "locate" does in a bash
shell?
I know I could do it by using os.popen('locate'), but I'm curious if
there's a Python "native" way to go about it. Only needs to work in
Unix, but would be interesting if it was cross-platform.
Thanks.
--
http://mail.p
What do you mean by "ansi string"?
Here is a superficially not-unreasonable answer to your more specific
question:
# >>> s1 = u'\xd6\xd0\xb9\xfa\xca\xaf\xbb\xaf(600028) '
# >>> s2 = '\xd6\xd0\xb9\xfa\xca\xaf\xbb\xaf(600028) '
# >>> s3 = s1.encode('latin1')
# >>> s2 == s3
# True
But what are you
Here are a few languages I recommend most programmers should at least
have a peek at:
1) Smalltalk - The original object oriented programming language.
Influenced anything from Mac/Windows GUI to Java language. Terse, clean
syntax. IDE rolled into an operating system rolled into a set of core
libr
[Pythor]
Sure, I tested it.
===
I don't think that word means what you think it means :-)
[Pythor]
On the other hand, I'm not
having any trouble producing a whole circle, while you seem to think
I'm only producing half a circle. The code that limits itself to a 5x5
box is only expected to produce
Our app uses embedded Python to allow users to run arbitrary scripts.
Scripts that import Tkinter run fine on Windows, but on Mac OS X there
is a serious problem. After a script does "root = Tk()" our app's menus
are permanently changed in the following way:
- The top item in the application menu
Steven D'Aprano wrote:
> On Sun, 09 Apr 2006 08:52:18 -0700, Carl Banks wrote:
>
> > it's more important
> > to respect community standards than to stick to some silly preference
> > you have.
>
> What happens when the community standard is a silly preference? I object
> to the suggestion that "c
Hello,
There is a unicode string, I want to change it to ansi string. but
it raise an exception.
Could you help me?
## I want to change s1 to s2.
s1 = u'\xd6\xd0\xb9\xfa\xca\xaf\xbb\xaf(600028) '
s2 = '\xd6\xd0\xb9\xfa\xca\xaf\xbb\xaf(600028) '
--
http://mail.python.org/mailman
Felipe Almeida Lessa wrote:
> Em Dom, 2006-04-09 às 08:52 -0700, Carl Banks escreveu:
> > You've made the unfortunate mistake of indenting it with tabs, which
> > do
> > not show up on some newsreaders. I see the tabs in Google; people
> > using Microsoft Outlook do not.
>
> He does not need to k
Is 'Python 3000' just a code name for version 3.0, or will it really be
called that when it's released?
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> [Michael Tobis]
> Also, with this code, you are using radius for the dimensions of the
> enclosing box, as well as the radius of the circle, so it's guaranteed
> to not to actually produce a whole circle. Recall what python does with
> negative indices!
>
> [Pythor]
> I'm not s
Pythor wrote:
> I wrote the following code for a personal project. I need a function
> that will plot a filled circle in a two dimensional array. I found
> Bresenham's algorithm, and produced this code. Please tell me there's
> a better way to do this.
>
> import numpy
>
> def circle(field=Non
[Michael Tobis]
Also, with this code, you are using radius for the dimensions of the
enclosing box, as well as the radius of the circle, so it's guaranteed
to not to actually produce a whole circle. Recall what python does with
negative indices!
[Pythor]
I'm not sure what you mean here. It produc
It's also possible to write microprocessor assembly language in any
other language.
The following code generates the OP's list of points with nothing more
complicated than integer addition/subtraction inside the loop. It also
does the right thing if the radius is not an integer, and avoids the
OP's
please put me on your mailing list
--
http://mail.python.org/mailman/listinfo/python-list
Em Dom, 2006-04-09 às 08:52 -0700, Carl Banks escreveu:
> You've made the unfortunate mistake of indenting it with tabs, which
> do
> not show up on some newsreaders. I see the tabs in Google; people
> using Microsoft Outlook do not.
He does not need to know that some poor designed newsreaders m
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Sun, 09 Apr 2006 08:52:18 -0700, Carl Banks wrote:
>
> > it's more important
> > to respect community standards than to stick to some silly preference
> > you have.
>
> What happens when the community standard is a silly preference? I object
> to t
On Sun, 09 Apr 2006 08:52:18 -0700, Carl Banks wrote:
> it's more important
> to respect community standards than to stick to some silly preference
> you have.
What happens when the community standard is a silly preference? I object
to the suggestion that "community standards" (that is, a standar
Just found a solution to the problem:
when using wx.EVT_SPINCTRL instead of wx.EVT_SPIN_UP, wx.EVT_SPIN_DOWN
or wx.EVT_SPIN the program behaves correctly.
wxWidget documentation for wxSpinCtrl states that "You may also use the
wxSpinButton event macros, however the corresponding events will not b
walterbyrd wrote:
> I don't need that much web space. I don't need Zope/Plone.
>
> But, I want a site that offers more than just CGI. And I would like
> support for recent Python releases.
>
> Price is an issue, that's one reason I've been reluctant to use python
> for web-sites, hosting seems to
Mirco Wahab wrote:
> At which level in the 'python challenge' did
> you get stuck - and why?
Ugh, don't remind me! :)
I'm stuck on level 12, which is yet another image processing puzzle. I'm
getting tired of those, and I think it's really a shame that there is a
reliance on image puzzles rathe
Announcing Speedometer 2.4
--
Speedometer home page:
http://excess.org/speedometer/
Download:
http://excess.org/speedometer/speedometer.py
New in this release:
- New -z option treats files that don't exist as zero length so
speedometer
Yes, it "works". However buggy.
When the slider is set to 0 and the up button is pressed in the
SpinCtrl, the value in the SpinCtrl will be 1, but the slider will not
move. There's also a discrepancy between the value displayed in the
SpinCtrl and the value output by
print self.spin.GetValue().
blackno666 wrote:
> I am new to Python/wxPython and am experiencing first problems. I have
> a dialog which includes a SpinCtrl and a Slider. I want the Slider to
> affect the SpinCtrl and vice versa
> (http://wiki.wxpython.org/index.cgi/ChallengeDemos#Part1).
>
> The code I wrote does, however, n
Fabian Steiner wrote:
> I am currently wondering how to write something like an "event loop".
> For example, if I want to write a function that checks whether a file
> was added or removed in a directory I would think of a "while 1: ..."
> construct that checks the mtime of the directory. Is this t
Brill, Thanks for the help
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Apr 09, 2006 at 12:35:21AM -0700, [EMAIL PROTECTED] wrote:
> I have a CGI script on server which process a form and writes its
> content on a file like
> fp = open(fname, 'w')
> fp.write('Cool
> list%s%s
>
> Its working fine, but will it work if the script recieves thousands of
> request s
yep
--
http://mail.python.org/mailman/listinfo/python-list
Hi Jim,
Thanks, I'll sign up for the mailinglist, but to finish the story here:
- I only have one version of Python installed
- From the Python interpreter I can import the mod_python module just
fine
- At starup the Apache log states:
[Sun Apr 09 22:16:38 2006] [notice] Apache/2.0.55 (Win32)
mod
Sandra-24 wrote:
> I'm not sure how complex this is, I've been brainstorming a little, and
> I've come up with:
from tokenize import generate_tokens, NL, NEWLINE
from cStringIO import StringIO
def code_lines(source):
"""Takes Python source code (as either a string or file-like
object) a
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] writes:
> 1. Which is the best graph plotting utility in python or linux.
matplotlib (provided it does the type of graphs you need, which is likely)
'as
--
http://mail.python.org/mailman/listinfo/python-list
I thought the paragraph about provability was interesting. Presumably
the author refers to proofs in the spirit of "A Discipline of
Programming" from Djikstra, 1976. Unfortunately, I don't think anyone
has writting much about this since the 70s. I'd be interested to learn
if anyone's tried to wr
Alan Morgan wrote:
> >How would xrange(100).remove(1) work?
>
> One way is by first converting the xrange to a list. If we think of
> the xrange as an efficient and space lean way to store certain types
> of lists then it isn't unreasonable to return a regular list when
> the conditions no longer
The wxPython Demo
(http://prdownloads.sourceforge.net/wxpython/wxPython-demo-2.6.3.2.tar.gz)
still contains the wxStyledTextCtrl:
wx.stc.StyledTextCtrl
The demo is probably also a good example of how to use
wxStyledTextCtrl.
Basic information can be found on
http://www.yellowbrain.com/stc/init_r
Can you tell us more about SOAPpy bug ?
Is it about authentication ?
Ivan Zuzak a écrit :
>...
> I need a package/tool that generates web service proxies that will do
> all the low-level HTTP work. (Someting like the WSDL.EXE tool in .NET
> Framework) The ZSI and SOAPy packages [1] that i found
Mirco Wahab wrote:
>
> I would say, from my own experience, that you wouldn't
> use all C++ features in all C++ projects. Most people
> I know would write C programs 'camouflaged' as C++,
> that is: write clean & simple C - and use some C++
> features e.g, class bound methods for interfaces -
> bu
>>How would you do this?
>
> def line_action(line, match_dictionary):
> global count # make it a module-global variable, not a function-local
> count = count + 1
>
>
OK, I had put it on the global block.
Thanks,
Ernesto
--
http://mail.python.org/mailman/listinfo/python-lis
Thanks. Do you know of a solution to this? I tried the following, which
I found on this newsgroup:
#
lines = open(sys.argv[1]).readlines()
#
sys.stdin = open('/dev/tty')
a = raw_input('Prompt: ')
#
sys.stdin = os.fdopen(3)
a = raw_input('Prompt: ')
#==
Gary Robinson wrote:
> I'm in the market for a server to run some python code which is
> optimized via psyco.
>
> Sun T2100 servers come with Solaris 10, which comes with python
> pre-installed.
You can always install a 32bits version of Linux or Solaris on the X2100
yourself. The X2100 is even
Hi Scott
your summary looks very concise and
good to read. I'd like to make some
minor additions,
> C can express neither exceptions nor coroutines (nor their fancy cousin,
> continuations), which could be and were expressed in assembly. Nor does
> C provide memory management. A few library fu
Hello,
I am new to Python/wxPython and am experiencing first problems. I have
a dialog which includes a SpinCtrl and a Slider. I want the Slider to
affect the SpinCtrl and vice versa
(http://wiki.wxpython.org/index.cgi/ChallengeDemos#Part1).
The code I wrote does, however, not work correctly. The
http://www.python-hosting.com/
I haven't used them myself, but recent research that I did made them
look like good candidates.
--
http://mail.python.org/mailman/listinfo/python-list
Hi John
> It's just that I obessively like to learn new things,
> and I keep moving on to new subjects once I've 'learned'
> something well enough.
Ha!
So learn 'Perl' then - you'll never ever
get over this point ... ;-))
And if you, against all odds, think you
master it now - zon, a new P
I'd like to be able to pop up a notification bubble like the ones used by Ubuntu
for 'updates available' etc. In particular I'd like to be able to use them to
warn users of other machines that I have started a background session for
maintenance and not to worry if the computer seems to be doing th
http://www.westhost.com/
You get a virtual private server with them, so you can install whatever
you want. cheap too.
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> > I have just installed FC5 on a new computer. I can access Python by
> > typing "Python" in a terminal window, but I can't find any way of
> > getting to IDLE.
> >
> > Can anyone help?
> $ yum provides idle
> can help,
I don't need that much web space. I don't need Zope/Plone.
But, I want a site that offers more than just CGI. And I would like
support for recent Python releases.
Price is an issue, that's one reason I've been reluctant to use python
for web-sites, hosting seems to be more expensive than with php
[EMAIL PROTECTED] wrote:
> Gerard,
>
> I tried to run your code but my interpreter couldn't locate the
> maildocument module. Is it included in Python standart library or
> should I install it from other place?
>
> Thanks,
> Tomer
Sorry Tomer,
I was just suggesting you read it through as an exam
Fredrik Lundh wrote:
> "Pythor" wrote:
>
> > > You aren't getting any benefit from numpy or python here. Are you
> > > aiming for speed or legibility?
> > >
> > Speed will be a necessity, eventually. I was just really aiming for
> > something that works, and that I am capable of writing.
>
> any
Hello!
I am currently wondering how to write something like an "event loop".
For example, if I want to write a function that checks whether a file
was added or removed in a directory I would think of a "while 1: ..."
construct that checks the mtime of the directory. Is this the right way
to achiev
On 8 Apr 2006 13:24:20 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
want to develop a script which will receive emails with attachmentsfrom my POP3 account, perform certain actions on it and email it back
to someone else.However, I'm not familiar with any Python library which does it. Coul
How Relevant is C Today? I still need it for Writing!
--
Regards,
Casey
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis wrote:
> As for *learning* the languages: never learn a language without a
> specific inducement. If you know you are going to write a Python
> extension, an Apache module, or a Linux kernel module in the
> near future, start learning C today. If you don't know what you
> want to u
Clodoaldo Pinto wrote:
> Duncan Smith wrote:
>> But as you use conversions to float in order to avoid integer division
>> in your code examples, it might be best to explain what's going on, even
>> if you do have to explain the relevant types.
>>
>
> I changed the comments in the first program tha
Carl Banks wrote:
> Having said that, this decorator will not affect calling overhead at
> all. The decorator is applied when the module is loaded, not when the
> decorated function is called.
to be precise, the decorator is applied when the "def" statement is exe-
cuted (that is, when the decor
Gerard,
I tried to run your code but my interpreter couldn't locate the
maildocument module. Is it included in Python standart library or
should I install it from other place?
Thanks,
Tomer
--
http://mail.python.org/mailman/listinfo/python-list
Ju Hui wrote:
> I wanna use urllib2 to get a page with a socks 5 proxy,who can give me
> a sample code ?
>
> example,
> the proxy server is :123.123.123.123
> and the port is :1080
> and the username/password is : user/pass
> I want to open http://www.google.com
>
> how to write this kind of scri
"Jay" wrote:
> Now I just get this error message.
>
> AttributeError: 'int' object has no attribute 'image'
>
> But the picture appears so I am almost their.
>
> ---START---
>
> from Tkinter import *
>
> class App:
> def __init__(self, root):
> self.MainFrame = Canvas(root)
> s
First, thanks for the tip of 'tabs'. I keep forgetting
Outlook has some interesting rules about displaying text.
Thanks for the comment about happening at load time. That
resolved the problem (in my thinking)! I don't believe I
have an issue at all...
Peace,
CG.
On Sun, 09 Apr 2006 08:52:18 -070
Sandra-24 wrote:
> C/C++ is used for a lot of things and not going anywhere.
>
> I recommend you learn it not because you should create applications in
> C or C++, but because it will increase your skills and value as a
> programmer. I recommend you even spend a few weeks with an assembly
> langua
"Pythor" wrote:
> > You aren't getting any benefit from numpy or python here. Are you
> > aiming for speed or legibility?
> >
> Speed will be a necessity, eventually. I was just really aiming for
> something that works, and that I am capable of writing.
any special reason you cannot use an exis
Steven D'Aprano wrote:
> No, "minimum number of space characters" means "you don't use enough
> spaces", not "your variable names are too short" *wink*
>
Hmm. Guess I can't read too well.
> Within a single line, a good guideline is to leave a single space on
> either side of pluses and minuses (
Michael Tobis wrote:
> Proving yet again that it's possible to write Fortran in any language.
>
Ouch...
> You aren't getting any benefit from numpy or python here. Are you
> aiming for speed or legibility?
>
Speed will be a necessity, eventually. I was just really aiming for
something that work
Chance Ginger wrote:
> On Sun, 09 Apr 2006 09:51:18 +0200, Fredrik Lundh wrote:
>
> > Chance Ginger" wrote:
> >
> >> If I define a decorator like:
> >>
> >> def t(x) :
> >> def I(x) : return x
> >> return I
> >
> > ... you get a syntax error.
> >
>
> It isn't a syntax error...I tried it before I p
cyberco wrote:
> Thanks Jim, I indeed did not look in the mailinglist archive (you have
> to subscribe for that and Google didn't cache it yet).
>
> The problem was indeed the missing .DLL's. After adding them to my
> 'PATH' variable apache was at least able to start. Unfortunately things
> still
Chance Ginger wrote:
> It isn't a syntax error...I tried it before I posted. In fact
> def t(x) :
> def I(x) : return x
> return I
>
> is correct.
tabs don't make it through all channels. don't use tabs for
indentation when you post to newsgroups or mailing lists.
and @(Y) is not valid Python s
Chance Ginger <[EMAIL PROTECTED]> writes:
> On Sun, 09 Apr 2006 09:51:18 +0200, Fredrik Lundh wrote:
>
>> Chance Ginger" wrote:
>>
>>> If I define a decorator like:
>>>
>>> def t(x) :
>>> def I(x) : return x
>>> return I
>>
>> ... you get a syntax error.
>>
>
> It isn't a syntax error...I tried
I wanna use urllib2 to get a page with a socks 5 proxy,who can give me
a sample code ?
example,
the proxy server is :123.123.123.123
and the port is :1080
and the username/password is : user/pass
I want to open http://www.google.com
how to write this kind of script?
thanks.
--
http://mail.pyt
thank you all. IT's very helpful to me.
>>> import sys
>>> def no_space_before(x):
... sys.stdout.softspace = 0
... return x
...
>>> for x in range(3):
... print no_space_before(x),
...
012
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> On Sat, 08 Apr 2006 22:54:17 -0700, Ju Hui wrote:
>
>> I want to print 3 numbers without blank.
> [snip]
>> how to print
>> 012
>> ?
>
> Method one: accumulate your numbers into a single string, then print
> it in one go.
>
thank you very much to you
i wish you a nice sunday...
cu
Heidi
--
http://mail.python.org/mailman/listinfo/python-list
i agree with you, it is better to find by ourself.
i managed to do it, but i left the code at work. i used the re module ,
using a re.match("Results Log") and a re.search(date) with a function
to find the date og the day with the appropriate format.
Is it ok to use re for file names? or fnmatch i
[EMAIL PROTECTED] wrote:
> My python program spits lot of data. I take that data and plot graphs
> using OfficeOrg spredsheet. I want to automate this task as this takes
> so much of time. I have some questions.
>
> 1. Which is the best graph plotting utility in python or linux. Can I
> write a co
Now I just get this error message.
AttributeError: 'int' object has no attribute 'image'
But the picture appears so I am almost their.
---START---
from Tkinter import *
class App:
def __init__(self, root):
self.MainFrame = Canvas(root)
self.MainFrame.pack(fill=BOTH, expand=
No! That is NOT correct Python. For one thing, you do not declare the
types in dynamically typed languages. Secondly, if you want floating
point division, you need to enter atleast one of the numbers as float.
For example
10.0/6
or
10./6
or
float(10)/6
You will find the following helpful.
http://
Frank Millman wrote:
>
> We know that Python is in the process of changing the division
> operator. The main reason for the change is that the current approach
> is not intuitive to a newcomer (whether experienced or not).
>
> Why not think to the future, and do it like this. Instruct the reader
>
Duncan Smith wrote:
>
> But as you use conversions to float in order to avoid integer division
> in your code examples, it might be best to explain what's going on, even
> if you do have to explain the relevant types.
>
I changed the comments in the first program that uses float() to:
# The raw_i
1 - 100 of 128 matches
Mail list logo