reg php.ini equivalent file in python

P

praba kar

Dear All,

I have one doubt. Is there python.ini
file like php.ini in Php?

Actually php.ini file controls many aspects of
PHP's behavior. The following details of php.ini
will explain about it.

max_execution_time = 5000 ; Maximum execution time
of each script, in seconds (UNIX only)

memory_limit = 134217728 ; Maximum amount of
memory a script may consume (128MB)

post_max_size = 67108864 ; Maximum POST-Content
length (64MB)

If I want to update the above details in Python where
I need to change these things in Python

regards,
Prabahar



_______________________________________________________
Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for FREE! http://in.mail.yahoo.com
 
B

bruno modulix

praba said:
Dear All,

I have one doubt. Is there python.ini
file like php.ini in Php?

bruno@localhost ~ $ python -h
usage: python [option] ... [-c cmd | file | -] [arg] ...
(snip)
PYTHONSTARTUP: file executed on interactive startup (no default)
(snip)

I guess this is the closer thing.
Actually php.ini file controls many aspects of
PHP's behavior. The following details of php.ini
will explain about it.

max_execution_time = 5000 ; Maximum execution time
of each script, in seconds (UNIX only)

memory_limit = 134217728 ; Maximum amount of
memory a script may consume (128MB)

post_max_size = 67108864 ; Maximum POST-Content
length (64MB)

All those settings are somewhat web-specific, and would not have much
meaning in most Python usages.
If I want to update the above details in Python where
I need to change these things in Python

This (if possible) depends on the web developpement solution you use
(cgi, mod_python, CherryPy, Webware, Zope, other...).
 
M

Magnus Lycka

praba said:
Dear All,

I have one doubt. Is there python.ini
file like php.ini in Php?

There is no such thing in Python. Python is a programming
language. It doesn't try to be an operating system or a web
server. There are a number of web application toolkits
written in Python, but I don't know whether any of them
includes these kinds of resource limitations. The limitations
on execution time and memory size are handled by the operating
system. With Python, you don't have the convenience of
setting this in an OS independent way, but it seems from
you rext that it doesn't work OS independently in PHP either.
I don't know about post content length, but it seems strange
to me to set this globally. It's not as if the same maximum
length makes sense for all forms on a typical web site.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top