Am Freitag, 14. Juli 2006 15:26 schrieb Dieter Vanderelst:
This is surely possible. You need to define a protocol for the communication
between client and server. As you are planning to send data over the internet
you should build it on top of tcp. Look at the python module "socket" resp.
"Sock
Hi,
Methods i.e functions bound to a class instance (or object) the self argument
in their definition:
[code]
class pid:
def add(self, toadd):
pass #or some sensible code
[/code]
If you want to define a method without that implicit self argument you'll have
to make this method a st
Hi,
this is the line that breaks your code:
def progressTable(progress_table, action, task, pid=len(progress_table)
your parameter progress_table is known inside the function, not inside its
definition. So "pid=len(progress_table)" won't do.
If you really think that it is possible that pid is
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Robert Dailey schrieb:
> Thank you for your response. The back slashes work! It's a bit annoying; but
> I have Microsoft to thank for that.
It's not Microsoft, you would experience the same problems under any
Unix I know of. At least the bash treats q
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David N Montgomery schrieb:
> class testCase:
> def __init__(self, tc):
> if tc == 1:self.testCase1()
> if tc == 2:self.testCase2()
> if tc == 3:self.testCase3()
> if tc == 4:self.testCase4()
> if tc == 5:sel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Flavio Preto schrieb:
> Hi,
>
> I have a doubt. Supose that i have the minimun class below:
>
> class db:
> def __init__(self):
> self.db = {}
> def read(self, key):
> return self.db[key]
> def write(self, key, value):
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Robert Dailey schrieb:
> Hi,
>
> I'm wondering where the most appropriate location is to cleanup class
> objects. For example, i have a file handle as an instance attribute in one
> of my classes and I need to call f.close() on it when the class objec
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
have a look at the pdflib (www.pdflib.com). Their Text Extraction
Toolkit might be what you are looking for, though I'm not sure whether
you can use it detached from the pdflib itself.
hth
Nils
tubby schrieb:
> I know this question comes up a lot, s
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi Robert,
I have to guesses:
a) The user as which you are trying to run the script is missing the
execute right -> fix by chmod u+x MyApplication.px
b) You did not specify the interpreter -> the first line of your script
should look something like
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
I don't think it is a good pattern because you are kind of mixing
exceptions with return codes which makes the code a lot less readable
later on.
I personally would strongly opt for return codes in this case as one
would intuitively expect a f
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I don't think the global interpreter lock is what you need ... read here
for reference:
http://docs.python.org/api/threads.html
My approach what be to write one class for reading and writing to the
configuration and make that class thread-safe u
11 matches
Mail list logo