Hi there,
I have a daemon running 24/7, and I want that it executes a certain function
several times a day, as specified in an configfile (e.g.
actiontimes=10:00,12:00,19:00)
Do I have to fiddle with sched.scheduler and calc. time differences to
schedule my events, or is there another
Hi,
I have a daemon which runs permanently, and I want it to do a special
operation at some specifiy times every day, consider this configfile
extract:
[general]
runat=10:00,12:00
What would be the easiest and most pythonic way to do this?
Something like this pseudocode:
while True:
Hi,
I have a mainwindow in my pyqt application, and on click of a button I
want to start an assistant (wizard).
I have create the wizard with the Qt Designer, generated the python code
with pyuic, imported it from assistant import *, and subclassed it as
usual.
To show it, the onclick method
to print non-ascii characters the correct way?
best regards,
Yves
Sebastjan
On 3/3/06, Yves Glodt [EMAIL PROTECTED] wrote:
Hi list,
Playing with the great pysvn I get this problem:
Traceback (most recent call last):
File D:\avn\mail.py, line 80, in ?
mailbody += diff
Hi list,
Playing with the great pysvn I get this problem:
Traceback (most recent call last):
File D:\avn\mail.py, line 80, in ?
mailbody += diff
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position
10710: ordinal not in range(128)
It seems the pysvn.client.diff
Robin Haswell wrote:
Hey there
I'm doing some threading in python with Python 2.3 and 2.4 on Ubuntu and
Debian machines, and I've noticed that if I open a lot of threads (say,
50), I get lots of python processes with individual PIDs, which consume a
disproportionate amount of CPU. Does this
Hello,
I need to compare 2 instances of objects to see whether they are equal
or not, but with the code down it does not work (it outputs not equal)
#!/usr/bin/python
class Test:
var1 = ''
var2 = ''
test1 = Test()
test1.var1 = 'a'
test1.var2 = 'b'
test2 = Test()
test2.var1
Rene Pijlman wrote:
Yves Glodt:
I need to compare 2 instances of objects to see whether they are equal
or not,
This prints equal:
thank you!
Have a nice day,
Yves
class Test(object):
def __init__(self):
self.var1 = ''
self.var2 = ''
def __eq__(self,other
bruno at modulix wrote:
Yves Glodt wrote:
Hello,
I need to compare 2 instances of objects to see whether they are equal
or not, but with the code down it does not work (it outputs not equal)
#!/usr/bin/python
class Test:
var1 = ''
var2 = ''
Take care, this creates two
Hi there,
I seem to be unable to find a way to appends more keys/values to the end
of a dictionary... how can I do that?
E.g:
mydict = {'a':'1'}
I need to append 'b':'2' to it to have:
mydict = {'a':'1','b':'2'}
How to do?
Best regards,
Yves
--
Rene Pijlman wrote:
Yves Glodt:
I seem to be unable to find a way to appends more keys/values to the end
of a dictionary
A dictionary has no order, and therefore no end.
that means I can neither have a dictionary with 2 identical keys but
different values...?
I would need e.g
Yves Glodt wrote:
Hi there,
I seem to be unable to find a way to appends more keys/values to the end
of a dictionary... how can I do that?
E.g:
mydict = {'a':'1'}
I need to append 'b':'2' to it to have:
mydict = {'a':'1','b':'2'}
How to do?
Sorry for the noise...
mydict
Paul Rubin wrote:
Yves Glodt [EMAIL PROTECTED] writes:
that means I can neither have a dictionary with 2 identical keys but
different values...?
No.
I would need e.g. this:
(a list of ports and protocols, to be treated later in a loop)
ports = {'5631': 'udp', '5632': 'tcp', '3389
Hi list,
can anybody point me to a tutorial, howto or example code of
python-soappy...? google did not have really useful results about...
Best regards,
Yves
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I need to write a heartbeat solution to monitor some external clients,
and what is different as in the examples that I have seen so far is that
I want my central server to poll the clients, and not the clients
pinging the central server.
In detail I need a daemon on my central server
Hi,
I tried something like this but the umask part does not work clearly...:
newpid =
os.spawnle(os.P_NOWAIT,'/usr/bin/touch','/usr/bin/touch','xyz','umask 0113')
What would be the correct syntax for setting the umask for the created
process...?
Best regards,
Yves
--
Fredrik Lundh wrote:
Yves Glodt wrote:
I tried something like this but the umask part does not work clearly...:
newpid =
os.spawnle(os.P_NOWAIT,'/usr/bin/touch','/usr/bin/touch','xyz','umask 0113')
What would be the correct syntax for setting the umask for the created
process
David Wahler wrote:
Yves Glodt wrote:
It does, I did like this:
os.umask(0113)
newpid =
os.spawnl(os.P_NOWAIT,'/usr/local/bin/wine','/usr/local/bin/wine',executable)
But I wanted to use spawnle and it's env argument, to avoid setting
umask manually...
The umask is not part
(I asked about this several times in the twisted list but never got an
answer, maybe here I'll more happy...)
Hi,
I'm new to conch and I wonder if somebody could point me to an example
of how to create an ssh tunnel with conch to forward a connection (e.g.
database or vnc) through that tunnel
[EMAIL PROTECTED] wrote:
So, I've written my first GUI app in python. I've turned it into a
binary .exe and .app that runs on Windows and Mac respectively, but on
my Linux box, where I wrote the thing, I still have to drop to the
command line and ./myscript.py. What can I do to make it
Hello,
how can I clone a class instance?
I have trouble finding that in the documentation...
thanks and best regards,
Yves
--
http://mail.python.org/mailman/listinfo/python-list
Andres de la Cuadra wrote:
Hola, me llamo Andres de la cuadra, soy un usuario de python en chile y me
gustaría saber como puedo cerrer un programa a través de python. Yo se que
con la librería os puedo ejecutar programas, pero no e encontrado una
librería para poder cerrarlos
Hola Andres,
Hello,
another question rose for me today...
Is there a way to start an external process, in it's own context (not as
the exec-() functions do), and get it's pid...?
e.g.:
pid = wonderfulstartprocfunction('/usr/bin/wine bla.exe')
#... later
if (...):
os.kill(pid,9)
best regards,
Gerhard Häring wrote:
Yves Glodt wrote:
Hello,
another question rose for me today...
Is there a way to start an external process, in it's own context (not as
the exec-() functions do), and get it's pid...? [...]
Check out the subprocess module if you're using Python 2.4.
Otherwise
bruno at modulix wrote:
Yves Glodt wrote:
(snip)
ok I see your point, and python's...
(just FYI, and not to start a flamewar ;-):
In php, the [] means append to an array object.
yes, I know this.
If the array does not exist yet, it's created.
Which is what I don't like. It should
[EMAIL PROTECTED] wrote:
Yves Glodt wrote:
Which raises another question... :-)
Is there a possibility to bring together apache and python in a way that
I can embed python into html?
What do you mean ?
I need this (invalid example-html follows):
html
h1title of page/h1
?py
import time
Hello list,
I need to iterate over a class and get all her variable names and
values, e.g. considering this example:
class testclass:
var1 = 'ab'
var2 = 'cd'
var3 = 'ef'
test = testclass()
Then I wanna do sonmething like this:
for name,value in test:
print
Yves Glodt wrote:
Hello list,
I need to iterate over a class and get all her variable names and
values, e.g. considering this example:
class testclass:
var1 = 'ab'
var2 = 'cd'
var3 = 'ef'
test = testclass()
Then I wanna do sonmething like this:
for name
Yves Glodt wrote:
Yves Glodt wrote:
Hello list,
I need to iterate over a class and get all her variable names and
values, e.g. considering this example:
class testclass:
var1 = 'ab'
var2 = 'cd'
var3 = 'ef'
test = testclass()
Then I wanna do sonmething like
bruno at modulix wrote:
Yves Glodt wrote:
Yves Glodt wrote:
Hello list,
I need to iterate over a class and get all her variable names and
values, e.g. considering this example:
class testclass:
var1 = 'ab'
var2 = 'cd'
var3 = 'ef'
Take care, these are *class* variables
Hello,
if I do this:
for row in sqlsth:
pkcolumns.append(row[0].strip())
etc
without a prior:
pkcolumns = [];
I get this error on first iteration:
UnboundLocalError: local variable 'pkcolums' referenced before assignment
I guess that's normal as it's the way python
[EMAIL PROTECTED] wrote:
Yves My question is: Is there no way to append to a non existing list?
My question in return is: How is Python supposed to know that pkcolumns is
supposed to be a list instead of some other type of object that happens to
define an append() method?
I am fairly
by the amount of answers that my question
rose, in so little time!
thanks all!
There is a lot I don't like about python but if you have to use it, you
have to cope with it.
Yves Glodt wrote:
My question is: Is there no way to append to a non existing list?
I am lazy for declaring it first, IMHO
Juho Schultz wrote:
Yves Glodt wrote:
Hello,
if I do this:
for row in sqlsth:
pkcolumns.append(row[0].strip())
etc
without a prior:
pkcolumns = [];
I get this error on first iteration:
UnboundLocalError: local variable 'pkcolums' referenced before assignment
I
bruno at modulix wrote:
Yves Glodt wrote:
Hello,
if I do this:
for row in sqlsth:
pkcolumns.append(row[0].strip())
etc
without a prior:
pkcolumns = [];
I get this error on first iteration:
UnboundLocalError: local variable 'pkcolums' referenced before assignment
[EMAIL PROTECTED] wrote:
Thomas Bellman wrote:
The next time you go shopping at your local super-market, do
*not* get a shopping-cart (or shopping-basket, or any similar
container). As you pick up the things you want to buy, try
to put them into the non-existing cart. Perhaps you will then
Max M wrote:
Yves Glodt wrote:
bruno at modulix wrote:
Yves Glodt wrote:
Hello,
if I do this:
for row in sqlsth:
pkcolumns.append(row[0].strip())
etc
without a prior:
pkcolumns = [];
I get this error on first iteration:
UnboundLocalError: local variable
37 matches
Mail list logo