Hi,
Am Thu, 26 Jun 2014 08:24:56 -0700 (PDT)
schrieb dandrigo :
> I coded a python script (web service with query postgresql/postgis).
> Up to now, i did several test on my local laptop station (windows).
>
> Now i want to execute this python script on our remote server (Web
> server : Apache;O
Am 13 May 2014 01:18:35 GMT
schrieb Steven D'Aprano :
>
> - have a simple way to write bytes to stdout and stderr.
there is the underlying binary buffer:
https://docs.python.org/3/library/sys.html#sys.stdin
greg
--
https://mail.python.org/mailman/listinfo/python-list
Am Mon, 23 Dec 2013 16:30:35 -0800
schrieb Igor Korot :
>
> Now, it looks that the python way of validating the date/time of the
> string is to call strptime(). However looking at the docs and trying
> to use the function I didn't find a way to check for the milliseconds.
> Now the dates can be f
Am Wed, 3 Apr 2013 21:32:33 -0700 (PDT)
schrieb llanitedave :
> I would hate to have to break up this line, for instance:
>
> self.mainLabel.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD,
> faceName = "FreeSans"))
I think this is much more readable:
self.mainLabel.SetFont(wx.Font(12,
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 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
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?
>
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, 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
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
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
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
org/pipermail/tutor/2002-November/018353.html
--
Gregor
http://gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
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
etc.)
I google search was not successfull.
Does anybode know of such a handler?
--
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
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
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 = &
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
;
>>>
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
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
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
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
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
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
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
different though,
if you had floating point boundaries of the intervals.
Regards,
Gregor
Duane
--
http://mail.python.org/mailman/listinfo/python-list
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
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
#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
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
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
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
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
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,
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
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,
>>> None <= 0
True
Why?
Is there a logical reason?
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
le.
Hit TAB again and it cylces in the possible indentations.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli schrieb:
>
> Why, thanks for the pointer -- I'm particularly proud of having written
> """
> The only really workable way to develop large software projects, just as
> the only really workable way to run a large business, is a state of
> controlled chaos.
> """
Yes, indeed a good sa
Alexander Eisenhuth schrieb:
>
> I'm wodering how the information hiding in python is ment. As I
> understand there doesn't exist public / protected / private mechanism,
> but a '_' and '__' naming convention.
>
> As I figured out there is only public and private possible as speakin in
> "C+
Hello,
I have some of these nefarious pickle errors I do not understand,
maybe some of you have a clue.
This is what I get
(nd is the object which I want to pickle [cPickle.dumps(nd,2)], with
the printout of nd.__dict__):
ERROR Error: Can't pickle : attribute lookup
__builtin__.instancemethod f
Gerardo Herzig schrieb:
>
> @is_logued_in
> def change_pass():
>bla
>bla
>
> And so on for all the other functions who needs that the user is still
> loged in.
>
> where obviosly the is_logued_in() function will determine if the dude is
> still loged in, and THEN execute change_pass().
walterbyrd schrieb:
> Don't get me wrong: I am not saying that PHP is better than Python for
> web-development. But, I sometimes think that Python could learn a few
> things from PHP.
Yes, indeed we can learn that popularity is not superiority. ;-)
Gregor
--
http://mail.pyth
lltalk, Python has not created an own
Again, that's how Open Source or a Toolkit driven development (Unixy)
works.
For every problem there are 5 solutions. One size does not fit all.
It's no fault that for example Linux Distributions do not have only one
GUI but a lot of them. It
softwares like in Windows's created by C++ or
> Delphi.
>
have a look at Dabo
http://www.dabodev.com/
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
h for me.
>
That's a property of open source projects.
Features nobody really needs are not implemented.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
http://effbot.org/pyfaq/my-class-defines-del-but-it-is-not-called-when-i-delete-the-object.htm
better solutions:
http://docs.python.org/ref/try.html
http://docs.python.org/whatsnew/pep-343.html
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
estroyed strings because of bad editors, although I
guess that Unicode strings in code are way more common than Unicode
identifiers would ever be.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
eaningful
their setup will display it correctly. Otherwise they could not work
with their computer anyway.
Until now I did not find a single Computer in my German domain who
cannot display: ß.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Istvan Albert schrieb:
> On May 17, 2:30 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote:
>
>> Is there any difference for you in debugging this code snippets?
>
>> class Türstock(object):
>
> Of course there is, how do I type the ü ? (I can copy/paste for
&
ifferent cultures once living in a big multicultural kingdom.
A mix up of Python key words and German identifiers feels very natural
for me. I live in cultural diversity and richness and love it.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
code is the default in Python 3000.
Wake up before it is too late for you.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
htened to death by that fact ;-)
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
hose languages), but all are used in the correct original context.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Processing test...
Warnings...
test.py:7: Variable (createdIncidentID) not used
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
ejson-1.3/docs/index.html
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Sometimes these are words that are
not even used in general German. Even in German different customers are
naming the same thing with different words. Talking and coding in the
language of the customer is a huge benefit.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] schrieb:
> On May 16, 12:54 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote:
>> Istvan Albert schrieb:
>>
>> So the solution is to forbid Chinese XP ?
>>
>
> It's one solution, depending on your support needs.
>
That would be
easy.
It would have been completely impossible if our schools system would not
have been wise enough to teach as English early.
I think millions of people are handicapped because of this.
Any step to improve this, is a good step for all of us. In no doubt
there are a lot of talents wasted becau
I had her read me
> back the options, but something like "hide extensions" comes out quite
> a bit different. Surprisingly tedious and frustrating experience.
>
So the solution is to forbid Chinese XP ?
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
't get non English comments and identifiers until now, you
will not get any with this PEP either. And if you do get them today or
with the PEP it doesn't make a difference for you to get some glyphs not
properly displayed, doesn't it?
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
r can not read the code.
How is that different?
It's the choice of the author.
Taking away the choice is not a good thing.
Following this logic we should forbid all other programming languages
except Python so everyone can read every code in the world.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
e). I and others
like the mix. My customers can understand the code better. (They are
only reading it)
>
> "Beautiful is better than ugly"
Correct.
But why do you think you should enforce your taste to all of us?
With this logic you should all drive Alfa Romeos!
Gregor
-
grams (not python) with unicode characters in
it for years and had no problem at all, because all customers and me
have obviously German machines.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
duction of *any* feature.
>
No. That logic can only be used to justify the introduction of a feature
that brings freedom.
Who are we to dictate the whole python world how to spell an identifier?
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
when to use this
feature and when to avoid it, like any other feature.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
s inconsistent because there is a correlation between identifier
and comment.
The best identifier is one that needs no comment, because it
self-describes it's content. None English identifiers enhance the
meaning of identifiers for some projects. So why forbid them? We are all
adult
d possibilities according to their underlying vision.
Python has a vision of being easy even for newbies to programming.
Making it easier for non native English speakers is a step forward in
this regard.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
dmitrey schrieb:
> howto check is object Arg1
> - a func, lambda-func
> - something else?
>
> I tried callable(Arg1), but callable(lambda-func) returnes False
I don't understand your problem:
>>> callable(lambda:0)
True
Please post your relevant code.
Greg
--
http://mail.python.org/mailman
Dear all,
I hope my question is here in the right place...
What I want to achieve is a communication between Java and Python. We
have a pretty strong framework of existing python scripts and modules.
Now I want to use jython in order to faciliate the communication
between another Java framework.
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
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
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
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
Lad schrieb:
> On my website I allow users to upload files. I would like a user to see
> how much time is left before a file is uploaded. So, I would like to
> have a progress bar during a file uploading. Can Python help me with
> that?Or how can be a progress bar made?
> Thank you for ideas.
> L
walterbyrd schrieb:
>
> What other "gotchas" would I look for?
>
Maybe this is helpfull for you:
http://docs.turbogears.org/1.0/Hosting
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ter and when they
are working assembled in the editor. If something goes wrong a print on
the suspect place or the traceback is all I need. (of course this is
matter of taste)
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
property function.
An explanation for the motivation behind this and python's thinking can
be found here:
http://tinyurl.com/wfgyw
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers schrieb:
> yes : replace the link with another submit button, then in your
> controller check which submit has been successful and take appropriate
> action.
Thanks !
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
As I am no expert web programmer I thought I'd better ask the experts if
there is a simpler or better solution to my problem than the one I am
thinking of. (using TurboGears)
The problem
---
I have a form. Ok. you can submit, validate it etc.
Now I have a link on that form to another
Gregor Horvath schrieb:
>
> Is there any other solution, probably with metaclasses ?
>
I've found this one:
class mymeta(type):
def __new__(meta, class_name, bases, new_attrs):
new_attrs["edit"] = adecorator(new_attrs['xy'])(bases[0].edit)
e any other solution, probably with metaclasses ?
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
hink this way is more flexible than tranditional inheritance?
>
Probably your problem is better solved with delegation instead of
inheritance.
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
28hosting%29
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
onstantly be dealing with these files
> that contain no real information.
in /etc/subversion/config
global-ignores = *.pyc *~ #*#
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
a mapped network drive,
now it works perfectly.
Thank you a lot.
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have a testservice.py (see below). I installed the Windows-Service
successfully. (via commandlineoption install)
The problem is that it runs only when it is in c:\windows\system32 or in
the python path.
I added the desired path (Y:\) to the PYTHONPATH environment variable
for the system acco
written
> in PHP. Is there a similar system that's written in Python?
> I found pwyky but it's functionality is a bit too simple.
http://moinmoin.wikiwikiweb.de/
--
Servus, Gregor
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
ly available solution?
>
I am using digitemp with this code:
def GetActT():
"Liest aus Digittemp die temp"
digi = os.popen("digitemp -q -a -o2 -c /home/gh/.digitemprc")
f = digi.readlines()
digi.close()
return float(f[0].split()[1])
--
Servus, Gre
Paolo Pantaleo schrieb:
> How can I write a pareser for a certain gramamr? I found PyPy that
> does it, is thare any other tool? Maybe something built-in the python
> interpreter?
>
http://pyparsing.wikispaces.com/
--
Servus, Gregor
http://www.gregor-horvath.com
--
http://mai
Hi,
[EMAIL PROTECTED] schrieb:
> I am reading a log file, and wondering what is the best way to read and
> analize this.
Look at:
http://pyparsing.wikispaces.com/
There is also an example for parsing an apache log.
--
Servus, Gregor
http://www.gregor-horvath.com
--
stack mentions the psycopg.pyd, can it be related to this problem?
How can I track down this problem?
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
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
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
[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
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:
>
> 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
1 - 100 of 160 matches
Mail list logo