Wayne wrote:
Hi,
I have a set of data that looks something like this:
3, 4, 3, 2, 1
2, 1, 1, 1, 1
4, 2, 2, 1, 2
1, 3, 1, 1, 1
I want to be able to sort it by the first column, keeping the rest of
the values in the same position relative to the original:
1, 3, 1, 1, 1
2, 1, 1, 1, 1
3, 4, 3,
ranjan das wrote:
Hi,
I am new to python and i wrote this piece of code which is ofcourse not
serving my purpose:
Aim of the code:
To read a file and look for lines which contain the string 'CL'. When
found, print the entry of the next line (positioned directly below the
string 'CL') c
Hi,
I have a set of data that looks something like this:
3, 4, 3, 2, 1
2, 1, 1, 1, 1
4, 2, 2, 1, 2
1, 3, 1, 1, 1
I want to be able to sort it by the first column, keeping the rest of the
values in the same position relative to the original:
1, 3, 1, 1, 1
2, 1, 1, 1, 1
3, 4, 3, 2, 1
4, 2, 2, 1, 2
Hey Patrick
What I great idea. I did not even know about the compile function. Maybe
this idea could really work.
Imagine if I gave a client a live Linux CD that automatically called
this sort of script right after boot up. They could have the absolute
most current version of an application from
2009/9/12 Patrick :
> Strange question.
>
> Is it possible to include a module that is on another computer?
>
> I have been day-dreaming about a project that would allow web code to
> drive a desktop App.
>
> Thanks in advance-Patrick
> ___
> Tutor ma
"Patrick" wrote
Is it possible to include a module that is on another computer?
Possible provided you can specify the patgh in some way that
can be added to sys.path. Or you can read and exec.
But whatever you do its extremely dangerous unless the remote
computer is under your complete
Maybe something like this helps you to solve your problem:
# get code via http, etc.
code = """
def blah():
print 'blah'
print 'hello'
blah()
"""
compiled_code = compile(code, 'filename', 'exec')
exec(compiled_code)
This way you could execute some code from a web client, but the client
wo
Hi Wayne
Thanks for your help. I was thinking of the latter but now that I think
of it, once you import a module it won't help to modify that module on
the fly later anyways, right? I would need to re-import it. Sounds like
reading it via http would be simpler.
Thanks again-Patrick
Wayne wrote:
Strange question.
Is it possible to include a module that is on another computer?
I have been day-dreaming about a project that would allow web code to
drive a desktop App.
Thanks in advance-Patrick
___
Tutor maillist - Tutor@python.org
To unsubs
2009/9/12 Dave Angel :
> ranjan das wrote:
>>
>> Hi,
>>
>> I am new to python and i wrote this piece of code which is ofcourse not
>> serving my purpose:
>>
>> Aim of the code:
>>
>> To read a file and look for lines which contain the string 'CL'. When
>> found,
>> print the entry of the next line
ranjan das wrote:
Hi,
I am new to python and i wrote this piece of code which is ofcourse not
serving my purpose:
Aim of the code:
To read a file and look for lines which contain the string 'CL'. When found,
print the entry of the next line (positioned directly below the string 'CL')
conti
Thanks a lot Andre...it is working
On Sat, Sep 12, 2009 at 2:17 PM, Andre Engels wrote:
> On Sat, Sep 12, 2009 at 10:35 AM, ranjan das
> wrote:
> > Hi,
> >
> > I am new to python and i wrote this piece of code which is ofcourse not
> > serving my purpose:
> >
> > Aim of the code:
> >
> > To rea
On Sat, Sep 12, 2009 at 10:35 AM, ranjan das wrote:
> Hi,
>
> I am new to python and i wrote this piece of code which is ofcourse not
> serving my purpose:
>
> Aim of the code:
>
> To read a file and look for lines which contain the string 'CL'. When found,
> print the entry of the next line (posi
Hi,
I am new to python and i wrote this piece of code which is ofcourse not
serving my purpose:
Aim of the code:
To read a file and look for lines which contain the string 'CL'. When found,
print the entry of the next line (positioned directly below the string 'CL')
continue to do this till
14 matches
Mail list logo