import

Maya .ma matrix scale translation

A perhaps slightly off-topic subject, but Maya is giving me serious grief on a specific scale translation matrix transformation, and I have nowhere else to turn. Everything works fine with my Maya .ma (Maya ASCII) importer until Maya descides to add an .spt attribute (typically setAttr ".spt" -type "double3" 1 2 3 ;). From this somewhat...

Objective-C #import loop

Hi, I have the following code: #import <Foundation/Foundation.h> #import "ServerRequest.h" // works even though this line is included #import "ServerResponseRecord.h" @protocol ServerRequestDelegate<NSObject> -(void)request:(id)request gotResponseRecord:(ServerResponseRecord*)response; -(void)request:(id)request gotError:(NSError*)er...

Python import with name conflicts

I have now bumped into this problem twice recently and am curious if there is a solution. So I have a module that confilcts with a python builtin. For example, say I have a myapp.email module defined in myapp/email.py. Now anywhere in my code I can reference myapp.email just fine. However, I need to reference the builtin Python email...

Python: How to import part of a namespace

I have a structure such this works : import a.b.c a.b.c.foo() and this also works : from a.b import c c.foo() but this doesn't work : from a import b.c b.c.foo() nor does : from a import b b.c.foo() How can I do the import so that b.c.foo() works? ...

How can I import a .PYD module in IronPython?

I'm trying to use a python package from IronPython. Everything works fine if I import regular python modules. But when I try to do the following: import win32ui I get: No module named win32ui I've hunted through the code in IronPython.Runtime.Importer and there's no mention of .pyd Anyone know a way around this? ...

Is any software decent at importing column-aligned text?

Here's something that's really irked me over the years. I've never used any software that, when importing data from a column-aligned text file, can figure out the column breaks in a correct manner. Excel 2K3 and a lot of other Microsoft components that seem to share a common codebase (like the import options for SQL2K) attempt to figur...

"Upload" a file from django shell

I need to import some data from a excel file and a folder with images, every row in the excel describes every entry and have a list of filenames in the folder (photos related to the entry). I've done a script which creates every entry in the database and saves it trough the django shell, but i have no idea how to instantiate a InMemoryU...

How long do zipimported module imports remain cached in memory when using appengine / python and is there a way to keep them in memory?

I've recently uploaded an app that uses django appengine patch and currently have a cron job that runs every two minutes. On each invocation of the worker url it consumes quite a bit of resources /worker_url 200 7633ms 34275cpu_ms 28116api_ms That is because on each invocation it does a cold zipimport of all the libraries django etc...

How can I import data from text files into Excel?

I have multiple folders. There are multiple txt files inside these folder. I need to extract data (just a single value: value --->554) from a particular type of txt file in this folder.(individual_values.txt) No 100 Value 555 level match 0.443 top level 0.443 bottom 4343 There will be many folders with same...

Emacs: import a CSV into org-mode

Emacs has a very nice extension by the name of org-mode. I would like to be able to easily load CSV files into org-mode without significant grief. All I've been able to find is table-import or table-capture, which, simply put, don't work even approximately well. Note that part of my issue is text strings with a comma within them. 1,2,...

MS Access Freezes Up After Text Import

I have the following code to import a delimited file into an Access 2003 database: Public Function importTextFile(sFile As String, _ sTable As String, _ sSpecification As String) On Error GoTo importTextFile_EH ' Validate arguments to see if the objects exist; if not, giv...

Python imports: Will changing a variable in "child" change variable in "parent"/other children?

Suppose you have 3 modules, a.py, b.py, and c.py: a.py: v1 = 1 v2 = 2 etc. b.py: from a import * c.py: from a import * v1 = 0 Will c.py change v1 in a.py and b.py? If not, is there a way to do it? ...

Excel VBA - Password prompt after Form Show and Import Data

I have this macro that is password protected and shows a form. Recently I added code to import data from excel and every time I close it asks me for a password - I can cancel through it but I'd like to make it go away, I see no plausible reason why it would come. I've separated out the few lines that causes this problem Sub a() U...

Importing Pantomime for sending email!

Hello, I want to send an email from Cocoa in an asynchronous manner. I have downloaded Pantomime source code and compiled it, then got the framework from the build folder. I have added the Pantomime framework in my app. Now my problem is when I add the import satement like: #import <Pantomime/Pantomime.h> I got these build errors: ...

Python: How can I choose which module to import when they are named the same

Lets say I'm in a file called openid.py and I do : from openid.consumer.discover import discover, DiscoveryFailure I have the openid module on my pythonpath but the interpreter seems to be trying to use my openid.py file. How can I get the library version? (Of course, something other than the obvious 'rename your file' answer would b...

Actionscript 3 import package.* vs import package.Class

In Actionscript 3, is there any reel overhead between importing a full package versus importing independant classes? E.g.: import flash.display.* vs. import flash.display.Sprite I know it's a good practice to import only the needed classes from a package to avoid conflicts, but I've often been told it also has a cost in term of the com...

Python: import a file from a subdirectory

Hi, I have a file called tester.py, located on /project. /project has a subdirectory called lib, with has a file called BoxTime.py: /project/tester.py /project/lib/BoxTime.py I want to import BoxTime from tester. I have tried this: import lib.BoxTime Which resulted: Traceback (most recent call last): File "./tester.py", line 3...

Postgres csv import duplicate key error?

Hi, I am importing a CSV file to postgres. copy product from '/tmp/a.csv' DELIMITERS ',' CSV; ERROR: duplicate key value violates unique constraint "product_pkey" CONTEXT: COPY product, line 13: "1,abcd,100 pack" What is the best way to avoid this error.. Would I have to write a python script to handle this error.. ...

Python Path Question...I Think

I am installing imgseekweb according the instructions. I installed or had my hoster install imgSeekWeb.py, iswImage/images folder, iswImage/thumbnail folder, Python Imaging Library (PIL), PyQT, imgSeek, imgSeekCmd (updated), and imgSeekWeb-0.0.1_2. I was able to successfully create the database by running imgSeekCmd add -b ~/data/img-d...

Mysql only imports a single row from CSV

Development machine is a Mac. I'm having some trouble importing more than a single line from a CSV into Mysql. Here is my SQL statement: LOAD DATA LOCAL INFILE 'test.csv' INTO TABLE students FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (pita, dob, name, grd, asst, loc); It runs fine, but only one record is imported. Any idea whe...