"Steve Howell" wrote:
>
> --- Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
> > Angles are real numbers (in the maths sense), so
> > sqrt(pi/4) radians is
> > just as reasonable an angle as pi/4 radians. Both
> > are irrational numbers
> > (that is, can't be written exactly as the ratio of
>
On Sat, 02 Jun 2007 23:25:49 -0700, 7stud wrote:
> Oops. This line:
>
>> temp = object.__new__(Sample, args, kwds)
>
> should be:
>
> temp = object.__new__(cls, args, kwds)
>
> although it would seem that cls is always going to be Sample, so I'm
> not sure what practical difference that makes
On Jun 3, 12:17 am, 7stud <[EMAIL PROTECTED]> wrote:
> On Jun 2, 10:31 pm, lialie <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > suppose i have a free_object list[Sample1, Smaple2]. when create a
> > new object sample(*args, **kwds), if free_object_list isn't empty, just
> > pop one from free_o
On Jun 2, 10:31 pm, lialie <[EMAIL PROTECTED]> wrote:
> Hi,
>
> suppose i have a free_object list[Sample1, Smaple2]. when create a
> new object sample(*args, **kwds), if free_object_list isn't empty, just
> pop one from free_object_list instead of creating a new instance.
>
> any way to do this
Richard, you posted it four times. Not twice.
On 6/2/07, Andrew Holme <[EMAIL PROTECTED]> wrote:
>
> "Richard Gordon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Sorry if this is sent twice, but I didn't see it get posted the first
> > time.
> >
> > I've got a fatal bug using
I just noticed that in your code you used pop(0). It's not efficient
to pop an element off the front of a list because after doing so,
every other element in the list has to be moved over to the left one
position. If you pop() an element off the end of the list, then the
first element in the list
On Jun 2, 10:31 pm, lialie <[EMAIL PROTECTED]> wrote:
> Hi,
>
> suppose i have a free_object list[Sample1, Smaple2]. when create a
> new object sample(*args, **kwds), if free_object_list isn't empty, just
> pop one from free_object_list instead of creating a new instance.
>
> any way to do this
On 02 Jun 2007 20:18:02 -0700, Paul Rubin
<"http://phr.cx"@nospam.invalid> wrote:
> Dan Bishop <[EMAIL PROTECTED]> writes:
> > Note that recent versions of Python automatically promote the results
> > of integer arithmetic to long if necessary, so the distinction is less
> > relevant than it used t
"Richard Gordon" <[EMAIL PROTECTED]> wrote:
>
>I've got a fatal bug using Parente's pyTTS with Python 2.3 on Windoze 32
>using MS SAPI 5.1 and Hammond's win32 module. The test program is
> import pyTTS
> tts = pyTTS.Create()
> tts.Speak('Hello world.')
>...
> com_error: (-2147352567, 'Exceptio
Hi,
suppose i have a free_object list[Sample1, Smaple2]. when create a
new object sample(*args, **kwds), if free_object_list isn't empty, just
pop one from free_object_list instead of creating a new instance.
any way to do this?
I do some work as follows:
class Sample(object):
used_object =
"Joe Riopel" <[EMAIL PROTECTED]> writes:
> Using camel case instead of the under_score means less typing. I am lazy.
Using camelCase instead of lower_case means harder reading. I am lazy.
Remember: a program is read by humans much more often than it is written.
--
\ "If you saw two guys
Carl Banks <[EMAIL PROTECTED]> writes:
> Identifiers should just allow spaces.
>
> first element.get item(selected value)
>
> This is not a joke.
It would be a hideous pain to read though. My decades of schooling
have carved channels in my brain that recognise the space as a
*separator* for lexic
Useful or a bad idea?
I have a module that defines a number of exceptions which inherit from
various built-ins like KeyError, ValueError etc. I'm considering defining
an abstract module exception like MyModuleError, and having all my real
exceptions inherit from it as well, but I don't recall seei
On Jun 3, 10:50 am, leegold <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I run a script in PythonWin and obviously some sort of an error occurs
> in the script and PythonWin closes. No warning, no error message just
> closes. I definitely know the line of code that causes the problem and
> will cite the c
Dan Bishop <[EMAIL PROTECTED]> writes:
> Note that recent versions of Python automatically promote the results
> of integer arithmetic to long if necessary, so the distinction is less
> relevant than it used to be.
Note however that even in recent versions, there are still parts of
Python that get
> i have designed a desktop search utility in python and a file system
> monitoring using readdirectorychangesw from win32api but for eg. it
> has a high cpu utilization (using a 2GHz processor).
I don't think so. I just build a service to monitor a directory
changes using readdirectorychangesw, t
On Jun 2, 9:30 pm, jay <[EMAIL PROTECTED]> wrote:
> I was reading in a book that the 'int' type can store whole numbers
> up to 32 bits. I'm not exactly sure what that means, but got me
> wondering, what's the largest number you can store as an 'int' before
> you need to switch over to 'long'?
sy
On Jun 2, 11:43 am, Tim Golden <[EMAIL PROTECTED]> wrote:
> Thomas Nelson wrote:
> > from subprocess import Popen
> > from time import sleep
> > import win32api
> > war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"])
> > sleep(30)
> > print "slept for 30"
> > print win32api.Termin
I was reading in a book that the 'int' type can store whole numbers
up to 32 bits. I'm not exactly sure what that means, but got me
wondering, what's the largest number you can store as an 'int' before
you need to switch over to 'long'?
Thanks for looking at my question.
Jay
--
http://mai
Mark Carter wrote:
> Josiah Carlson wrote:
>> What kind of scoping did you desire?
>
> Well, I had in mind so that if you defined a function, but wanted to
> access a global var, that you didn't have to use the global keyword. Not
> much of a biggie, I guess.
You already get read access to glo
On Jun 3, 4:47 am, Tim Golden <[EMAIL PROTECTED]> wrote:
> Steve Holden wrote:
> > YuePing Lu wrote:
> >> Hello,
>
> >> Has any of you ever used Python odbc to retrieve data from a relational DB?
>
> >> I encountered a problem where it can't handle datetime _earlier than
> >> _*1969*, and _later th
> It's not clear whether it's an error, however, localtime() does
> something different from what dir does.
Hi Martin,
First off thank you for spending your time to investigate this bug with me.
Thanks for pointing out the issue with Windows XP caching the access
timestamps,
I was not aware of
On Sat, 02 Jun 2007 08:29:59 -0700, Steve Howell wrote:
>
> --- Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>
>> On Sat, 02 Jun 2007 05:54:51 -0700, Steve Howell
>> wrote:
>>
>> >>
>> >>def f(x): y = x*x; return sin(y)+cos(y);
>> >>
>> >
>> > Although I know valid trigonometry is not th
On Jun 2, 5:05 pm, Dan Bishop <[EMAIL PROTECTED]> wrote:
> On Jun 2, 6:54 pm, greenflame <[EMAIL PROTECTED]> wrote:
>
> > First I should start with some introductory comments.
>
> > When I first learned about programming, I started with BASIC, QBASIC
> > to be more accurate. While I was at that st
On Sat, 02 Jun 2007 11:25:04 -0700, Warren Stringer wrote:
> Since `a()` translates to `a() for a in b` then the error would be the exact
> same `TypeError: 'str' object is not callable`
Not in any language called Python I know of.
Supposedly 28 years programming experience, and you can't even s
Josiah Carlson <[EMAIL PROTECTED]> wrote:
> > pitfall of Python is knowing whether an operation is destructive or not.
>
> If it returns None, it probably changes the content of an object.
A reasonable heuristic, but with lots of exceptions, alas:
somedict.get(somekey)
will often return None
Mark Carter <[EMAIL PROTECTED]> wrote:
> I picked Chicken Scheme for OS X. Things started well, and even the web
...
> that; but I found that it ultimately depended on gmp, which turned out a
> pain to compile.
Yes, GMP is a pain to compile (especially on Mac OS X), but I believe
that the Univ
Armin Ronacher <[EMAIL PROTECTED]> writes:
> Jinja 1.1 Released
> ==
>
> Jinja 1.1 codenname sinka is out! And with more changes then ever.
> Here a small summary of the new features and improvements:
This gives the reader no information about what Jinja actually
is. It's far pref
Hi,
I run a script in PythonWin and obviously some sort of an error occurs
in the script and PythonWin closes. No warning, no error message just
closes. I definitely know the line of code that causes the problem and
will cite the code below.
Note: I'm using ArcGIS 9.1 (Python 2.1 is bundled wit
[EMAIL PROTECTED] wrote:
> On Jun 1, 7:50 pm, [EMAIL PROTECTED] wrote:
>> If __getslice__ is depreciated (since version 2.0) why are neither
>> __setslice__ or __delslice__
>> depreciated?http://docs.python.org/ref/sequence-methods.html
>
> Sorry disregard that, I should have RTFA
A request to h
On Jun 2, 6:54 pm, greenflame <[EMAIL PROTECTED]> wrote:
> First I should start with some introductory comments.
>
> When I first learned about programming, I started with BASIC, QBASIC
> to be more accurate. While I was at that stage, I learned about the
> INPUT command. I used it abundantly.
>
>
First I should start with some introductory comments.
When I first learned about programming, I started with BASIC, QBASIC
to be more accurate. While I was at that stage, I learned about the
INPUT command. I used it abundantly.
Ok so now for the actual issue.
I would like to implement something
On Jun 1, 10:33 pm, [EMAIL PROTECTED] wrote:
> 1. Do you like Python?
0
> 2. Do you think Python is good?
0
> 3. Do you think Python is real good?
0
> 4. What is your favorite version of Python?
2.4+
> 5. Because of Python, do you think it will be easier to take over the
> world? If so, when? I
On Jun 2, 12:27 pm, Thomas Nelson <[EMAIL PROTECTED]> wrote:
> Hi, I'd like to start a program, run it for a while, then terminate
> it. I can do this on linux, but I'm new to working with windows.
> Here's my script:
>
> from subprocess import Popen
> from time import sleep
> import win32api
> wa
On Jun 2, 1:20 pm, erikcw <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to send an email message with python, and I'm getting this
> error:
>
> Traceback (most recent call last):
> File "wa.py", line 430, in ?
> main()
> File "wa.py", line 425, in main
> smtp.sendmail(fromaddr, to, ms
[EMAIL PROTECTED] wrote:
> I am trying to learn Python. I am working on a simple backup program
> (code listed below). When using a source directory (the files to be
> backed up) without spaces in the title, my program works fine [see
> line 5]. If I try to access a directory with a space in the
On Jun 2, 2007, at 7:22 AM, SPE - Stani's Python Editor wrote:
> Another alternative are GUI designers such as wxGlade or XRCed, both
> of which ship with SPE (http://pythonide.stani.be). Dabo is especially
> usefull (but not limited to) developping database applications as it
> is an open source
"Richard Gordon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Sorry if this is sent twice, but I didn't see it get posted the first
> time.
>
> I've got a fatal bug using Parente's pyTTS with Python 2.3 on Windoze 32
> using MS SAPI 5.1 and Hammond's win32 module. The test progr
Josiah Carlson wrote:
> Mark Carter wrote:
>> Not that I'm particularly knowledgeable about language design issues,
>> but maybe closures and slightly different scoping rules would be nice.
>
> Python has had closures for years.
I just looked up
http://www.secnetix.de/~olli/Python/lambda_functio
In article <[EMAIL PROTECTED]>,
George Sakkis <[EMAIL PROTECTED]> wrote:
>
>I had probably stumbled on many/most of the common pitfalls usually
>mentioned (e.g. http://www.ferg.org/projects/python_gotchas.html,
>http://zephyrfalcon.org/labs/python_pitfalls.html) while learning, but
>picked them up
Josiah Carlson wrote:
>
> If you are talking about non-blocking reading and writing from the
> subprocess, there isn't natively. But there is a cookbook entry:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554
>
> - Josiah
Any idea why this feature was removed from the lan
On Jun 2, 10:19 am, Steve Howell <[EMAIL PROTECTED]> wrote:
> George Sakkis produced the following cookbook recipe,
> which addresses a common problem that comes up on this
> mailing list:
ISTM, this is a common mailing list problem because it is fun
to solve, not because people actually need it o
Hi Rich,
I've seen errors like this before. first off it will help you better if you
represent your error in hex. Doing so yields this
80020009 <==> -2147352567
0x 0x80020009
Anyways, its probably the result of something not being either
registered/installed correctly (
Kevin Walzer wrote:
> I'm currently using os.popen in an application of mine, which calls for
> non-blocking data, in this fashion:
>
> self.file = os.popen('echo %s | sudo -S /sw/bin/fink -y install %s' %
> (self.passtext, self.packagename), 'r', os.O_NONBLOCK)
>
> What is the equivalent/comp
Mark Carter wrote:
> Not that I'm particularly knowledgeable about language design issues,
> but maybe closures and slightly different scoping rules would be nice.
Python has had closures for years. What kind of scoping did you desire?
> A
> pitfall of Python is knowing whether an operation is
Sorry if this is sent twice, but I didn't see it get posted the first time.
I've got a fatal bug using Parente's pyTTS with Python 2.3 on Windoze 32
using MS SAPI 5.1 and Hammond's win32 module. The test program is
import pyTTS
tts = pyTTS.Create()
tts.Speak('Hello world.')
The resulting de
Duncan Booth wrote:
> "NeBlackCat (lists)" <[EMAIL PROTECTED]> wrote:
>
>> Depending on what you read, sys.exc_info() is supposed to return
>> (None,None,None) when there is no active exception, but it seems that
>> it returns info about the last exception when there isn't one
>> currently active
Steve Holden wrote:
> Larry Bates wrote:
[...]
>> I think I've come up with something that will work. I use PIL
>> Image.getcolors() to get colors and take the top 10 colors of my
>> background page. I then calculate the average of the R, G, B
>> components. That becomes my reference. Then I re
The nexus between 911 truth movement and its success is closely
related to the democratic victory in Pakistan.
The Pakistanian Military Dictator, a foolish patsy of Bush-Neocon-
Crime Syndicate, provided critical validation to the 911 LIE by
implicitly buckling under the false conspiracy theory.
> 1. Do you like Python?
>
Yes, or I wouldn't still be subscribed to the python-list.
> 2. Do you think Python is good?
s
Yes. Well it is a good Language. I can code in python
at-least twice as fast as I could in C or C++.
>
> 3. Do you think Python is real good?
>
Yeah, if you meant 'very' instead
Greetings.
I have been trying to switch to Python from other languages such as Perl and
now I have a newbie question.
I have been trying to run a setup script to install a python library. To do
that I need to run "c:> python setup.py install" but the strange thing is is
that when it runs the
I've got a fatal bug using Parente's pyTTS with Python 2.3 on Windoze 32
using MS SAPI 5.1 and Hammond's win32 module. The test program is
import pyTTS
tts = pyTTS.Create()
tts.Speak('Hello world.')
The resulting debug trace is:
PythonWin 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32
I've got a fatal bug using Parente's pyTTS with Python 2.3 on Windoze 32 using
MS SAPI 5.1 and Hammond's win32 module. The test program is
import pyTTS
tts = pyTTS.Create()
tts.Speak('Hello world.')
The resulting debug trace is:
PythonWin 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32
I've got a fatal bug using Parente's pyTTS with Python 2.3 on Windoze 32 using
MS SAPI 5.1 and Hammond's win32 module. The test program is
import pyTTS
tts = pyTTS.Create()
tts.Speak('Hello world.')
The resulting debug trace is:
PythonWin 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32
Oops, forgot to cut and paste the point, to this:
> > - there is no Python error for "you
> > cannot do this with this object, but you can do it with other objects
> > of the same type".
>
> Yes there is:
>
> #
> def yo(): print "yo"
> def no(): print blah
> yo()
> no()
Steve Holden wrote:
> YuePing Lu wrote:
>> Hello,
>>
>> Has any of you ever used Python odbc to retrieve data from a relational DB?
>>
>> I encountered a problem where it can't handle datetime _earlier than
>> _*1969*, and _later than _*2040*. It just returned some garbage strings
>> when I call
> When using a source like this on line 5:
>
> source = [r'C:\test\test 2\\']
>
> which has a space in the title, the program will not work.
Try wrapping that argument in double quotes when you build the command
--
http://mail.python.org/mailman/listinfo/python-list
Larry Bates wrote:
> Steve Holden wrote:
>> Larry Bates wrote:
>>> Steve Holden wrote:
Larry Bates wrote:
> I have a project that I wanted to solicit some advice
> on from this group. I have millions of pages of scanned
> documents with each page in and individual .JPG file.
>
Andre Engels wrote:
> > I am not insisting on anything. I use ``c[:]()`` as shorthand way of
> saying
> > "c() for c in d where d is a container"
> >
> > Having c() support containers seems obvious to me. It jibes with duck
> > typing. Perhaps the title of this thread should have been: "Why don't
>
I'm currently using os.popen in an application of mine, which calls for
non-blocking data, in this fashion:
self.file = os.popen('echo %s | sudo -S /sw/bin/fink -y install %s' %
(self.passtext, self.packagename), 'r', os.O_NONBLOCK)
What is the equivalent/comparable call in the new subprocess
I am trying to learn Python. I am working on a simple backup program
(code listed below). When using a source directory (the files to be
backed up) without spaces in the title, my program works fine [see
line 5]. If I try to access a directory with a space in the name the
program fails with this er
On Jun 2, 12:31 pm, Steve Howell <[EMAIL PROTECTED]> wrote:
> --- Mark Carter <[EMAIL PROTECTED]> wrote:
>
> > Well, I know I'm preaching to the converted - but
> > Python rocks.
> > [...]
>
> A few questions from the choir:
>
> As a recent newcomer to the language, did you
> encounter any traps or
Steve Howell wrote:
> --- Mark Carter <[EMAIL PROTECTED]> wrote:
>
>> Well, I know I'm preaching to the converted - but
>> Python rocks.
>> [...]
>
> A few questions from the choir:
>
> As a recent newcomer to the language, did you
> encounter any traps or pitfalls while you were
> learning? Al
Hi,
I am trying to automate a telnet session (currently using Python's
telnetlib) and would like to echo any response of the remote host to
stdout, as soon as it arrives on telnetlib's open TCP socket.
Currently I print the return value of the read_some() method (or other
read* methods) to the
"Bill Maxwell" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| On 19 Mar 2007 10:40:03 -0700, [EMAIL PROTECTED] wrote:
|
| ...
| >You might want to submit this to the wxpython news-group.
| ...
|
| What is the name of this newsgroup? I can't seem to locate it on my
| news server.
Hi,
I'm trying to send an email message with python, and I'm getting this
error:
Traceback (most recent call last):
File "wa.py", line 430, in ?
main()
File "wa.py", line 425, in main
smtp.sendmail(fromaddr, to, msg.encode('utf-8'))
File "/usr/local/lib/python2.4/smtplib.py", line 6
George Sakkis produced the following cookbook recipe,
which addresses a common problem that comes up on this
mailing list:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/521877
I would propose adding something like this to the
cookbook example above.
def iterblocks2(lst, start_delim):
Steve Holden escribió:
> Matias Surdi wrote:
>> Thanks for your reply.
>>
>> This is the code that creates the file:
>> lock_file = open(".lock","w")
>> lock_file.write("test")
>> lock_file.close()
>> #Change permissions so that CGI can write lock file
>> os.chmod(".lock",stat.S_IMODE(stat.S_IRWX
YuePing Lu wrote:
> Hello,
>
> Has any of you ever used Python odbc to retrieve data from a relational DB?
>
> I encountered a problem where it can't handle datetime _earlier than
> _*1969*, and _later than _*2040*. It just returned some garbage strings
> when I call str(my_date_object).
>
> W
Tim Golden wrote:
> Thomas Nelson wrote:
[... re problem Terminating process ...]
>> File "C:\Python24\warcraft\runwar3.py", line 7, in ?
>> print win32api.TerminateProcess(int(war3game._handle),-1)
>> error: (5, 'TerminateProcess', 'Access is denied.')
>>
>> I'm logged in as adminstrator.
Steven Bethard wrote:
> Wildemar Wildenburger wrote:
>
> class Observable(object):
>
>> ... def __init__(self, func, instance=None, observers=None):
>> ... self.func = func
>> ... self.instance = instance
>> ... self.observers = observers or []
>>
Thomas Nelson wrote:
> from subprocess import Popen
> from time import sleep
> import win32api
> war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"])
> sleep(30)
> print "slept for 30"
> print win32api.TerminateProcess(int(war3game._handle),-1)
> #print
> ctypes.windll.kernel32.Te
--- Mark Carter <[EMAIL PROTECTED]> wrote:
> Well, I know I'm preaching to the converted - but
> Python rocks.
> [...]
A few questions from the choir:
As a recent newcomer to the language, did you
encounter any traps or pitfalls while you were
learning? Also, could you single out anything in
p
Hi, I'd like to start a program, run it for a while, then terminate
it. I can do this on linux, but I'm new to working with windows.
Here's my script:
from subprocess import Popen
from time import sleep
import win32api
war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"])
sleep(30
Wildemar Wildenburger wrote:
class Observable(object):
> ... def __init__(self, func, instance=None, observers=None):
> ... self.func = func
> ... self.instance = instance
> ... self.observers = observers or []
Unless you also changed code in __get__, this means yo
--- Steve Howell <[EMAIL PROTECTED]> wrote:
>
> Can I suggest a minor optimization?
>
> Instead of this...
>
> def get_predicate(arg):
> return arg if callable(arg) else (
>arg.__eq__ if hasattr(arg,'__eq__')
> else
>lambda item: item == arg)
>
Neve
Peter Otten wrote:
class Descriptor(object):
> ... def __get__(*args): return object()
> ...
>
class SomeActor(object):
> ... meth = Descriptor()
> ...
>
SomeActor.meth is SomeActor.meth
> False
>
Of course ...
Man, this lang
David Wahler wrote:
> On Jun 2, 12:27 am, Steven Bethard <[EMAIL PROTECTED]> wrote:
>> I think you want to define __get__ on your Observable class so that it
>> can do the right thing when the method is bound to the instance:
[snip]
> Is this desired behavior?
>
a = SomeActor()
b = SomeA
Wildemar Wildenburger wrote:
> Thanks for the thorough explanation. But you did mock me with that
> "SomeActor.meth is SomeActor.meth"-line, right? ;)
Acually, no:
>>> class Descriptor(object):
... def __get__(*args): return object()
...
>>> class SomeActor(object):
... meth = Descriptor
--- George Sakkis <[EMAIL PROTECTED]> wrote:
> > It seems
> > like it would be fairly straightforward to do a
> quick
> > prototype implementation of this. I'm off to work
> > soon, so I can't do it today, but maybe Sunday.
>
> I'm afraid I beat you to it :)
>
http://aspn.activestate.com/ASPN/
David Wahler wrote:
>
> Here's my attempt at an implementation that works as a decorator. It
> stores the observers in a dictionary attribute of the instance, using
> the method name as a key. For example:
>
>
> [snip: another nice aproach]
> Anyway, these are just my initial thoughts -- I don't
--- Steve Howell <[EMAIL PROTECTED]> wrote:
>
> --- Stef Mientki <[EMAIL PROTECTED]>
> wrote:
> > Maybe he meant
> >sin(x)^2 + cos(x)^2
> > which is well known demodulation technique if you
> > create two signals 90 degrees out of phase.
> >
>
A more realistic subexpression where you migh
Peter Otten wrote:
> Then you have modified the code posted by Steven Bethard.
>
>
Oops. Indeed I did.
I changed this
>>> class Observable(object):
... def __init__(self, func, instance=None, observers=None):
... if observers is None:
... observers = []
... self.
--- Stef Mientki <[EMAIL PROTECTED]>
wrote:
> Maybe he meant
>sin(x)^2 + cos(x)^2
> which is well known demodulation technique if you
> create two signals 90 degrees out of phase.
>
There's a shorter way to phrase that expression, of
course. :)
1
--- Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Sat, 02 Jun 2007 05:54:51 -0700, Steve Howell
> wrote:
>
> >>
> >>def f(x): y = x*x; return sin(y)+cos(y);
> >>
> >
> > Although I know valid trigonometry is not the
> point of
> > this exercise, I'm still trying to figure out why
> > an
hello,
i have designed a desktop search utility in python and a file system
monitoring using readdirectorychangesw from win32api but for eg. it
has a high cpu utilization (using a 2GHz processor).
a solution ntfs change journal proposed here works only for ntfs
partitions
is there another low (proc
On Thu, 31 May 2007 12:25:17 -0500, Chris Mellon <[EMAIL PROTECTED]> wrote:
> On 31 May 2007 03:45:32 -0700, bullockbefriending bard
> <[EMAIL PROTECTED]> wrote:
>> Thanks this is good news. I think my C/C++ background is sufficient to
>> manage to figure things out if I RTFM carefully.
>>
>> Basic
On Jun 2, 3:00 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> Then you have modified the code posted by Steven Bethard.
>
> > I don't see how your behaviour should come about ... a new observer-list
> > is created for every decorated method, so there is no problem.
>
> Yes, but that list is shared a
Steve Howell wrote:
>>def f(x): y = x*x; return sin(y)+cos(y);
>>
>
> Although I know valid trigonometry is not the point of
> this exercise, I'm still trying to figure out why
> anybody would ever take the square of an angle.
> What's the square root of pi/4 radians?
Maybe he meant
sin(x)
Wildemar Wildenburger wrote:
> David Wahler wrote:
>> Is this desired behavior?
>>
>>
> a = SomeActor()
> b = SomeActor()
> a.meth.observers is b.meth.observers
>
>> True
>>
> No it's not, but I get
>
a = SomeActor()
b = SomeActor()
a.meth.observers i
On Sat, 02 Jun 2007 05:54:51 -0700, Steve Howell wrote:
>>
>>def f(x): y = x*x; return sin(y)+cos(y);
>>
>
> Although I know valid trigonometry is not the point of
> this exercise, I'm still trying to figure out why
> anybody would ever take the square of an angle.
> What's the square root
Well, I know I'm preaching to the converted - but Python rocks.
I've been enchanted by the siren calls of Scheme, Lisp and Forth, but in
the end, I find Python much easier. I even tried a little bit of Tcl.
To give a bit of context ... I have recently switched from Windows to OS
X and Linux. I
I am a relative newbie to Python and certainly to this mailing list. I
have watched this thread with interest. After the first few exchanges I
thought it would prove interesting and it has.
Warren Stringer is one of two things:
A joker having some fun at your expense.
An intellectually prete
On Jun 1, 7:00 am, Steve Howell <[EMAIL PROTECTED]> wrote:
> --- Tijs <[EMAIL PROTECTED]> wrote:
>
> > Yes, or a single one that takes a wide range of
> > construction possibilities,
> > like strings, lambdas or regexes in various keyword
> > parameters.
>
> > BlockReader(f, start='>')
> > BlockRea
David Wahler wrote:
> Is this desired behavior?
>
>
a = SomeActor()
b = SomeActor()
a.meth.observers is b.meth.observers
> True
>
No it's not, but I get
>>> a = SomeActor()
>>> b = SomeActor()
>>> a.meth.observers is b.meth.observers
False
I don't see how your
>
>def f(x): y = x*x; return sin(y)+cos(y);
>
Although I know valid trigonometry is not the point of
this exercise, I'm still trying to figure out why
anybody would ever take the square of an angle.
What's the square root of pi/4 radians?
In article <[EMAIL PROTECTED]>,
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, Roy Smith
> wrote:
>
> > In article <[EMAIL PROTECTED]>,
> > [EMAIL PROTECTED] wrote:
> >> 7. How many Z80 assembly language programmers does it take to equal
> >> one Python guru?
> >
On May 30, 7:47 pm, yuce <[EMAIL PROTECTED]> wrote:
> re: BJörn, I think selecting a GPL license will increase the number of
> usable packages, since using Python license with GPL is perfectly fine
> as long as the whole software is licensed under GPL [I am not really
> sure it is a must to license
On Jun 1, 9:33 pm, [EMAIL PROTECTED] wrote:
> 1. Do you like Python?
yes
> 2. Do you think Python is good?
yes
> 3. Do you think Python is real good?
yes
> 4. What is your favorite version of Python?
The most recent one.
> 5. Because of Python, do you think it will be easier to take over th
On Jun 1, 2007, at 9:33 PM, [EMAIL PROTECTED] wrote:
> 1. Do you like Python?
It's pretty good.
> 2. Do you think Python is good?
It's pretty good.
> 3. Do you think Python is real good?
It's pretty good.
> 4. What is your favorite version of Python?
The one I have.
> 5. Because of Python,
1 - 100 of 115 matches
Mail list logo