7stud wrote:
> http://www.evolt.org/article/OO_programming_the_Python_way/18/449/
>
> lol
I would have to agree. I could spend time talking about how bad that
article was, but instead I will offer useful advice for the new Python
programmer.
For new users of Python and/or object-oriented prog
>
>
> Check the two alternatives:
>
> def f(x):
> y = x*x
> return sin(y) + cos(y)
>
> 44 key presses, including tabs and newlines and a blank line after the
> function, but excluding counting the shift key separately.
>
> lambda x: (lambda y: sin(y) + cos(y))(x*x)
>
> 42 key presses.
<[EMAIL PROTECTED]> wrote:
> 7. How many Z80 assembly language programmers does it take to equal
> one Python guru?
About one tenth of an assembly language programmer?
I suppose it depends on how you define "equal".
As for the bar room people - they are all people clinging to weird belief
syst
On 2 Jun, 01:13, David Wahler <[EMAIL PROTECTED]> wrote:
> On Jun 1, 3:49 pm, mosscliffe <[EMAIL PROTECTED]> wrote:> I have the
> following code, which I thought would create a cookie, if
> > one did not exist and on the html form being sent to the server, it
> > would be availabe for interrogatio
Hi:
Can anyone tell me how to access the IRichEditOle interface from python.
I realise I have to send a M_GETOLEINTERFACE message to the window
concerned but from then on I am stuck. I carn't seem to find a type
library. Any help apreciated. I am using either com types or the win32
extensions
Alex Martelli wrote:
> You can find a few examples of me demonstrating the subject of your
> interest by searching for my name e.g. on video.google.com; searching
> for my name on Amazon will show some books using similar techniques, and
> searching for my name on groups.google.com will find about
> Reviewing my code it seems that it should still work with the 2.5.1 os.stat
> changes however that does not appear to be the case.
>
> Timestamps reported by os.stat() are no longer correct and the results are
> not even consistent.
I don't think this is the case. The results Python reports a
[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?
No. If it were real good, it would have type inference and (based on that)
compile-time type checking and optimized native-code compilation.
Of course, ty
>> How did you do that?
>
> I used a "touch" utility to set the dates but let's try it a different way.
What touch utility specifically? Is source code available of that tool?
> Looks like Python 2.4.2 is reporting the timestamps correctly
Unfortunately, no. Python 2.4 (and earlier) has an erro
> File Name : P:\sw\Python\Lib\cgi.pyc
>
> python_access_ts: 05/31/2007 07:17 PM
> win_access_ts : 05/31/2007 06:35 PM
>
> File Name : P:\sw\Python\Lib\code.pyc
>
> python_access_ts: 05/30/2007 07:59 PM
> win_access_ts : 05/30/2007 07:22 PM
I have analyzed these cases in mor
[EMAIL PROTECTED] wrote:
> Essay: "C++ is better than C", agree or disagree? (four word maximum)
disagree: too many pluses.
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 2, 9:32 am, mosscliffe <[EMAIL PROTECTED]> wrote:
> David,
>
> Thanks for your help.
>
> I spent all last night trying to get it to work, but I can not work
> out how to force my cookie into the response header. The most
> annoying part is on one occasion it did and the cookie sat there unt
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:
>
> >>> class Observable(object):
> ... def __init__(self, func, instance=None, observers=No
[EMAIL PROTECTED] wrote:
> Bonus: A rabbi walks into a bar while nursing a baby goat. He is
> closely followed by a priest, and a Perl hacker. Explain.
Getting religious, eh? :)
http://xkcd.com/c224.html
Regards,
Björn
--
BOFH excuse #14:
sounds like a Windows problem, try calling Microso
On Jun 2, 7:20 am, Bill Maxwell
<[EMAIL PROTECTED]> wrote:
> 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.
>
> Thanks,
>
> Bill
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,
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 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
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?
> >
>
>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?
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
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
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
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
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
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
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)
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
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
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
--- 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
--- 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
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.
--- 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
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
--- 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/
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
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
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
--- 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
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
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
--- 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
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
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 []
>>
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.
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
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
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):
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
"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 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
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
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
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
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
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
>
> 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
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
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()
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
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.
>
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
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
> 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
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.
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
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
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
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
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
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 (
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
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
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:
> 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
"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
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
[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, 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
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 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
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 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.
>
>
[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
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
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
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
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
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
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 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
> 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 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
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
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
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
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
> 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
1 - 100 of 115 matches
Mail list logo