receive data through a python program from javascript

2008-12-04 Thread gaurav kashyap
Hi all,
I have a javascript.I want to send some data from this javascript to a
python program that is on zope on my local system...

What can be the python program
--
http://mail.python.org/mailman/listinfo/python-list


passing arguments from a python program to other while executing it with exec() or spawn() in LINUX

2008-10-16 Thread gaurav kashyap
HI all,
i have two python programs as 1.py and 2.py

1.py
import os
import sys
processID=os.spawnl(os.P_WAIT,'/usr/local/bin/python','python','/
mywork/2.py ' + 'hi')

2.py
import sys
domain= str(sys.argv[1] )
print domain

IN LINUX
while executing 1.py,the argument 'hi' is not passed to the 2.py and
error message is displayed as :
python: can't open file '/mywork/2.py'.If i execute the program from
shell like:
python 2.py hi,then it works fine


IN WINDOWS
this is working fine

PLEASE HELP.
thanks
gaurav
--
http://mail.python.org/mailman/listinfo/python-list


Re: passing arguments from a python program to other while executing it with exec() or spawn() in LINUX

2008-10-16 Thread gaurav kashyap
Thanks for the help Peter.Its working fine now

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


Hi, I am getting the following errorTypeError: sort() takes no keyword arguments

2008-10-16 Thread gaurav kashyap
Hi all,
I am using python version 2.3.in a program ,
I have called the sort function.Wherein,
a.sort(reverse=True)
is giving the following error:

TypeError: sort() takes no keyword arguments.

It works in python 2.4,What can be the alternative in python 2.3

Thanks ,
Gaurav

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


How to execute a makefile from LINUX system.

2008-10-20 Thread gaurav kashyap
Hi all,
I am using Link-41b parser in my program.
The windows version of it has an .exe file that can be executed using
os.system command
On Linux version,I have a makefile.

so my question is:
How to run the makefile using some python function.

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


Re: How to execute a makefile from LINUX system.

2008-10-20 Thread gaurav kashyap
Thanks
--
http://mail.python.org/mailman/listinfo/python-list


How to open a shell prompt from an existing shell prompt

2008-10-21 Thread gaurav kashyap
Dear all,
I have a file in which i have written some shell commands to execute.
Herein i require to open another shell prompt from this file.

or simply i want to open a new shell prompt from an existing shell
prompt.
How could this be achieved.


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


Regarding shared memory

2008-10-29 Thread gaurav kashyap
Dear all,

I have a server program that listens to a particular port and a number
of client programs that connect to the server.

Now i want to put some data in form of python list in main memory on
server.Hence whenver a client program is run it connects to the server
and access the data in main memory.Here the server calls a module that
processes the data as per the client request and the returns some
information to the client.

I can create client and server programs using socket programming,but i
am not able to put the data in shared memory and then access it.

NOTE:I want to put the data in main memory only once(on the server
using server program) i.e. whenever client connects to the server it
should only access the data and not create a replica of data already
loaded in memory.How can this be achieved

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


How to open a shell prompt from an existing shell prompt

2008-10-29 Thread gaurav kashyap
Dear all.
On windows platform python 2.4,i can use os.startfile("filename") to
execute a file on a new command prompt

but on unix platform and python 2.3 what is the alternate for
executing a file like above in a new shell prompt
--
http://mail.python.org/mailman/listinfo/python-list


Re: How to open a shell prompt from an existing shell prompt

2008-10-30 Thread gaurav kashyap
Do we have subprocess module in python 2.3
--
http://mail.python.org/mailman/listinfo/python-list


Re: How to open a shell prompt from an existing shell prompt

2008-10-30 Thread gaurav kashyap
reply please
--
http://mail.python.org/mailman/listinfo/python-list


open a shell prompt froma python program

2008-10-30 Thread gaurav kashyap
Dear all,

Can u tell me a python program that when executed in a shell
prompt,opens another shell prompt.

Simply i want to open a shell prompt from a python program.

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


Re: open a shell prompt froma python program

2008-10-30 Thread gaurav kashyap
On Oct 30, 2:59 pm, Lars Stavholm <[EMAIL PROTECTED]> wrote:
> gaurav kashyap wrote:
> > Dear all,
>
> > Can u tell me a python program that when executed in a shell
> > prompt,opens another shell prompt.
>
> > Simply i want to open a shell prompt from a python program.
>
> I think you're looking for:
>
> import os
> os.system("/bin/sh")



Dear,

Its not opening a new window,
I want to do that only from already opened shell prompt window
--
http://mail.python.org/mailman/listinfo/python-list


Re: open a shell prompt froma python program

2008-10-30 Thread gaurav kashyap
HI,
I am getting the following error:

konsole: cannot connect to X server

do i need to install the related files.
--
http://mail.python.org/mailman/listinfo/python-list


Re: How to open a shell prompt from an existing shell prompt

2008-10-30 Thread gaurav kashyap
Dear Tino,
I am using python 2.3.5. on POSIX system,I have the simple query as:

I log into the shell as root.Can i issue some command that will open
another terminal?(i.e I get a duplicate copy of the shell prompt
already opened)



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


Re: How to open a shell prompt from an existing shell prompt

2008-10-30 Thread gaurav kashyap
Dear Tino,
There is no subprocess module in python 2.3.5.

My goal is:

1.Open a terminal window and login as root.

2.Issue some command in the terminal window that will open another
terminal,similar to the onealready opened.

Am i clear now.
--
http://mail.python.org/mailman/listinfo/python-list


open a new terminal window from another terminal window in linux/unix system

2008-10-30 Thread gaurav kashyap
Dear all,

I am using Microsoft Windows XP.Using putty.exe,I connected to LINUX
server  and a terminal window gets opened.Here i logeed in as root.

What i want to do is open another terminal window from already opened
terminal window.
Can this be achieved.If yes,please provide a tested solution

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


setting permissions to a file from linux.

2008-11-18 Thread gaurav kashyap
Hi all,
I have a text file in a directory on unix system.
Using a python program i want to change that file's permissions.
How could this be done.

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