le.
Hit TAB again and it cylces in the possible indentations.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
dentation shortly:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/80654a87bfa89e3b
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
I'm trying to write a Win32 service. The following is straight from Python
Programming on Win32 and it doesn't work. Is that book out of date; is
there a new way to do services? I searched Google for hours trying to find
any other method, and have been beating on this one for 5 more hours.
The pre
Giles Brown wrote:
> Yeah. You've cleverly decided to simplify the "smallest possible
> python service" by removing the
> if __name__ == '__main__':
Ha ha. :)
Seriously, though, I removed that long after it was failing to work, and
have since replaced it and it didn't affect a thing.
Gabriel G
Giles Brown wrote:
> Yeah. You've cleverly decided to simplify the "smallest
> possible python service" by removing the
> if __name__ == '__main__':
Ha ha. :)
Seriously, though, I removed that long after it was failing to work, and
have since replaced it and it didn't affect a thing.
Gabriel Ge
George Sakkis schrieb:
> I'd like to gather advice and links to any existing solutions (e.g.
> libraries, frameworks, design patterns) on general ways of writing
> complex web forms, as opposed to the typical {name:value} flat model.
> A particular case of what I mean by complex is hierarchical for
Edward Elliott schrieb:
> On top of that, the expressive power of nested comments seems greater
> than an endless string of ^#s. Sometimes it's just easier to see what's
> going on.
not if you are using grep
--
Gregor
http://www.gregor-horvath.com
--
http://mail.python.o
[EMAIL PROTECTED] schrieb:
>
> Does Python have a mechanism for events/event-driven programming?
>
Probably this is something for you:
http://twistedmatrix.com/trac/
--
Servus, Gregor
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
Chris schrieb:
> How do I find and print to screen the IP address of the computer my
> python program is working on?
>
IP adresses are bound to network interfaces not to computers.
One Computer can have multiple network interfaces.
--
Servus, Gregor
http://www.gregor-horvath.com
[EMAIL PROTECTED] schrieb:
>
> Is there a standard way to document protocols in Python? Of should I
> come up with something tailored to my needs.
>
Write unittests or doctest strings.
--
Servus, Gregor
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
seperatly.
On the clients there should only be python and the necessary libraries
and third party modules (sqlobject etc.) installed.
How do I make a setup script that only installs the necessary things,
without the program itself. Is there a tool for that?
--
Servus, Gregor
http://www.gregor
s from the c:\winnt directory (for
example pywintypes24.dll) into the current directory.
Thanks for this solution, works great, did not know that you can run
python programs even without a python installation on the local machine!
Nice!
--
Servus, Gregor
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
>>> None <= 0
True
Why?
Is there a logical reason?
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
D'Arcy J.M. Cain schrieb:
On Fri, 25 Apr 2008 20:27:15 +0200
Gregor Horvath <[EMAIL PROTECTED]> wrote:
>>> None <= 0
True
Why?
Why not?
Because, from http://www.python.org/dev/peps/pep-0020/ :
Errors should never pass silently.
In the face of ambiguity, refuse
Hi,
class A(object):
test = "test"
class B(object):
a = A()
In [36]: B.a.test
Out[36]: 'test'
In [37]: getattr(B, "a.test")
---
Traceback (most recent call last)
/ in ()
: type object 'B' has no attribut
Peter Otten schrieb:
make your own function that loops over the attributes, or spell it
reduce(getattr, "a.test".split("."), B)
'test'
Thank's, but this does not work for this case:
class A(object):
test = "test"
class B(object):
a = [A(),]
In [70]: reduce(getattr, "a[0].test".s
Hi,
why is this code failing?
class B(object):
pass
B.testattr = property(lambda s:"hallo")
b = B()
b.testattr = "test"
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
/tmp/python-14202ViU.py in ()
14 B.testattr = property(lambda s:"hallo")
15 b = B()
---> 16 b.testattr = "tes
Gregor Horvath schrieb:
why is this code failing?
OK I answer myself :-)
Because there is not fset function definied in the property.
I have to del the attr before rebinding the attributename to another object.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
= test.A()
Running test1.py outputs:
init
the "del" is missing.
I suppose the a object should be garbage collected!?
--
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
python when it goes
out of scope?
Do I manually have to del all class objects, so that their class
attributes get gc'd
--
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth schrieb:
> What is less obvious is that new style classes always include circular
> references, so a class is never detroyed until the garbage collector runs.
Thanks. I tried the same example with old style classes and A.__del__
gets correctly called.
> Of course, if your __del__
Duncan Booth schrieb:
> First off, never depend on __del__ to do anything critical. The only
Thanks to all of you!
Everything's clear now!
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Kevin Feng schrieb:
> More information about this error may be available in the server error log.
>
>
>
> Any suggestions? Much thanks.
>
What does the error log of the webserver say?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
a COM Browser.
Or if you have MS-Office installed, there is a COM Browser in the VBA IDE.
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
pliciation the goal is to only have problem or
domain specific code.
Middelware or ORM is a way to this goal because it encapsulates and
hides the technical details of persistence and helps for cleaner code.
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareen
better approach.
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
obgho
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano schrieb:
> I don't know of many other OO languages that didn't/don't have
> inheritance,
VB4 - VB6
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
to avoid having to
properly understand the way a von Neumann architecture (or Assembler) works?
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
win32com.client.Dispatch(scopeProgID)
scope.Connected = True
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
Mobil: +43(0)69910879004
Fax: +43(0)1/25330333931 http://www.gregor-horvath.com
--
Mit freundlichen Grüßen,
Ing. Gregor Horv
Hello,
I've done database console in jython called jydbconsole. It's now
available on sourceforge. As you can guess console needs jdbc drivers.
The script that runs jython itself doesn't public -cp option to add
another classpaths. Yes I need to add jdbc drivers to classpath ...
Of course I see
see a screenshot of a run of this script here:
http://www.dropbox.com/gallery/2016850/1/TurtleCollector?h=6b370a
The script could be expanded in several ways, e. g. for
doing statistical investigations or examinig how the
result depends on different parameters like drunkenness etc.
Or you distrib
ht(90)
designer.hideturtle()
Hoping, you will find this a bit interesting,
best regards
Gregor
Here's the graphical output:
http://www.flickr.com/photos/17157...@n00/4148139184/in/photostream/
(Python 3.1)
If you actually wanna fold the T, you need to snip off the cap and
reverse it, per
rk (Pakistan), we can't find Python developers. I asked HR to send
[...]
> 4. Any suggestions or idea? Related posts, articles etc would
> certainly help!
http://www.paulgraham.com/pypar.html
--
Gregor
http://gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
org/pipermail/tutor/2002-November/018353.html
--
Gregor
http://gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
fines TestFoo1 and TestFoo2
>bar.py # defines TestBar1 and TestBar2
Nose does what you want:
http://packages.python.org/nose/
--
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Am Sun, 04 Jul 2010 18:51:54 -0500
schrieb Tim Chase :
> I think it's the same venting of frustration that caused veteran
> VB6 developers to start calling VB.Net "Visual Fred" -- the
> language was too different and too non-backwards-compatible.
>
VB6 -> VB.NET and Python 2 -> 3 is not a vali
Am Mon, 05 Jul 2010 14:32:13 -0500
schrieb Tim Chase :
> On 07/05/2010 02:50 AM, Gregor Horvath wrote:
> > Am Sun, 04 Jul 2010 18:51:54 -0500
> > schrieb Tim Chase:
> >
> >> I think it's the same venting of frustration that caused veteran
> >> VB6 dev
ve to be useful.
Best regards,
Gregor
P.S.: I tried to announce it at comp.lang.python.announce
but for some unknown reason it was not accepted there
--
http://mail.python.org/mailman/listinfo/python-list
and Python's
turtle module are quite different - as one could grasp easily by trying
out the collection of examples at python-turtle-demo.googlecode.com that
I posted in another posting. Anyway they could very well complement one
another in some more mature state of development.
Best regards,
G
#x27;s not so a bad idea to install Python if one want's to learn it, anyway.
Regards,
Gregor
Ram.
--
http://mail.python.org/mailman/listinfo/python-list
brary must not break code of
previous users of that module. In short: I did not name these functions
but I had to use the names that already were there.
Nevertheless I'd prefer left and right over turn even today, especially
for kids as I argued before.
Regards,
Gregor
It would be cer
print(".".join(sorted(k)), "%d-%d" % (min(v), max(v)))
Regards,
Gregor
I've tried various methods, which all fail. Does anyone have an idea
how to do this?
Thank you very much!
Jay
--
http://mail.python.org/mailman/listinfo/python-list
different though,
if you had floating point boundaries of the intervals.
Regards,
Gregor
Duane
--
http://mail.python.org/mailman/listinfo/python-list
Gregor Lingl schrieb:
As my proposed solution shows this approach can
be done with on board means of Python (namely
the set type). This would be quite different though,
if you had floating point boundaries of the intervals.
... or if the intgers involved were very big :-(
Regards,
Gregor
lease post it?
(The one you posted below uses some commands of the
turtle 2.6 module which are not present in 2.5, so it
doesn't run with Python 2.5)
Regards,
Gregor
Had to change to
tooter = turtle.Turtle()
tooter.screen.tracer(False) # tracer now a screen attribute
to turn tracing
esn't concern the problem
reported by mensator.
Regards,
Gregor
Naturally, having tracing on caused my program to crash.
It seg faulted or raised an exception?
[...]
Unfortunately, that calculation of nhops is illegal if diffsq is
an .mpf (gmpy floating point). Otherwise, you get
How do
ngle
turtle objects but all the turtles on a given screen.
So there is an icompatibility beween 2.6 and 3.x
But as far as I have understood, this doesn't concern the problem
reported by mensator.
Only that the problem is hidden when tracing is off, as the nhops
variable is never e
at all:
What would be the results when using the old turtle
module with Python 3.1 (it will certainly not run
out of the box, but perhaps 2to3 might do it?)
That would clarify the question if there is some
impact of new division or some changes in Tkinter.
Best regards,
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
n(z)>3 else z
>>> comaSep("7")
'7'
>>> comaSep("2007")
'2,007'
>>> comaSep("12024")
'12,024'
>>> comaSep("509")
'509'
>>> comaSep("75096042068045")
'75,096,042,068,045'
>>>
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
n(z)>3 else z
>>> comaSep("7")
'7'
>>> comaSep("2007")
'2,007'
>>> comaSep("12024")
'12,024'
>>> comaSep("509")
'509'
>>> comaSep("75096042068045")
'75,096,042,068,045'
>>>
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
;
>>>
Emile
Less beautiful but more correct:
>>> ",".join([jj[max(ii-3,0):ii] for ii in
range(len(jj)%3,len(jj)+3,3)])
'1,234,567,890,123,456,789'
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
1.5)
(0.5, 1.0)
Christian
Or without the need to import something:
>>> divmod(1.5, 1)
(1.0, 0.5)
>>>
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Mark Tolonen schrieb:
"Gregor Lingl" wrote in message
news:4a87036a$0$2292$91cee...@newsreader02.highway.telekom.at...
Emile van Sebille schrieb:
On 8/14/2009 5:22 PM candide said...
...
What is the pythonic way to do this ?
I like list comps...
>>> jj = &
27;.join(list(chunks(s
1,234,567,890
>>> print(','.join(list(chunks(s,2
12,34,56,78,90
>>> print(','.join(list(chunks(s,4
12,3456,7890
Regards,
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
;
> I have Python 2.6 on my developer machine and am using the pywin
> support (Mark Hammonds???) for Python 2.6.
Try to install:
http://www.microsoft.com/downloads/details.aspx?familyid=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
2.6 is linked against VS8 dlls, which are miss
etc.)
I google search was not successfull.
Does anybode know of such a handler?
--
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be
followed by any number of letters, digits ([0-9]), hyphens ("-"),
underscores ("_"), colons (":"), and periods ("."). [1]
Is there a encoder / decoder in Python that can convert arbitrary text
to and from this encoding in an re
Am Mon, 20 Sep 2010 21:36:46 +1200
schrieb Lawrence D'Oliveiro :
> In message <20100920104546.3699e...@valun>, Gregor Horvath wrote:
>
> > Is there a encoder / decoder in Python that can convert arbitrary
> > text to and from this encoding in an readable manner?
>
Am Tue, 21 Sep 2010 11:35:14 -0700 (PDT)
schrieb joblack :
> Let's say I've got a function with
>
> def doesSomething(A='bla'):
> ...
>
> and I try to call it with a non existent variable with
>
> doesSomething(DoesNotExist)
>
> What will happen? Will it throw an exception or will it take the
101 - 160 of 160 matches
Mail list logo