On Jul 28, 8:46 pm, "Russ P." <[EMAIL PROTECTED]> wrote:
> Letting "self" (or whatever the first argument was) be implied in
> ".cat" does absolutely *NOTHING* to change the internal workings of
> the Python interpreter. It's a very simple idea that you insist on
> making complicated. As I said, I
> Apart from the initial installation of Python itself, I
> never use an installer to install a Python package if I
> can avoid it. I wouldn't trust it to install into the right
> Python version.
On that: how would I go about updating the system Python, then? Or is
that going to be stuck at whate
On Aug 3, 9:29 am, Michele Simionato <[EMAIL PROTECTED]>
wrote:
> On Jul 28, 8:46 pm, "Russ P." <[EMAIL PROTECTED]> wrote:
>
> > Letting "self" (or whatever the first argument was) be implied in
> > ".cat" does absolutely *NOTHING* to change the internal workings of
> > the Python interpreter. It's
On 3 ago, 00:16, Tim Roberts <[EMAIL PROTECTED]> wrote:
> Kless <[EMAIL PROTECTED]> wrote:
>
> >I think that would be very interesting thay Python would have a module
> >for working on base 96 too. [1]
>
> Well, then, write one.
>
> However, I'm not sure I see the point. Base 64 is convenient beca
On 3 ago, 00:33, Terry Reedy <[EMAIL PROTECTED]> wrote:
> seehttp://en.wikipedia.org/wiki/Base-85
> for something more practical
In this thread [1] --a mirror group of python-dev mailing list-- where
I sent the same post, has been named too that enconding way.
[1]
http://groups.google.com/group
On 3 ago, 00:31, Tim Roberts <[EMAIL PROTECTED]> wrote:
> Whether it creates problems depends on how you intend to use it. The
> biggest use for Base64, for instance, is in translating binary files to a
> form where they can be send via email using only printable characters. If
> you use a non-pr
I'm a newbie to Python... well a newbie to programming, really. I know
the basics and try to learn by setting myself simple tasks and goals
just to find out if I can work out a way to code the solutions. Works
for me. However, now I've set my eyes on a more ambitious project:
We sell office machin
On Aug 3, 8:12 am, binaryjesus <[EMAIL PROTECTED]> wrote:
> On Aug 3, 1:46 am, Paul Hankin <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Aug 2, 10:35 pm, binaryjesus <[EMAIL PROTECTED]> wrote:
>
> > > hi i am working on a S3 project and facing a really weird problem!
> > > take a look at the following im
Thanks to everyone who replied. I haven't chosen a definite direction
for my project yet. But you have given me some good leads.
Google Books offers previews of many pages of John Koza's book,
published in the early 1990's. I'm reading through the preview pages,
with the idea of purchasing a mo
On Sun, 03 Aug 2008 02:44:34 -0700, Victor Lin wrote:
> Now, here comes the problem : I have to override all the operation
> methods, such as __add__ and __mul__. I know the most stupid way is just
> to write all of them like this.
>
> def __add__(self, other):
> self.leftOperation('add', ot
Hi,
I'd like to write some class that can help me build reusable formula
easily, some simple code like this.
# -*- coding: utf8 -*-
class OperationResult:
def __init__(self, left, right):
self.dataSource = dataSource
def __add__(self, other):
self.dataSource.stack.append(
On Jul 31, 6:15 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Jul 28, 12:15 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On 28 Jul., 06:42, "Russ P." <[EMAIL PROTECTED]> wrote:
>
> > > On Jul 27, 8:58 pm, castironpi <[EMAIL PROTECTED]> wrote:
>
> > > > On Jul 27, 2:39 pm, Bruno Dest
On Sat, Aug 02, 2008 at 07:46:49PM -0700, Dennis Lee Bieber wrote:
>
>
What is the meaning of ?
e.
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinf
http://www.w3.org/TR/REC-xml/#sec-white-space is relevant, as is the
following section on handling carriage returns.
Don't mix C escapes "\n" and XML markup - there really is is no point, and
it reduces the portability of the XML. XML lets you put carriage returns in
without excapes into text, and
how about changing the precious self. to .
imagine
self.update()
.update()
simple right?
--
http://mail.python.org/mailman/listinfo/python-list
I could really use some help. Please take a look at the following
image:
http://img227.imageshack.us/img227/1346/grainynn3.png
As you can see, the text in the image is fairly grainy. To get to
that point, I converted an ArialBold TTF to a BDF using otf2bdf
(http://crl.nmsu.edu/~mleisher/ttf2bdf
I think you are confusing 2 people in this thread but that doesn't
really matter.
What surprised me was that I didn't think fib would benefit from
memoization because it didn't repeat the same calculations. fibmem
without memoization is the classic naive implementation that grows
exponentially and
Am 03.08.2008, 12:51 Uhr, schrieb Equand <[EMAIL PROTECTED]>:
how about changing the precious self. to .
imagine
self.update()
.update()
simple right?
What about:
class x:
def x(self,ob):
ob.doSomethingWith(self)
? Not so simple anymore, isn't it? If you're not trolling, the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
It's also worth noting that you can use a different name for the object
that represents your class. If you did def __init__(foo):pass, then you
would be able to access the class's objects with foo.objectname. Using
self is simply the recommended standa
On Jul 22, 2:00 pm, AMD <[EMAIL PROTECTED]> wrote:
> Hello Fredrik,
>
> I didn't think my comment would offend anyone [...]
I doubt that it offended anyone else. Having been the recipient of a
few F-bombs :-) myself, I'd just let it go by...
Mike
--
http://mail.python.org/mailman/listinfo/python
2008/8/3 ToshiBoy <[EMAIL PROTECTED]>:
> Currently, I'm using iMacro, an add-on to Firefox, which runs a macro
> and enters all the info. It's great, but I would like to try and write
> a program for this in Python. It needs to collect some user input at
> the beginning, and then open the default w
On Aug 3, 8:27 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Jul 22, 2:00 pm, AMD <[EMAIL PROTECTED]> wrote:
>
> > Hello Fredrik,
>
> > I didn't think my comment would offend anyone [...]
>
> I doubt that it offended anyone else. Having been the recipient of a
> few F-bombs :-) myself, I
I am very new to Python (I started learning it just yesterday), but I
have encountered a problem.
I want to make a simple script that calculates the n-th root of a given
number (e.g. 4th root of 625--obviously five, but it's just an example
:P), and because there is no nth-root function in Pyt
Steven D'Aprano wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
>> So the question is: whats going on with timeit.Timer ?
>
> As far as I can see, nothing. I think you have misunderstood the results
> you got.
No, the answer is that is it repeats a million times. It might better be
calle
CNiall schrieb:
I am very new to Python (I started learning it just yesterday), but I
have encountered a problem.
I want to make a simple script that calculates the n-th root of a given
number (e.g. 4th root of 625--obviously five, but it's just an example
:P), and because there is no nth-roo
for nth square root: use math.sqrt n times for example
>>> import math
>>> num = 625
>>> how_many_sqrt = 2
>>> for i in range(how_many_sqrt):
.. num = math.sqrt(num)
..
>>> num
5.0
all comparisons work fine for arbitrary floating point numbers...
For readability print them with required prec
Greetings, List!
I was browsing through the Decimal source today, and found this:
# We're immutable, so use __new__ not __init__
def __new__. . .
self = object.__new__(cls)
.
.
.
return self
Out of curiousity I then tried this:
--> import
Dennis Lee Bieber wrote:
just an fyi
self.towers = [ list(reversed(range(self.numDisks))),
or range(self.numDisks-1,-1,-1)
Emile
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Aug 3, 2008 at 12:37 AM, Avi <[EMAIL PROTECTED]> wrote:
>> Apart from the initial installation of Python itself, I
>> never use an installer to install a Python package if I
>> can avoid it. I wouldn't trust it to install into the right
>> Python version.
>
> On that: how would I go about u
Ethan Furman wrote:
--> d25._int = (1, 5)
Python considers names that start with a leading underscore as internal
or private, and that abuse is the burden of the abuser...
Is bytecodehacks still around? That was serious abuse :)
Emile
--
http://mail.python.org/mailman/listinfo/python
On 3 aug 2008, at 17.16, [EMAIL PROTECTED] wrote:
for nth square root: use math.sqrt n times for example
Ehum. The OP wants to compute the nth root ( not the nth square root)
import math
num = 625
how_many_sqrt = 2
for i in range(how_many_sqrt):
.. num = math.sqrt(num)
..
num
Hi,
I wanted to generate Captcha images(*) from Python and I couldn't find any module that
suited my needs so I made one myself.
It only needs PIL. (I used PIL 1.1.6)
It can generate images with a provided background or it can make a random background for
you. It needs a truetype font to dr
You will likely cause more problems updating the system python than
managing the two separate installations.
That's sadly worrying.
OSX relies on the version of python they ship.
I think that helps my point--there *are* bug fixes between major
versions despite the new language changes, and
On Sun, Aug 3, 2008 at 10:44 AM, Avinash Vora <[EMAIL PROTECTED]> wrote:
>> You will likely cause more problems updating the system python than
>> managing the two separate installations.
>
> That's sadly worrying.
>
>> OSX relies on the version of python they ship.
>
> I think that helps my point-
CNiall schrieb:
I am very new to Python (I started learning it just yesterday), but I
have encountered a problem.
I want to make a simple script that calculates the n-th root of a given
number (e.g. 4th root of 625--obviously five, but it's just an example
:P), and because there is no nth-roo
I'm in the process of developing an application that will use Python for
a scripting support. In light of the upcoming changes to Python, I was
wondering if it is possible to link to and use two different versions of
Python so that in the future, scripts could be migrated to the new
version,
[EMAIL PROTECTED] wrote:
On Sat, 02 Aug 2008 13:39:25 -0400
"Colin J. Williams" <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
pyspread 0.0.8 has been released.
Are you planning any documentation?
Actually, yes.
0.0.10 will feature some docs.
Any help writing and doing the layout is
On Sun, 03 Aug 2008 14:01:49 -0400, Allen <[EMAIL PROTECTED]> wrote:
> I'm in the process of developing an application that will use Python for
> a scripting support. In light of the upcoming changes to Python, I was
> wondering if it is possible to link to and use two different versions of
>
On Sun, 03 Aug 2008 16:50:22 +0200, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> CNiall schrieb:
...
>> >>> 0.2
>> 0.20001
...
> Welcome to the wonderful world of IEEE754. Just because other languages
> shield you from the gory details they still are there. Python chose to
> not do
Jorgen Grahn schrieb:
On Sun, 03 Aug 2008 16:50:22 +0200, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
CNiall schrieb:
...
>>> 0.2
0.20001
...
Welcome to the wonderful world of IEEE754. Just because other languages
shield you from the gory details they still are there. Python ch
On Fri, 01 Aug 2008 22:47:04 -0400, Mel <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>
>> I'm writing Python as if it were strongly typed, never recycling a
>> name to hold a type other than the original type.
>>
>> Is this good software engineering practice, or am I missing something
>>
Basically I have Mac OS X 10.4.11 and I've got python 2.5.
When I go to TextEdit and type in something like
#!/usr/bin/env python
print 2+2
and save it as simplescript.py.
Then I go to terminal and cd my way to the dir that the script source
is in and type:
python simplescript.py
And the output is
On Fri, 1 Aug 2008 01:05:07 -0700 (PDT), Simon Strobl <[EMAIL PROTECTED]> wrote:
>> What does "load a dictionary" mean?
>
> I had a file bigrams.py with a content like below:
>
> bigrams = {
> ", djy" : 75 ,
> ", djz" : 57 ,
> ", djzoom" : 165 ,
> ", dk" : 28893 ,
> ", dk.au" : 854 ,
> ", dk.b." :
[EMAIL PROTECTED] wrote:
Basically I have Mac OS X 10.4.11 and I've got python 2.5.
When I go to TextEdit and type in something like
#!/usr/bin/env python
print 2+2
and save it as simplescript.py.
Then I go to terminal and cd my way to the dir that the script source
is in and type:
python simpl
On 3 Aug 2008 20:36:33 GMT, Jorgen Grahn <[EMAIL PROTECTED]> wrote:
> On Fri, 1 Aug 2008 01:05:07 -0700 (PDT), Simon Strobl <[EMAIL PROTECTED]>
> wrote:
...
>> If there is no other way to do it, I will have to learn how to use
>> databases in Python.
>
> If you use Berkeley DB ("import bsddb"), yo
Great, I think that's exactly what I'm after. Thank you!
Simon Brunning wrote:
2008/8/3 ToshiBoy <[EMAIL PROTECTED]>:
Currently, I'm using iMacro, an add-on to Firefox, which runs a macro
and enters all the info. It's great, but I would like to try and write
a program for this in Python. It
On Tue, 29 Jul 2008 20:12:14 +0200, Nikolaus Rath <[EMAIL PROTECTED]> wrote:
> Jean-Paul Calderone <[EMAIL PROTECTED]> writes:
>> On Tue, 29 Jul 2008 19:26:09 +0200, Nikolaus Rath <[EMAIL PROTECTED]> wrote:
>>>Jean-Paul Calderone <[EMAIL PROTECTED]> writes:
On Tue, 29 Jul 2008 16:35:55 +0200,
On Aug 3, 9:02 am, CNiall <[EMAIL PROTECTED]> wrote:
> I am very new to Python (I started learning it just yesterday), but I
> have encountered a problem.
>
> I want to make a simple script that calculates the n-th root of a given
> number (e.g. 4th root of 625--obviously five, but it's just an exa
I am inside a Pdb-like Plone debugging tool and I get the following
error at the prompt. I was wondering how to find out from inside the
debugger which namespace the collective.dancing.channel object is
located in. :
collective.dancing.channel.tool_added(DelegateNichols.portal_newsletters,
None)
c
On 3 Aug 2008 20:40:02 GMT, Jorgen Grahn <[EMAIL PROTECTED]> wrote:
> On 3 Aug 2008 20:36:33 GMT, Jorgen Grahn <[EMAIL PROTECTED]> wrote:
> > On Fri, 1 Aug 2008 01:05:07 -0700 (PDT), Simon Strobl <[EMAIL PROTECTED]>
> wrote:
>
> ...
>
> >> If there is no other way to do it, I will have to learn h
On Sun, 03 Aug 2008 14:25:11 -0400
"Colin J. Williams" <[EMAIL PROTECTED]> wrote:
> I've copied your tutorial in my
> site-packages\pyspread directory
I wrote the tutorial in this thread as a step by step guide that
can be followed manually. You do not need to put it anywhere on your
hard drive.
Martin Manns wrote:
On Sun, 03 Aug 2008 14:25:11 -0400
"Colin J. Williams" <[EMAIL PROTECTED]> wrote:
I've copied your tutorial in my
site-packages\pyspread directory
I wrote the tutorial in this thread as a step by step guide that
can be followed manually. You do not need to put it anywhere o
Hi,
I've been working on a python web framework which I think might be of
interest to you.
Details may be found at http://code.google.com/p/keg/wiki/Concept.
All suggestions or comments will be greatly appreciated.
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
CNiall wrote:
I am very new to Python (I started learning it just yesterday), but I
have encountered a problem.
I want to make a simple script that calculates the n-th root of a given
number (e.g. 4th root of 625--obviously five, but it's just an example
:P), and because there is no nth-root
from Tkinter import *
win = Tk()
If I type those two lines at the command prompt (in WindowsXP) I get a
new window on my screen. Yet if I copy those lines in a file called
test.py and then run "python test.py" at the command prompt I am
returned to the command prompt and nothing shows up on t
Allen wrote:
I'm in the process of developing an application that will use Python for
a scripting support. In light of the upcoming changes to Python, I was
wondering if it is possible to link to and use two different versions of
Python so that in the future, scripts could be migrated to the
I'm attempting to insert items into a combo box, but when it goes to run it,
throws up the error:
TypeError: argument 1 of QComboBox.insertItem() has an invalid type
and here is what I'm trying to do:
self.editUsername.insertItem(uname)
editUsername is the combo box, and uname is a string I'm a
Pierre Dagenais wrote:
from Tkinter import *
win = Tk()
If I type those two lines at the command prompt (in WindowsXP) I get a
new window on my screen. Yet if I copy those lines in a file called
test.py and then run "python test.py" at the command prompt I am
returned to the command prompt a
On Aug 4, 2008, at 4:12 AM, Jörgen Grahn wrote:
(You might want to post this to comp.lang.python rather than to me --
I am just another c.l.p reader. If you already have done to, please
disregard this.)
Yeah, I hit "reply" by mistake and didn't realize it. My bad.
(I assume here that Berk
On Aug 3, 3:02 pm, CNiall <[EMAIL PROTECTED]> wrote:
> I am very new to Python (I started learning it just yesterday), but I
> have encountered a problem.
>
> I want to make a simple script that calculates the n-th root of a given
> number (e.g. 4th root of 625--obviously five, but it's just an exa
Emile van Sebille wrote:
Ethan Furman wrote:
--> d25._int = (1, 5)
Python considers names that start with a leading underscore as internal
or private, and that abuse is the burden of the abuser...
Is bytecodehacks still around? That was serious abuse :)
Emile
Good point. What I'm
On 2008-08-03, Larry Bates <[EMAIL PROTECTED]> wrote:
>> However, it appears that when n in 1/n is a power of two, the decimal
>> does not get 'thrown off'. How might I make Python recognise 0.2 as 0.2
>> and not 0.20001?
>>
>> This discrepancy is very minor, but it makes the whole
On Sun, 03 Aug 2008 17:30:29 -0500, Larry Bates wrote:
>> As you can see, the last two decimals are very slightly inaccurate.
>> However, it appears that when n in 1/n is a power of two, the decimal
>> does not get 'thrown off'. How might I make Python recognise 0.2 as 0.2
>> and not 0.200
On Sun, 03 Aug 2008 09:46:45 -0500, Rob Williscroft wrote:
> Steven D'Aprano wrote in news:[EMAIL PROTECTED]
> in comp.lang.python:
>
>>> So the question is: whats going on with timeit.Timer ?
>>
>> As far as I can see, nothing. I think you have misunderstood the
>> results you got.
>
> No, the
its a good point you make. if its not _technically_ immutable, why use
__new__ when __init__ would work just as fine? well, if it should be
treated as immutable, then we should do what we can to follow that,
even in internal code that knows otherwise. Besides, maybe down the
road, protections will
Never mind. I had to run "import collective.dancing" first.
--
http://mail.python.org/mailman/listinfo/python-list
Larry Bates wrote:
Allen wrote:
I'm in the process of developing an application that will use Python
for a scripting support. In light of the upcoming changes to Python,
I was wondering if it is possible to link to and use two different
versions of Python so that in the future, scripts could
Avi wrote:
On that: how would I go about updating the system Python, then?
The usual advice is not to try to do that at all.
Generally it's best to treat anything in /System
as off-limits.
(I used to do so, but it
caused so many issues with installing new packages that I gave up on
it)
I'v
For those who don't follow PlanetPython, Python Magazine, OnLAMP, or
some of the other Python news/blog outlets, PyWorks is a Python
conference being held November 12-14, 2008, in Atlanta, by MTA
(publisher of Python Magazine). The call for papers has been what I
would call a success, but I've noti
I have a very large CSV file that contains double quoted fields (since
they contain commas). Unfortunately, some of these fields also contain
other double quotes and I made the painful mistake of forgetting to
escape or double the quotes inside the field:
123,"Here is some, text "and some quoted t
On 03Aug2008 23:14, Avinash Vora <[EMAIL PROTECTED]> wrote:
>> You will likely cause more problems updating the system python than
>> managing the two separate installations.
>
> That's sadly worrying.
It shouldn't be. It is often useful to have multiple versions of stuff
installed.
Replacing the
> Question 1: How can I locate the Python installation? There a few
> files under Applications > MacPython 2.5, but this is clearly not the
> entire installation.
find / -name "site-packages"
Will lead you to where SciPy and Numpy should be installed for each
Python installation. You can work ba
Python seemed like the right choice for writing a peer-to-peer application,
as the support for sockets is adequate and the cross-platform ability is
nominal. That's why I searched around for P2P frameworks in Python, and
didn't have much luck. The framework that I did find was designed
specifical
Ryan Rosario wrote:
I have a very large CSV file that contains double quoted fields (since
they contain commas). Unfortunately, some of these fields also contain
other double quotes and I made the painful mistake of forgetting to
escape or double the quotes inside the field:
123,"Here is some, t
Hi!
I've just written a Python speech-recognition module (http://
pyspeech.googlecode.com). It provides a clean and simple interface to
the Microsoft Speech SDK using COM wrapper classes generated by
PythonWin's MakePY utility.
Once this is a mature module, I'd like to make it as useful as
possi
This came up again and I was taking a look at it. There seems to still
be no resolution. I have a patch that can add a kwarg to skip this
behavior if you know you need otherwise. Right now its a simple
boolean flag, but is this enough?
Are there any use cases anyone has to define how this case is
76 matches
Mail list logo