import

Override namespace in python

Hi all, Say there is a folder '/home/user/temp/a40bd22344'. The name is completely random and changes in every iteration. I need to be able to import this folder in python using fixed name, say 'project'. I know I can add this folder to sys.path to enable import lookup, but is there a way to replace 'a40bd22344' with 'project'? May b...

Automate browser navigation and data extraction

Hi, I am trying to automate data extraction from a website and I really don't know where to start. One of our suppliers is giving us access to some equipment logging data through a "Business Objects 11" online application. If you are not familiar with this online app, think of it as a web based report generator. The problem is that I am...

Objective-C Category import strange behavior

I am extending a class from a external library. Here is my code: Header file: Manager+MyCategory.h #import "Manager.h" #import "Element.h" @interface Manager (myCategory) - (Element*) elementWithTag:(NSInteger)tag; @end Implementation file: Manager+MyCategory.h file @implementation Manager (myCategory) - (Element*) elementWithT...

How can I import an interop dll into actionscript

Making an adobe flex ui in which data that is calculated must use proprietary functions from a dll. How can I import this dll into actionscript? Is this the only way to achieve my goal? Thanks! ...

How does os.path map to posixpath.pyc and not os/path.py?

What is the underlying mechanism in Python that handles such "aliases"? >>> import os.path >>> os.path.__file__ '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/posixpath.pyc' ...

Importing MD5+Salt Passwords to MD5.

I'm moving my site from an oscommerce store to a commercial application. The new application stores its passwords using straight MD5 encryption. Oscommerce stores the password using MD5, but also adds a random 2 digit number (provided in plaintext) to the hash. Here is what someone posted on a forum: The two characters added are ...

Does "from-import" exec the whole module?

OK, so I know that from-import is "exactly" the same as import, except that it's obviously not because namespaces are populated differently. My question is primarily motivated because I have a utils module which has one or two functions that are used by every other module in my app, and I'm working on incorporating the standard library ...

Why does an extra symbol get created when I import a png file into Flash CS3?

When I import a .png file into the library in Flash CS3, I noticed that the system always creates an extra symbol in the library. If I import, for example, foo.png, into the library, it not only creates a bitmap with the same name, but also a Symbol of the type "Graphic" with the default name, e.g. Symbol 576. I am not using these symb...

Efficiently importing modules in Django views

Hi all, I was wondering - how do people handle importing large numbers of commonly used modules within django views? And whats the best method to do this efficiently? For instance, I've got some views like, admin_views.py search_views.py . . and from what I've seen, every one of them needs to use HttpResponse or other such commonly ...

Creating XML for import into Excel, particularly dates

Greetings. I have a simple application that generates some performance-logging data, and I need the output to be accessible to Excel. I create an XML document with the fields etc in it, and can open this in Excel. The problem is, how do I coerce Excel to treat dates as dates? I've tried saving the date value as various formats, but E...

Import / Export database with SQL Server Server Management Studio

I thought this would be trivial, but it isn't... I'm sure there is a simple way to do it but I can't manage to find it. Shame on me. I want to import/export the database itself, the tables, the constraints (foreign keys and so on). I'd rather not get the data with it, but I can get rid of it after if there's no other way. So... how do ...

SVN replicate directory

Is it possible (or even practical) to copy directory from one SVN repository location to another, retaining tho old one and keep history for each individual file in both places? So far I see SVN import which copies the directory but looses the history or SVN move which relocates the directory. Here's a brief example: COPY SVN_ROOT/proj...

Synchronise two different instances of AzMan

Hi, I'm wondering does any one know how to sync data between two instances of AzMan? I've created a big list of tasks and operations in the test instance of AzMan and I need to move it to another server for UAT. I've googled around and the closest solution I found was a bulk import/export tool, but there's no document on how to run ...

MSBuild Conditional Imports

Is there a workaround for conditional imports in MSBuild? I've found evidence here and here detailing a bug in the MSBuild IDE interface. In particular, Import statements do not reload when building: This is a known limitation. VS will only ever process the tags once, when the project is loaded. So whatever tag is active at the...

Trying to import a module that imports another module, getting ImportError

In ajax.py, I have this import statement: import components.db_init as db In components/db_init.py, I have this import statement: # import locals from ORM (Storm) from storm.locals import * And in components/storm/locals.py, it has this: from storm.properties import Bool, Int, Float, RawStr, Chars, Unicode, Pickle from storm.prope...

Importing Maya ASCII to game

I am currently working on creating an import-based pipeline for my indie game using Maya ASCII .ma as source format and my own format for physics and graphics as output. I'll keep stuff like range-of-motion attributes inside Maya, such as for a hinge joint. Other types of parameters that needs a lot of tweaks end up in separate source fi...

Import Dynamically Created Python Files

I am creating python files through the course of running a python program. I then want to import these files and run functions that were defined within them. The files I am creating are not stored within my path variables and I'd prefer to keep it that way. Originally I was calling the execFile(<script_path>) function and then calling t...

Forced to use inconsistent file import paths in Python (/Django)

Hi I've recently been having some problems with my imports in Django (Python)... It's better to explain using a file diagram: - project/ - application/ - file.py - application2/ - file2.py In project/application/file.py I have the following: def test_method(): return "Working" The problem occurs in proj...

I want to upload an excel spreadsheet to IIS and then import its contents

I need to be able to import the contents of an Excel spreadsheet using the file upload capability. The user must be able to upload the file to the web server which will then open it and import its contents. The steps are: Upload the file Open it and read column headers from the top row Map the columns into the columns I can accept Exec...

python - Importing a file that is a symbolic link

Hi, If I have files x.py and y.py . And y.py is the link(symbolic or hard) of x.py . If I import both the modules in my script. Will it import it once or it assumes both are different files and import it twice. What it does exactly? ...