On Jun 10, 7:56 am, "D'Arcy J.M. Cain" wrote:
> On Thu, 10 Jun 2010 08:26:58 +0100
> I'm surprised that there is anyone left who hasn't killfiled this guy.
> He/she hasn't made any effort to understand the group. Why bother even
> answering him? Just filter him and enjoy the silence.
All this
On Thu, 10 Jun 2010 08:26:58 +0100
Simon Brunning wrote:
> On 10 June 2010 07:38, madhuri vio wrote:
> > i was wondering bout the usage and syntax of
> > grep command..can u tall me its syntax so that
> > i can use it and proceed...pls
>
> That's really not on topic for this list.
I'm surprised
On 10 June 2010 07:38, madhuri vio wrote:
>
> i was wondering bout the usage and syntax of
> grep command..can u tall me its syntax so that
> i can use it and proceed...pls
That's really not on topic for this list.
--
Cheers,
Simon B.
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 18, 7:33 pm, [EMAIL PROTECTED] (Aahz) wrote:
> In article <[EMAIL PROTECTED]>,
>
>
>
>
>
> tereglow <[EMAIL PROTECTED]> wrote:
> >On Mar 15, 1:47 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
> >> tereglow <[EMAIL PROTECTED]> wrote:
>
> >>>grep^MemTotal /proc/meminfo | awk '{print $2}'
>
> >>
In article <[EMAIL PROTECTED]>,
tereglow <[EMAIL PROTECTED]> wrote:
>On Mar 15, 1:47 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
>> tereglow <[EMAIL PROTECTED]> wrote:
>>>
>>>grep^MemTotal /proc/meminfo | awk '{print $2}'
>>
>> If you would indeed do that, maybe it's also worth learning something
On Mar 15, 1:47 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
> tereglow <[EMAIL PROTECTED]> wrote:
>
>...
>
> > server using the /proc FS. For example, in order to obtain the amount
> > of physical memory on the server, I would do the following in shell:
>
> >grep^MemTotal /proc/meminfo | awk
Alex Martelli wrote:
> tereglow <[EMAIL PROTECTED]> wrote:
>...
> > server using the /proc FS. For example, in order to obtain the amount
> > of physical memory on the server, I would do the following in shell:
> >
> > grep ^MemTotal /proc/meminfo | awk '{print $2}'
>
> If you would indeed do
tereglow <[EMAIL PROTECTED]> wrote:
...
> server using the /proc FS. For example, in order to obtain the amount
> of physical memory on the server, I would do the following in shell:
>
> grep ^MemTotal /proc/meminfo | awk '{print $2}'
If you would indeed do that, maybe it's also worth learnin
On Mar 14, 10:57 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, Laurent Pointal wrote:
>
> > Steve Holden a écrit :
> >> Regular expressions aren't really needed here. Untested code follows:
>
> >> for line in open('/proc/meminfo').readlines:
> > for line in open(
On Mar 14, 9:37 am, "tereglow" <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I come from a shell/perl background and have just to learn python. To
> start with, I'm trying to obtain system information from a Linux
> server using the /proc FS. For example, in order to obtain the amount
> of physical
tereglow wrote:
> Okay,
>
> It is now working as follows:
>
> memFile = open('/proc/meminfo')
> for line in memFile.readlines():
> if line.startswith("MemTotal"):
> memStr = line.split()
> memTotal = memStr[1]
> memFile.close()
> print "Memory: " + memTotal + "kB
Okay,
It is now working as follows:
memFile = open('/proc/meminfo')
for line in memFile.readlines():
if line.startswith("MemTotal"):
memStr = line.split()
memTotal = memStr[1]
memFile.close()
print "Memory: " + memTotal + "kB"
I'm learning the whole try, f
On Mar 14, 11:57 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, Laurent Pointal wrote:
>
> > Steve Holden a écrit :
> >> Regular expressions aren't really needed here. Untested code follows:
>
> >> for line in open('/proc/meminfo').readlines:
> > for line in open(
In <[EMAIL PROTECTED]>, Laurent Pointal wrote:
> Steve Holden a écrit :
>> Regular expressions aren't really needed here. Untested code follows:
>>
>> for line in open('/proc/meminfo').readlines:
> for line in open('/proc/meminfo').readlines():
for line in open('/proc/meminfo'):
>> if line.s
> I come from a shell/perl background and have just to learn python. To
> start with, I'm trying to obtain system information from a Linux
> server using the /proc FS. For example, in order to obtain the amount
> of physical memory on the server, I would do the following in shell:
>
> grep ^MemTo
Steve Holden a écrit :
> Regular expressions aren't really needed here. Untested code follows:
>
> for line in open('/proc/meminfo').readlines:
for line in open('/proc/meminfo').readlines():
> if line.startswith("Memtotal:"):
> name, amt, unit = line.split()
> print name, amt,
On 14 Mar, 13:37, "tereglow" <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I come from a shell/perl background and have just to learn python.
Welcome aboard!
> To start with, I'm trying to obtain system information from a Linux
> server using the /proc FS. For example, in order to obtain the amou
tereglow wrote:
> Hello all,
>
> I come from a shell/perl background and have just to learn python. To
> start with, I'm trying to obtain system information from a Linux
> server using the /proc FS. For example, in order to obtain the amount
> of physical memory on the server, I would do the fol
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote::
def grep(pattern, *files):
search = re.compile(pattern).search
for file in files:
for index, line in enumerate(open(file)):
if search(line):
print ":".join((file, str(index+1), line[:-1])
"marduk" wrote:
>> What's the standard replacement for the obsolete grep module?
>
> AFAIK there never was a "grep" module. There does, however exist a
> deprecated "regex" module:
there was a "grep" module in 1.5.2 and earlier:
http://effbot.org/librarybook/grep.htm
but it was removed in
On Tue, 2005-10-25 at 06:45 +, David Isaac wrote:
> What's the standard replacement for the obsolete grep module?
AFAIK there never was a "grep" module. There does, however exist a
deprecated "regex" module:
>>> import regex
__main__:1: DeprecationWarning: the regex module is deprecated; ple
On Fri, 9 Sep 2005, Hilbert wrote:
> Hello,
>
> I've heard of a software on linux that creates a recursive database of
> text files and then provides an interface for grep-like queries. I'd
> like to use it to find procedures/variables in a large code base.
>
> Any suggestions appreciated.
>
> Th
maybe look Gonzui, LXR, some of the other tools listed here
http://www.gnu.org/software/global/links.html
Hilbert wrote:
> Hello,
>
> I've heard of a software on linux that creates a recursive database of
> text files and then provides an interface for grep-like queries. I'd
> like to use it to
"Hilbert" <[EMAIL PROTECTED]> writes:
> I've heard of a software on linux that creates a recursive database of
> text files and then provides an interface for grep-like queries. I'd
> like to use it to find procedures/variables in a large code base.
>
> Any suggestions appreciated.
The great gran
thanks!
--
http://mail.python.org/mailman/listinfo/python-list
ctags indexes procedures/variables in source code, perhaps it would
help: http://ctags.sf.net/
--
Adam Monsen
http://adammonsen.com/
--
http://mail.python.org/mailman/listinfo/python-list
26 matches
Mail list logo