473,661 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_t ime = 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 3142
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_t ime = 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
6999
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 for Python. I'd be using it in Linux to regularly search for files with a script. Is this a good application for Python or does Perl have more functionality for quick & simple scripting in Linux? Thanks.
2
3274
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. Javascritp has >>> and >>. >>> is a zero fill bit shift whereas >> is a sign propagating bit shift. My understanding is that the python >> is equivalent to the javascript >> - but python has no equivalent to >>>. Would a >>> 3 in javascript be...
1
2737
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
2936
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
1772
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
3134
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 eval "\$$1=\$2" while @ARGV && $ARGV=~ /^(\w+)=(.*)/ && shift;
2
2644
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 JavaScript's SetTimeout( expression, after time interval in milliseconds) function. Does Python have an equivalent to this? A SetTimeout-like Python function would be ideal for my application.
3
3191
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 equivalents. In perl I can do this pretty easily with tr: tr/\x{ff00}-\x{ff5e}/\x{0020}-\x{007e}/;
22
7906
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
8855
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8545
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7364
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4346
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1986
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.