Hi,
On Thu, 08 Feb
2007 13:07:41 +0100
Christopher Arndt <[EMAIL PROTECTED]> wrote:
> thomas coopman schrieb:
> > I need a function that groups almost equal strings. It seems most
> > easy to me, to do this with a hash function.
>
> What do you mean be "almost equal"? By which criterium? Spelli
Sudarshana KS wrote:
> Hi,
>
> Currently i have data with the following type - Which is a x509
> certificate obtained from SSL server done. I need this to be converted
> to normal string, so that i can use the load_certificate method of
> OpenSSL, which takes string as the argument.
The below
On Thu, 8 Feb 2007, Johan Geldenhuys wrote:
> OK, this what I wanted:
>
> I have a value: a = 48.41
>
> My lowValue is: lowValue = 48.35
> My highValue is : highvalue = 48.45
Range does not work on floats: it's meant to work on integers.
> I though that it could be possible to have a range b
> -Original Message-
> From: Tony Cappellini [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 08, 2007 5:41 PM
> To: Carroll, Barry
> Subject: re:Overloading assignment operator
>
> Hello Barry
>
> I'm trying to understand you post
>
> my question is, should this line
>
> result = p
Hi,
Currently i have data with the following type - Which is a x509 certificate
obtained from SSL server done. I need this to be converted to normal string,
so that i can use the load_certificate method of OpenSSL, which takes string
as the argument.
Kindly help me.
cert=
'\x00\x01\xa20\x82\x0
On Thu, Feb 08, 2007, Jalil wrote:
>
> Hey guys,
> I have this simple code and i cant seem to get it to run.
> here is the code.
> from os import *
> import re
> hostname =raw_input("Host name : ") or ''
> mac_addr =input("Mac address : ")
> filename='/etc/dhcpd.conf'
> fh=open(fi
On 09/02/07, Jalil <[EMAIL PROTECTED]> wrote:
Hi Jalil,
Because you're doing this:
> from os import *
It means that when you get to this line:
> fh=open(filename)
You're actually calling os.open, which is lower-level than the
standard open() and expects different arguments.
Many people recom
Hey guys,
I have this simple code and i cant seem to get it to run.
here is the code.
from os import *
import re
hostname =raw_input("Host name : ") or ''
mac_addr =input("Mac address : ")
filename='/etc/dhcpd.conf'
fh=open(filename)
m = re.match(hostname,fh.readlines())
if m!=None:
m.gro
On 09/02/07, Toon Pieton <[EMAIL PROTECTED]> wrote:
> Hey friendly users!
>
> I have a question considering debugging: is it possible to get the current
> code line that is being executed?
Are you using pdb [the python debugger]?
If you have a script 'myscript.py', you can start the script like t
Hey friendly users!
I have a question considering debugging: is it possible to get the current
code line that is being executed?
Thanks in advance!
Toon Pieton
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Johan Geldenhuys wrote:
> OK, this what I wanted:
>
> I have a value: a = 48.41
>
> My lowValue is: lowValue = 48.35
> My highValue is : highvalue = 48.45
>
> if a <= lowValue:
> print 'value below limit'
>
> if a >= highValue:
> print value above limit'
>
> I though that it could
OK, this what I wanted:
I have a value: a = 48.41
My lowValue is: lowValue = 48.35
My highValue is : highvalue = 48.45
if a <= lowValue:
print 'value below limit'
if a >= highValue:
print value above limit'
I though that it could be possible to have a range between 48.35 and 48.45
Luke Paireepinart wrote:
> Kent Johnson wrote:
>> Luke Paireepinart wrote:
>>> Kent Johnson wrote:
You can't generate all the float values in a range. (OK, you
probably could, but it would not be practical or useful.) You can
test for a value in a range, e.g.
if 48.35 <= a <=
Kent Johnson wrote:
> Luke Paireepinart wrote:
>> Kent Johnson wrote:
>
>>> You can't generate all the float values in a range. (OK, you
>>> probably could, but it would not be practical or useful.) You can
>>> test for a value in a range, e.g.
>>> if 48.35 <= a <= 48.45:
>>>
>> Kent:
>> Why d
2007/2/8, Johan Geldenhuys <[EMAIL PROTECTED]>:
Hi all,
I have a value that ranges between 48.01 and 48.57. a Float value in other
words.
I want to look at changes in the value. If my normal range is between
48.35 and 48.45, how will I identify the value below 48.35 and above 48.45
?
Somethi
Luke Paireepinart wrote:
> Kent Johnson wrote:
>> You can't generate all the float values in a range. (OK, you probably
>> could, but it would not be practical or useful.) You can test for a
>> value in a range, e.g.
>> if 48.35 <= a <= 48.45:
>>
> Kent:
> Why does this work?
It is explicitl
Kent Johnson wrote:
> Johan Geldenhuys wrote:
>
>> Hi all,
>>
>> I have a value that ranges between 48.01 and 48.57. a Float value in
>> other words.
>>
>> I want to look at changes in the value. If my normal range is between
>> 48.35 and 48.45, how will I identify the value below 48.35 an
Paulino wrote:
> Yes that is the problem.
>
> But I canot control all the the encodings in every PC that the script is
> to be run...
The problem is in your *editor* not in Python. You have to control the
encoding the *editor* expects. At least that is my guess - your
complaint is that you can
[EMAIL PROTECTED] wrote:
> Maybe I'm asking the wrong question. This appears that a module is a
> external program. What I've seen on some programs but don't fully
> understand is something of the sort: def main() and a def sub() and def
> add(). It appears that the program has calls to each
The Kate editor has also modelines, similar to the python interpreter:
http://kate-editor.org/article/katepart_modelines
HTH,
Eike.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Yes that is the problem.
But I canot control all the the encodings in every PC that the script is
to be run...
Paulino
Kent Johnson escreveu:
>
> I think the problem you are having is with the source code encoding,
> not sys.stdout.encoding. Probably your editor on linux expects a
> differen
Yes I have that declaration in my script.
Paulino
> Send Tutor mailing list submissions to
> tutor@python.org
>
>
# -*- coding: iso-8859-1 -*-
If you put this at the first line of your .py files (of course replace
iso-8859-1 with whatever
encoding you use) I think this should do the
Maybe I'm asking the wrong question. This appears that a module is a
external program. What I've seen on some programs but don't fully
understand is something of the sort: def main() and a def sub() and def
add(). It appears that the program has calls to each of these sections.
The term module
Paulino wrote:
> Hi everyone!
>
> I have some strings that include special characters, to be displayed in
> widget labels ( PyQt4 ).
> The output changes in diferent OS's due to diferent sys.stdout encoding
>
> Not only the labels in the GUI change, but the source file strings are
> altered whe
Johan Geldenhuys wrote:
> Hi all,
>
> I have a value that ranges between 48.01 and 48.57. a Float value in
> other words.
>
> I want to look at changes in the value. If my normal range is between
> 48.35 and 48.45, how will I identify the value below 48.35 and above 48.45?
>
> Something I t
[EMAIL PROTECTED] wrote:
> I am learning Python and have written several small programs of
> increasing complexity but so far they are all "linear" programs meaning
> that they are meant to do one thing. I have yet to fully understand
> program control in order to go to and return form modules
Hi all,
I have a value that ranges between 48.01 and 48.57. a Float value in other
words.
I want to look at changes in the value. If my normal range is between 48.35
and 48.45, how will I identify the value below 48.35 and above 48.45?
Something I tried was:
for a in range(48.35, 48.45):
thomas coopman schrieb:
> I need a function that groups almost equal strings. It seems most easy
> to me, to do this with a hash function.
What do you mean be "almost equal"? By which criterium? Spelling,
Pronounciation? Semantics?
> I think I once read something about it, but I can't find it,
I am learning Python and have written several small programs of increasing
complexity but so far they are all "linear" programs meaning that they are
meant to do one thing. I have yet to fully understand program control in
order to go to and return form modules (I think this is the correct term).
Hi,
I have a program that talks to a python interpreter through pexpect
(don't bother asking why ;). What I would like to do is occasionally
"reset" the interpreter to the state it would be in if it had just
been launched. I assumed I could simply clear out the globals()
dictionary, minus
On Wed, 07 Feb 2007 17:30:26 +
Paulino <[EMAIL PROTECTED]> wrote:
> Hi everyone!
>
> I have some strings that include special characters, to be displayed in
> widget labels ( PyQt4 ).
> The output changes in diferent OS's due to diferent sys.stdout encoding
>
> Not only the labels in the GU
Hi,
I need a function that groups almost equal strings. It seems most easy
to me, to do this with a hash function.
So I would write a hash function like this:
string = string.replace(" ", "").lower()[0:6]
and then hash the string chars, but it should detect minor typo's, so
words with one diffe
32 matches
Mail list logo