| Reply | « Previous Thread | Next Thread » |
|
Hi,
I am trying to import a bunch of files dynamically using a for loop. For example: Code:
for file in files:
exec('from %s import test' % file)
Code:
from file1 import test from file2 import test from file3 import test I am working on N95, python version 1.4.5. I realize that there is a newer version of python, but need to stick with this one due to some compatibility issues. Thanks in advance for your help. |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
Hi,
Please explain how it doesn't work. Does it give an error? Does it do nothing at all? I tried it like in your example and it worked. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| CAknMessageQueryDialog not working on the Target E61 | symbians60 | Symbian User Interface | 4 | 2008-04-23 21:15 |
| working fine on 3 rd edition but crashesh on 3 rd edition fp1(err KERN EXEC 3) | sarafhere | Symbian User Interface | 4 | 2008-03-10 10:04 |
| Working on GSM, Not working on CDMA | aminuddin09 | Mobile Java Networking & Messaging & Security | 0 | 2007-03-21 08:07 |
| Program suddenly not working - doesn't recognise hardware | luciadoll | Bluetooth Technology | 0 | 2006-12-10 02:54 |