473,322 Members | 1,473 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,322 software developers and data experts.

Python equivalent to PHP's SPL __autoload() ??

I was curious (and have spent an enormous amount of time on Google
trying to answer it for myself) if Python has anything remotely
similar to PHP's SPL __autoload() for loading classes on the fly??

After digging through docs I feel doubtful there is such a language
feature, but, it is possible I missed something or maybe someone has
written an extension?!?

Thanks in advance!
Jun 27 '08 #1
2 1958
ici
On Apr 27, 10:34 pm, Ixiaus <parnel...@comcast.netwrote:
I was curious (and have spent an enormous amount of time on Google
trying to answer it for myself) if Python has anything remotely
similar to PHP's SPL __autoload() for loading classes on the fly??

After digging through docs I feel doubtful there is such a language
feature, but, it is possible I missed something or maybe someone has
written an extension?!?

Thanks in advance!
from module_name include *
Can do the magic. You can't learn Python from helps or internet, got a
book. Learning Python: http://www.oreilly.com/catalog/lpython/ is a
very good start :)
Jun 27 '08 #2
Ixiaus <pa*******@comcast.netwrote:
I was curious (and have spent an enormous amount of time on Google
trying to answer it for myself) if Python has anything remotely
similar to PHP's SPL __autoload() for loading classes on the fly??

After digging through docs I feel doubtful there is such a language
feature, but, it is possible I missed something or maybe someone has
written an extension?!?

Thanks in advance!
--
http://mail.python.org/mailman/listinfo/python-list
If I'm understanding __autoload() correctly, not in the box, but most
of what you need is built in, you just have to do a little work to use
it. See the "Loading and reloading modules" section on this page:

http://effbot.org/librarybook/builtin.htm
max

Jun 27 '08 #3

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

Similar topics

28
by: Erik Johnson | last post by:
This is somewhat a NEWBIE question... My company maintains a small RDBS driven website. We currently generate HTML using PHP. I've hacked a bit in Python, and generally think it is a rather...
29
by: Catalin | last post by:
Can Python replace PHP? Can I use a python program to make an interface to a mysql 4.X database? If that's possible where can I find a tutorial?
54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
226
by: Stephen C. Waterbury | last post by:
This seems like it ought to work, according to the description of reduce(), but it doesn't. Is this a bug, or am I missing something? Python 2.3.2 (#1, Oct 20 2003, 01:04:35) on linux2 Type...
2
by: David T. Ashley | last post by:
Hi, In my PHP code, I typically break my functions into groups (usually based on the data type they operate on), and then include the files, i.e.: require_once("string_functions.inc");...
1
by: Schraalhans Keukenmeester | last post by:
My hosting party recently switched to PHP5 (finally) enabling me to do useful OOP stuff, which was at best challenging in PHP4. I can't seem to find the manual pages containing info on methods...
1
by: maconbot | last post by:
hi all, please exuse my email ">" i am working on location. > hey team, thanks for the quick reply. > > i am trying to parse a pop3 account and populate it into flash. > > the how to code......
0
by: turnitup | last post by:
I don't suppose anyone can suggest a PHP referencer that can parse a program that uses the __autoload function?
67
by: notbob | last post by:
I'm not posting this just to initiate some religious flame war, though it's the perfect subject to do so. No, I actaully want some serious advice about these two languages and since I think usenet...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.