How to do an 'inner join' with dictionaries

2006-02-27 Thread cyborg4
Let's say I have two dictionaries:
dict1 is  1:23,  2:76,  4:56
dict2 is  23:A, 76:B,  56:C

How do I get a dictionary that is
1:A, 2:B, 4:C

-- 
http://mail.python.org/mailman/listinfo/python-list


filename variables

2006-03-02 Thread cyborg4
If in  Windows XP I use:

openstring= "test.py  >foo.txt"
os.system(openstring)

it works.


But if I use:

file1='foo.txt'
openstring= "test.py  >"+file1

It gives an IOError about no such file or directory as
\\mydidr\\foo.txt

What does it mean ?

-- 
http://mail.python.org/mailman/listinfo/python-list