There's a DOS console application I am trying to script (in Python), but it
doesn't seem to use stdout or stderr... For example, if I redirect output
to a file ("cmd > file.txt"), the output still appears on screen.
Similarly, the output pipes returned by popen* don't catch the app's
output. Ho
> "Gregor" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>> There's a DOS console application I am trying to script (in Python),
>> but it
>> doesn't seem to use stdout or stderr... For example, if I redirect
>> outpu
Timothy Grant <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> On Sun, 06 Mar 2005 13:41:57 GMT, Gregor <[EMAIL PROTECTED]>
> wrote:
>> There's a DOS console application I am trying to script (in Python),
>> but it doesn't seem to use stdout or
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 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
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 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,
Paul Rubin schrieb:
>
> Name mangling is a poor substitute for private variables. If you want
> to be able to share private variables with other classes under certain
> circumstances, it's better to use something like C++'s "friend"
> declaration, where you can export the variables to a specific
Paul Rubin schrieb:
> Gregor Horvath <[EMAIL PROTECTED]> writes:
>
>>>to be able to share private variables with other classes under certain
>>>circumstances, it's better to use something like C++'s "friend"
>>>declaration, where you ca
Paul Rubin schrieb:
> allowed to do that--that's why the variable is private. Is he
> supposed to get your permission every time he wants to change how the
> private variables in his class work?
>
No, but the assumption here is that the maintainer / designer of a class
alaways knows everything
Paul Rubin schrieb:
>
> Huh? If my car has a "feature" that lets someone blow it to
> smithereens from hundreds of miles away without even intending to,
> that's somehow an advantage?
I would not accept a car that does constraint my driving directions. I
want to drive for myself, because its f
Paul Rubin schrieb:
>
> If you don't want the compiler to make sure your private instance
> variables stay private, then don't declare them that way. You're the
> one asking for less flexibility.
I want to declare them as privat, but want to give the flexibilty to
access them at the users own
Paul Rubin schrieb:
>
> You could have a "friend" declaration like in C++, if you want to let
> some class see the private instance variables of another class.
Everything is said on this topic. There are two ligitimate solutions to
the problem of private instance variables. Its a matter of tas
Paul Rubin schrieb:
> Bill Mill <[EMAIL PROTECTED]> writes:
>
>>Python is for consenting adults.
>
> Python might be for consenting adults, but multi-person software
> projects are supposed to be done in the workplace, not the bedroom.
Are the numerous working python open source projects not mul
Paul Rubin schrieb:
>
> I don't know of a single program that's actually relying on the
> non-enforcement. I've asked for examples but have only gotten
> theoretical ones. As far as I can tell, the feature is useless.
Real open source live example from yesterdays mailinglists:
quick question:
Paul Rubin schrieb:
> Gregor Horvath <[EMAIL PROTECTED]> writes:
>
>>Real open source live example from yesterdays mailinglists:
>
>
> I don't see any use of name mangling in that example.
Someone has a problem and tweaks a private variable as a workaround.
Paul Rubin wrote:
> Gregor Horvath <[EMAIL PROTECTED]> writes:
>>Someone has a problem and tweaks a private variable as a workaround.
>
> They should have patched the source instead.
>
I think they are going to do that. In the meantime our friend has a
working sol
El Pitonero schrieb:
>
> The fact that you can override Python's "list()" function can be either
> viewed as pro or con. The fact that you can override member variables
> can also be viewed as pro or con.
>
If there is a tool like pyChecker, which can detect such pitfalls and
warns but not forb
Hello folks
I want to apply changes in my source code without stopping jython
and JVM. Preferable are modifications directly to instances of
classes. My application is a desktop app using swing library.
Python solutions also interest me.
Solution similiar to "lisp way" is ideal.
Thanks f
In article <[EMAIL PROTECTED]>, Alan Kennedy wrote:
> [Jan Gregor]
>> I want to apply changes in my source code without stopping jython
>> and JVM. Preferable are modifications directly to instances of
>> classes. My application is a desktop app using swing library
In article <[EMAIL PROTECTED]>, Kent Johnson wrote:
> Jan Gregor wrote:
>> Hello folks
>>
>> I want to apply changes in my source code without stopping jython
>> and JVM. Preferable are modifications directly to instances of
>> classes. My applicati
Kent Johnson wrote:
> Jan Gregor wrote:
>
>> my typical scenario is that my swing application is running, and i see
>> some error or chance for improvement - modify sources of app, stop and
>> run
>> application again.
>> so task is to reload class defitions
Hi,
I have just written a python module to program the M232 measurement unit
from elv.
It has 8 digital I/O and 6 analog ports (0-5V). Works fine, although it
is a little bit slow (0,2 s to measure)
Furthermore the digital ports do not have enough power to switch a relay
directly, I had to do it
Hi,
I googled for a possibilty to create a html table where the user can
input data.
I just found this site:
http://www.codeproject.com/aspnet/I3HTree2.asp
That is what I am looking for.
Is there an existing solution for python?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
# This is a sucky hack. Fix printResult
self.console.textArea.append(data)
Jan
Jan Gregor wrote:
Hello
I want to redirect output of jython's functions print and println to
JTextArea component. Is it possible ?
I tried this (swingConsole.textArea is instance):
In my class
Hello
I want to redirect output of jython's functions print and println to
JTextArea component. Is it possible ?
I tried this (swingConsole.textArea is instance):
In my class
self.printStream= MyPrintStream(System.out)
System.setOut(self.printStream)
Hi,
Before I reinvent the wheel I`d like to ask if someone has done this
before since I did not find an advice at Google.
The goal is to create a dynamic Tree View in HTML.
Say I have a data strucure like this:
structList =
{'Sun':{'Sun.1':['Sun1.1','Sun1.2'],'Sun.2':['Sun2.1','Sun2.2']},'Kupa':
Hi,
given the dynamic nature of python I assume that there is an elegant
solution for my problem, but I did not manage to find it.
I have a file that contains for example on line:
['147', '148', '146']
when I read the file
f = file("I050901.ids").readlines()
I have a string
f[0] == "['147
the sense of this file is to make a list persistant quickly
and easily and human readable. Maybe pickleing is a third option?
--
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Hello
I run python script on another computer and want to "survive" that
script after my logout. the script also uses drive mapping to network drive.
Can you help me ? Or better is there some info for unix person how
to survive with python on windows ;-)
thanks,
jan grego
Hi,
>>>type(['1'])
>>>type(('1'))
I wonder why ('1') is no tuple
Because I have to treat this "special" case differently in my code.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
thanks are given to all
"problem" solved...
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
James wrote:
You will probably find migrating to VB.NET easier than to Python if you
have to do WYSIWYG data bound form design.
VB.NET is quite a nice language (I personally prefer C#). Much nicer
than VB6. Python is better but it may not meet YOUR needs
infrastructure wise.
This is more a strategi
Hello,
class A(self):
def A1():
pass
class B(self):
def B1():
#
#*** How can I access A1 here ***
#
self.A1() # doesnet work because self references to B
self.self.A
Hello Nick,
thank you, your answer really helped me..
--
Greg
Nick Coghlan wrote:
Gregor Horvath wrote:
Hello,
class A(self):
def A1():
pass
class B(self):
def B1():
#
#*** How can I access A1 here
Ok, thanks. I didn't think that += operator is nondestructive operation
- but strings are immutable so this makes sense.
On 2004-12-13, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>> I found that price of += operator on string is too high in jython. For
>> example 5000 such operations took 90 se
Hi,
Adam DePrince wrote:
computers of the day. This was in a misguided effort to make computers
understandable to their target audience. The goal of the day was to
build a system that a manager would want to buy; it was believed that
[..]
BASIC = Beginners all purpose symbolic instruction code
A
Peter Otten wrote:
May you could give us an idea of the current state of basic affairs then by
translating the following example snippet:
yes you can do it in VB6, but pythons lists and dictionarys are superior
to those built in in VB and I think to those in most other languages.
It's me wrote:
It's me wrote:
Absolutely *ugly*!
But still, your point is well taken. Thank you for pointing this out.
Adam was right:
"Don't do it, unless your goal is simply to embarrass and insult
programmers".
OK. Then please schow me, how you can create a complex form with grids,
explorer like trees etc.
Hello
I found that price of += operator on string is too high in jython. For
example 5000 such operations took 90 seconds (i generated html copy of
table with 1000 rows and 5 columns). Generation of row data into separate
string and joining after lead to time 13 seconds !!!
What's alternati
Daniel T. wrote:
[EMAIL PROTECTED] wrote:
A paper finding that OOP can lead to more buggy software is at
http://www.leshatton.org/IEEE_Soft_98a.html
Sure, OOP *can* lead to more buggy software, that doesn't mean it always
does.
I think that costs(=time) to develop and maintain software depends
StringBuffer class from java was right solution - yours looses encoding,
and in jython I was unable to get it back - in python it worked fine.
Jan
> I don't use Jython, but are you not able to do something like:
>
> string_list = []
> for ... in ...:
> ...
> string_list.append(...)
>
Thomas Bartkus wrote:
> On what basis do you think the mechanics of producing a working
> language are easier because the language is interpreted.
Because:
Type code
Run code.
VB6 goes a step further:
Run Code
Type Code
That means that you can set a breakpoint. While the debugger sto
Adam DePrince wrote:
On Fri, 2004-12-17 at 09:25, Steve Holden wrote:
Or make any given standard python object accessible from MS Excel in 2
minutes.
What you describe is a political, not technical, challenge.
What I describe is a daily costumer demand.
Like or not, the world uses Excel and co
Andrew Dalke wrote:
Huh? I'm talking about my views of myself. I said that
BASIC was a programming language I could learn without access
to anyone else, on a microcomputer circa 1982. All I had was
the book that came with the computer, and after a while a
book on BASIC games.
The machine I had w
chris wrote:
I'm creating an excel document dynamically from scratch using Python
and the win32com module. All is well, but now I need to add a macro to
the spreadsheet and run it (to enable some sorting features in the
spreadsheet). I think I know how to run a macro once it's installed
(using th
RM wrote:
What you say is true. However, I didn't think the target audience of
this book was newbies. Python newbies yes, but not programming
newbies. For programming newbies I would recommend the "Learning
Python" book instead.
The availability argument, however, is a good point.
I was/am a pyt
Hi,
Is there a possibility to format a log message to give the function name
where the log appears?
Example
import logging
def aTestFunction():
logger.debug("This is a message")
The log should read:
aTestFunction This is a message.
There is a possibilty to format the module namewith %(m
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
--
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
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
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
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
28hosting%29
--
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
e any other solution, probably with metaclasses ?
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
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)
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
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
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
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
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
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
a mapped network drive,
now it works perfectly.
Thank you a lot.
--
Servus, Gregor
--
http://mail.python.org/mailman/listinfo/python-list
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
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
Hi,
I searched the web and docs but cannot figure out whats wrong with this
code:
#!/usr/bin/python
import Tkinter as Tk
class testtk(Tk.Frame):
def __init__(self):
self.root = Tk.Tk()
Tk.Frame.__init__(self,self.root)
self.frame = Tk.Frame(self.root)
self.var = Tk.Stri
Gregor Horvath schrieb:
> if __name__ == "__main__":
> t = testtk()
> t.var.set("TEST")
>
> Result:
>
> _tkinter.TclError: can't set "PY_VAR0": invalid command name
> "-1210125972check"
>
>
> Any ideas, wh
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
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
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.
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
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
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
when to use this
feature and when to avoid it, like any other feature.
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
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
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
-
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
'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
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
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
[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
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
ejson-1.3/docs/index.html
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
hose languages), but all are used in the correct original context.
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
htened to death by that fact ;-)
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
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
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
&
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
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
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
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
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().
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
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+
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
1 - 100 of 160 matches
Mail list logo