473,394 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

reg php.ini equivalent file in python

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
Jul 19 '05 #1
2 3125
praba kar wrote:
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...).
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Jul 19 '05 #2
praba kar wrote:
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.
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Greg Yasko | last post by:
Hi. Does anyone know if there's an equivalent of Perl's file::find module in Python? It traverses a directory. I've googled extensively and checked this newsgroup and can't find anything like it...
2
by: Michael Foord | last post by:
Please pardon my ignorance on this one - but I'm not certain how the sign bt is treated in python bitwise operators. I've trying to convert a javascript DES encryption routine into python. ...
1
by: Edward WIJAYA | last post by:
Hi, I am new to Python, and I like to learn more about it. Since I am used to Perl before, I would like to know what is Python equivalent of Perl code below: $filename = $ARGV;
35
by: les_ander | last post by:
Hi, I know that i can do readline() from a file object. However, how can I read till a specific seperator? for exmple, if my files are name profession id #
1
by: praba kar | last post by:
Dear all, Is there any php equivalent move_uploaded_file($source_path, "$upload_dir/$name"); function in python to upload a file to server? Kindly give me answer. regards Prabahar
3
by: David MacKay | last post by:
Dear Greater Py, <motivation note="reading this bit is optional"> I am writing a command-line reader for python. I'm trying to write something with the same brevity as perl's one-liner ...
2
by: ycoci0 | last post by:
Hi all, Not exactly new to Python, just have not programmed a time dependent function using it before. I imagine that many of you may also program some JavaScript and may be familiar with...
3
by: kettle | last post by:
Hi, I was wondering how I ought to be handling character range translations in python. What I want to do is translate fullwidth numbers and roman alphabet characters into their halfwidth ascii...
22
by: Kurien Mathew | last post by:
Hello, Any suggestions on a good python equivalent for the following C code: while (loopCondition) { if (condition1) goto next; if (condition2) goto next;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.