Hello Max,
the problem with running in a dos console terminal is that I have to
switch back and forth from terminal and my xemacs. and I found that in
windows dos console we have to specify buffer page. I do need a
dynamic buffer control so I don't need to specify the buffer if my
program run big
Hallo Danny,
I tried the emacs folding customization, but it doesn't work.
After I did it, my xemacs show tripple dot '...' near the method of
class it should be folded.
I don't know how to open my method.
Sincerely Yours,
pujo
On 6/15/05, Danny Yoo <[EMAIL PROTECTED]> wrote:
>
>
> On Wed, 15
Hello Alan,
thanks for the advice,
but I don't understand why xemacs doesn't fix C-c C-c so we don't have
to do such many things. in fact C-c C-c is fail to represent the well
'run' behaviour of python ?
It would be nice to people who use python get the same benefit of
typing C-c C-c and get the
Olli Rajala wrote:
> Hi again,
>
> I have a '2D array', I mean a list inside a list ([[][],[][],...]) and
> would need to check if the value exists in it. Of course I could do a
> for loop, but that just seem to be a little overkill, so is there any
> other way to do it? I have to check the first
Dear Guys,
I have a 2D array:
>>>[['1', '2 ', '3'], ['longer ', 'longer', 'sort']]
How can I get what is the max(len(item)) for the columns ?
I would like to get a list with the max_col_width values.
I hope that, it can wrote with some nice list comprehension, but I can't do
that
On Jun 17, 2005, at 11:58, János Juhász wrote:
>
> Dear Guys,
>
> I have a 2D array:
>
[['1', '2 ', '3'], ['longer ', 'longer', 'sort']]
>
>
> How can I get what is the max(len(item)) for the columns ?
> I would like to get a list with the max_col_width values.
>
> I hope t
Max Noel wrote:
> On Jun 17, 2005, at 11:58, János Juhász wrote:
>>I have a 2D array:
>>
>>
>[['1', '2 ', '3'], ['longer ', 'longer', 'sort']]
>
>>
>>
>>How can I get what is the max(len(item)) for the columns ?
>>I would like to get a list with the max_col_width values.
>
> >
Quoting János Juhász <[EMAIL PROTECTED]>:
>
> Dear Guys,
>
> I have a 2D array:
> >>>[['1', '2 ', '3 '], ['longer ', 'longer ', 'sort']]
>
>
> How can I get what is the max(len(item)) for the columns ?
> I would like to get a list with the max_col_width values.
>
> I hope that, it can wrote w
János Juhász wrote:
> Dear Guys,
>
> I have a 2D array:
>
[['1', '2 ', '3'], ['longer ', 'longer', 'sort']]
>
>
>
> How can I get what is the max(len(item)) for the columns ?
> I would like to get a list with the max_col_width values.
>
> I hope that, it can wrote with some n
Thanks Max,
it is sort, but it gives back the max(len(item)) for the rows
> I have a 2D array:
>
[['1', '2 ', '3'], ['longer ', 'longer', 'sort']]
>
>
> How can I get what is the max(len(item)) for the columns ?
> I would like to get a list with the max_col_width values.
>
Hi All
I have a very simple problem and I am looking for the simplest solution.
I have a list of elements in a file. I like to find the total occurance
of each element in the list like this
10 string1
7 string2
1 string3
from a list which has only string1,string2 and string3 like this
string1
Kent Johnson wrote:
>Olli Rajala wrote:
>
>
>>Hi again,
>>
>>I have a '2D array', I mean a list inside a list ([[][],[][],...])
and
>>would need to check if the value exists in it. Of course I could do
a
>>for loop, but that just seem to be a little overkill, so is there
any
>>other way to do it
How about this.
>>> from random import choice
>>> alist=[choice(range(100)) for x in range(1000)] #just making a
list
to look at pretend this is a file
>>>
>>> counter={}
>>> for item in alist:
... if item in counter.keys():
... counter[item]+=1
... else:
... counter[i
Chad Crabtree wrote:
> The second case you show should be true because I believe that's what
> he
> asked for. Here is I believe the correct way to do this.
>
>
l= [ [1], [2,3], [4,5], [6]]
def isin(test,alist):
>
> ... return bool([x for x in alist if test in x])
I don't think so,
On Fri, Jun 17, 2005 at 07:41:17AM, Chad Crabtree wrote:
> How about this.
> >>> from random import choice
> >>> alist=[choice(range(100)) for x in range(1000)] #just making a
How do I do this in python?
alist < /tmp/logfile
The logfile has the list of entries.
--
Asif Iqbal
PGP Key: 0xE6269
Thanks for jfouhy and Kent!
Both the zip and the recipe are suit for me.
I looked for these.
Yours sincerely,
__
János Juhász
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
> > That having been said Fred Lundh has written a console module
> > that tries to hide the diffeent trminal types in a common set
> > of commands - you can download it from his site.
>
> The only one I can find there is for Windows:
> http://www.effbot.org/zone/console-handbook.htm
My bad.
Y
> but I don't understand why xemacs doesn't fix C-c C-c
Neither do I. BTW Do you know if this is specific to xemacs?
Or does it also apply to python mode in vanilla GNU emacs too?
I really should get around to loading python-mode and
trying it some day...
Alan G.
_
I have a 2D array:
>>>[['1', '2 ', '3'], ['longer ', 'longer', 'sort']]
> How can I get what is the max(len(item)) for the columns ?
> I would like to get a list with the max_col_width values.
>>> tda = [['1', '2 ', '3'], ['longer ', 'longer',
'sort']]
>>> mcw = [[len(r)
Asif Iqbal wrote:
>On Fri, Jun 17, 2005 at 07:41:17AM, Chad Crabtree wrote:
>
>
>>How about this.
>> >>> from random import choice
>> >>> alist=[choice(range(100)) for x in range(1000)] #just making a
>>
>>
>
>How do I do this in python?
> alist < /tmp/logfile
>
>The logfile has the list of
Hi there -
I'm trying to log the results of a command
that I'm running via the popen2 module to a file, while at the same time
displaying its progress on the screen. So, at the end of the run, I should
have the entire output (stdout and stderr) on the screen, but also have
two file objects each
Before I use xemacs I use emacs and both are the same.
I don't know if there is connection between cpython and problem in
showing real time console, because both use cpython.
I also want to hear people who use python and emacs/xemacs concerning
this problem.
pujo
On 6/17/05, Alan G <[EMAIL PROTE
Hi,
Why don't you print it while you get it..?
import os, sys
logfile = open("logfile.txt", "r")
input, output = os.popen2("your command")
while True:
temp = output.read(1) #or whatever fits you, more bytes is faster
if not temp: //EOF reached
break
logfile.write(temp)
sys.st
23 matches
Mail list logo