[Tutor] itertools.izip question?

2007-10-15 Thread Iyer
=uint16) Is there any way to izip over dictionary values d.values() and obtain outputdata = array([0, 1, 2, 3, 0, 1, 2, 3], dtype=uint16) I'm stumped a bit by this itertools izip behavior, suggestions appreciated. ~iyer - Need a vacation? Get

Re: [Tutor] os.path.exists(path) returns false when the path actually exists!

2007-08-01 Thread Iyer
Is there any chance the file has an extension that Windows is hiding? Can you get True for other files in the folder? So, it was the extensions all the way ! Apparently the file extension was hidden by Windows! It now works. Thank you all for your suggestions and help. -iyer

Re: [Tutor] os.path.exists(path) returns false when the path actually exists!

2007-07-30 Thread Iyer
ng me nuts! -iyer - Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] os.path.exists(path) returns false when the path actually exists!

2007-07-27 Thread Iyer
Adam wrote: >From the library documentation: Return True if path refers to an existing path. Returns False for broken symbolic links. On some platforms, this function may return False if permission is not granted to execute os.stat() on the requested file, even if the path physically exists. So

[Tutor] os.path.exists(path) returns false when the path actually exists!

2007-07-27 Thread Iyer
returning True, when it should be.. Is this a bug ? iyer - Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.___ Tutor maillist - Tutor@python.org http:/

[Tutor] Iterating through two lists at the same time with manipulation..

2007-06-28 Thread Iyer
I have 2 lists: List 1 has lists in it, such as list1 = [[1,'A'],[2,'B'],[3,'C'],[4,'D']] There is another list2 such as list2 = [[1,'AA'],[3,'CC'], [4,'DD']] For eg, I wish to iterate over both the lists and produce the output a = [[1,'A'],[1,'AA']] b = [[2,'B']] c = [[3,'C'],[3,'CC']] d =

[Tutor] sorting lists into sub lists based on a key

2007-06-20 Thread Iyer
if I have a list of lists, that goes like this: [[0,['a','b']],[0,['c','d']],[3,['f','g']], [0,['a','b']],[0,['c','d']], [3,['f1','f2']], [2,['zz','dd']]] what could be the best way to reorder this such that the sublists with the same first element go into their own sub-list ? like, sublist0

Re: [Tutor] iterating over a sequence question..

2007-06-19 Thread Iyer
wow, very interesting thread this was..I probably learnt a lot from this than by flipping a few pages of a python text... thank you all for your interesting responses .. iyer Luke Paireepinart <[EMAIL PROTECTED]> wrote: On 6/18/07, Simon Hooper <[EMAIL PROTECTED]> wrote: Hi Lu

[Tutor] iterating over a sequence question..

2007-06-17 Thread Iyer
output: (1, 'r') (2, 'g') (3, 'b') (5, 'r') I could iterate over l only and reset the index to point to the first element of t, in case the elements in t are "exhausted" . Any pythonic way to iterate over a sequence, while iterating ove

Re: [Tutor] configparser -- suggestions on when "name: value" entries are incomplete

2007-05-31 Thread Iyer
--- Kent Johnson <[EMAIL PROTECTED]> wrote: > Iyer wrote: > > Regarding the configparser module, if there is a > > configuration file to be read that has incomplete > > "name: value" entries, what would be the best way > to > > handle this sit

[Tutor] configparser -- suggestions on when "name: value" entries are incomplete

2007-05-31 Thread Iyer
:value" entries, to delete the sections, the configfile has to be read, right and that raises the parsing error. any suggestions on how to best handle this situation? iyer Take the Internet to G

Re: [Tutor] creating a buffer object from a file ?

2007-05-31 Thread Iyer
ata in the binary file is just raw binary. I apologize for replying to the existing subject. Thanks for letting me know. I shall make sure this doesn't happen again. thanks iyer --- Alan Gauld <[EMAIL PROTECTED]> wrote: > "Iyer" <[EMAIL PROTECTED]> wrote > > >

[Tutor] creating a buffer object from a file ?

2007-05-25 Thread Iyer
s a buffer object is needed ? the data in the binary file is just raw binary. I apologize for replying to the existing subject. Thanks for letting me know. I shall make sure this doesn't happen again. thanks iyer --- Alan Gauld <[EMAIL PROTECTED]> wrote: > "Iyer" <[

Re: [Tutor] creating a buffer object from a file ?

2007-05-23 Thread Iyer
the binary file is just raw binary. I apologize for replying to the existing subject. Thanks for letting me know. I shall make sure this doesn't happen again. thanks iyer --- Alan Gauld <[EMAIL PROTECTED]> wrote: > "Iyer" <[EMAIL PROTECTED]> wrote > > >

[Tutor] creating a buffer object from a file ?

2007-05-21 Thread Iyer
How do I go about creating a buffer object from a file containing binary data ? I have a function that accepts only buffer objects for it's parameters and would like to pass on the contents of a file to that function. thanks, iyer - You snooze

Re: [Tutor] ConfigParser and multiple option names

2007-04-10 Thread Iyer
wow, Andrei, that is a really very neat solution ! It worked. So it seems configparser is dict based. Thanks a lot for your help. -iyer --- Andrei <[EMAIL PROTECTED]> wrote: > Iyer wrote: > > > > > I cannot change the config file layout -- it is a > >

[Tutor] ConfigParser and multiple option names

2007-04-06 Thread Iyer
dir="/home/john" dir="/home/whoever" what method would you suggest to read each "dir" value above from the config_file.lay? Thanx, iyer Sucker-punch spam with award-winning pr