Re: How can i do python form post request?

2012-07-03 Thread gmspro
@Thomas, >First, you need to tell the web server to execute your Python script. What you do next depends on how you've done that. >The simplest way is probably to pub p.py in your cgi-bin directory. This could be in /var/www/cgi-bin or elsewhere, like /usr/lib/cgi-bin. You may need to enable CGI,

How can i do python form post request?

2012-07-02 Thread gmspro
form.html:     p.py: #!/usr/bin/python #what to write here... Both files are put in /var/www/ , now from http://localhost/form.html, if i click the submit button would i execute the p.py  and how can i get the value of textbox? Any answer will be highly appreciated. Thanks in advanced. --

Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-25 Thread gmspro
Hi, Why has python3 been created as a seperate language where there is still python2.7 ? What's the benifit to make python3 over python2.7 ? I have read this though: http://docs.python.org/release/3.0.1/whatsnew/3.0.html What's wrong editing/customizing/changin python2.7 instead of making a se

Why are these files names started with underscore?

2012-06-24 Thread gmspro
Hi, I see there are some files here started with underscore(_) , is there any convention of something for it? http://hg.python.org/cpython/file/3b7230997425/Modules _bisectmodule.c _bz2module.c _codecsmodule.c _collectionsmodule.c _cryptmodule.c _csv.c _curses_panel.c _cursesmodule.c _datetime

Help to make a simple web page to do form post using python3 and get the value from form and display it on webpage

2012-06-24 Thread gmspro
Hi,         Now how can i write the p.py to take the username after submit button click and display on webpage? How to run web server too? How can i make it work under apache2 ? #!/path/to/python3 ... Any answer will be highly appreciated. Thanks. -- http://mail.python.org/mailman/

Re: How can i call array_length to get the length of array object?

2012-06-24 Thread gmspro
@Ian, The function name in arraymodule.c file is array_len but you have to call something like: , why? >>>arr=array('i',[5,8,7]) >>>lg=arr.__len__() >>>print(lg) Why __len__() where the original name if array_length? Why is method named like __NAME__

Re: How can i call array_length to get the length of array object?

2012-06-24 Thread gmspro
@Ian, The function name in arraymodule.c file is array_len but you have to call something like: , why? >>>arr=array('i',[5,8,7]) >>>lg=arr.__len__() >>>print(lg) Why __len__() where the original name if array_length? Why is method names like __NAME__

Re: How can i call array_length to get the length of array object?

2012-06-24 Thread gmspro
? To: "gmspro" Cc: "python-list" Date: Sunday, June 24, 2012, 12:34 AM On Sat, Jun 23, 2012 at 8:23 PM, gmspro wrote: > I'm trying to call this function, > http://hg.python.org/cpython/file/3b7230997425/Modules/arraymodule.c#l657 > > Is that possible to call th

Re: How can i call array_length to get the length of array object?

2012-06-23 Thread gmspro
: How can i call array_length to get the length of array object? To: "gmspro" Cc: "python-list" Date: Saturday, June 23, 2012, 10:34 PM On Sat, Jun 23, 2012 at 11:23 PM, gmspro wrote: > > Hi, > > I tried this, > >>> import array > &g

How can i call array_length to get the length of array object?

2012-06-23 Thread gmspro
Hi, I tried this, >>> import array >>> from array import array >>> arr=array('i',[5,7,8]) >>> arr.sg_length Traceback (most recent call last):   File "", line 1, in AttributeError: 'array.array' object has no attribute 'sg_length' >>> arr=array('i'[5,8,7]) Traceback (most recent call last):   Fi

Filenames started with _(underscore) in Modules/ why?

2012-06-23 Thread gmspro
There are some files whose filename is started with _(underscore). Why are they started with a underscore? -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python source code not available on github?

2012-06-23 Thread gmspro
le on github? To: "gmspro" Cc: python-list@python.org Date: Saturday, June 23, 2012, 7:23 PM http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2 On Sat, Jun 23, 2012 at 9:16 PM, gmspro wrote: Why is python source code not available on github? Make it available on github so

Why is python source code not available on github?

2012-06-23 Thread gmspro
Why is python source code not available on github? Make it available on github so that we can git clone and work on source code. -- http://mail.python.org/mailman/listinfo/python-list

Can't understand python C apis

2012-06-23 Thread gmspro
I'm trying to understand the source code of python and how it works internally. But i can't understand the python C apis. Too much macro calling there and python C api. I can't understand those. I've also read the doc for python C api. What should i do? Which file's code should i read to understan

Is python a interpreted or compiled language?

2012-06-20 Thread gmspro
Hi, Is python a interpreted or compiled language? What does happen after this command: python f.py I knew python makes file.pyc file to store the bytecode. For java , .class file is the bytecode file, someone can run that file from any machine. So is the .pyc file executale like java? Can anyo

How can i build python3 without optimization?

2012-06-17 Thread gmspro
I tried this: CFLAG=-g ./configure --prefix=/home/user/localdir But during debugging python i get: (gdb)next (gdb)print variable (gdb)$1 = What should i do? How can i get the value of a variable instead of ? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

How does python bytecode works?

2012-06-17 Thread gmspro
We know python is written in C. C is not portable. So how does python work on a webserver like apache/httpd for a python website? How does the intermediate language communicate with server without compiling python code? Or how does python interpreted code work with webserver for python based webs