[EMAIL PROTECTED] wrote:
> hi all, I would like to create a class that specializes Python
> dictionary. I would like an instance of this class to store objects
> representing html form data, and I would like to have an instance of
> this Data_Set class be able to use the Python dictionary metho
Asrarahmed Kadri wrote:
>
>
> I am writing a simple program and in that I want to add some sort of
> interactiveness.
> I have designed a menu which gives the user an option to select one
> out of the following four keys: d, l, n or e.
> Can any one tell me how to determine which key has been
> Thanks Alan, but can you please explain me what this line
> does:
> diff = [t1==t2 for t1,t2 in zip(line1,line2)].index(False)
>
I'll unfold it somewhat:
mix = zip(a,b)
produces a list of tuples:
[(a1,b1)(a2,b2),(a3,b3)]
t1 == t2
produces a boolean result either True or False
hi all, I would like to create a class that specializes Python
dictionary. I would like an instance of this class to store
objects representing html form data, and I would like to have an
instance of this Data_Set class be able to use the Python dictionary
method pop to remove objects as I see fit
Bennett, Joe wrote:
> Can anyone direct me to some documentation on how to take variables from
> one py script, execute and pass them to another script? Then I need to
> get data back from the executed script? I've been searching Google and I
> see information, but I am in need of some examples.
I am writing a simple program and in that I want to add some sort of interactiveness.
I have designed a menu which gives the user an option to select one out of the following four keys: d, l, n or e.
Can any one tell me how to determine which key has been pressed by the user.
Thanks.
Regards,
Can anyone direct me to some documentation on how to take variables
from one py script, execute and pass them to another script? Then I
need to get data back from the executed script? I've been searching
Google and I see information, but I am in need of some examples...
Thanks!
-Joehttp://www.d
Thanks Alan, but can you please explain me what this line does:
diff = [t1==t2 for t1,t2 in zip(line1,line2)].index(False)
On 10/6/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
Some general thoughts:> import sys> from stringCompare import stringcmp # this is a module which has
> stringcmp>> fname1
Some general thoughts:
> import sys
> from stringCompare import stringcmp # this is a module which has
> stringcmp
>
> fname1 = raw_input("Enter a file name to be read:\t")
> fname2 = raw_input("Enter a file name to be read:\t")
>
> fd1 = open(fname1,"r")
> fd2 = open(fname2,"r")
>
>
> done = F
Doug Potter wrote:
> Hi,
>
> I at trying to create a bunch of text files in a single directory on a
> Linux system,
> something like this.
>
> import os
>
> routers = ['adnc-6321', 'adnp-2341', 'adnw-2632']
>
> for i in routers:
> os.system('/bin/touch' %s) % i
>
> of course this dosn't w
Hi,
Your program does not emulate the diff command of
Unix.
Please do a diff in unix and experience
yourselves.
Where is cmp_res = stringcmp(string1[i],string2[i])
stringcmp() function
written?
Moreover, if you Python Documentation install
(or python.org accessible) search for diffli
# This program emulates the diff command of UNIX
import sysfrom stringCompare import stringcmp # this is a module which has stringcmp function that compares two strings
fname1 = raw_input("Enter a file name to be read:\t")
fname2 = raw_input("Enter a file name to be read:\t")
fd1 = open(fname1
Doug Potter wrote:
> Hi,
>
> I at trying to create a bunch of text files in a single directory on a
> Linux system,
> something like this.
>
> import os
>
> routers = ['adnc-6321', 'adnp-2341', 'adnw-2632']
>
> for i in routers:
> os.system('/bin/touch' %s) % i
I think you're close, just
Thanks for the detailed explanation. I read it and understood a bit. Rest in the leisure time.
Enjoy the recipes..
Regards,
Asrar
On 10/5/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
Asrarahmed Kadri wrote:> What is this??? I cannot understand a single character.. Explain this in
> length
Hi,
I at trying to create a bunch of text files in a single directory on a
Linux system,
something like this.
import os
routers = ['adnc-6321', 'adnp-2341', 'adnw-2632']
for i in routers:
os.system('/bin/touch' %s) % i
of course this dosn't work.
Is there a simple way to get this done?
15 matches
Mail list logo