import

importing same module more than once

So after a few hours, I discovered the cause of a bug in my application. My app's source is structured like: main/ __init__.py folderA/ __init__.py fileA.py fileB.py Really, there are about 50 more files. But that's not the point. In main/__init__.py, I have this code: from folderA.fileA import * in f...

Excel data connection - remove header row?

The excel spreadsheet is connecting to SQL server 2005 using the connection string below: Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=XXXXXX;Data Source=XXXXXX;Extended Properties="HDR=No";Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=XXXXXX;Use Encryption for...

Using the sharepoint stsadm import command fails when list exists

When using the stsadm -o import command in sharepoint I am getting an error relating to a list already existing, the import then seems to fail. Should it not handle this scenario of a list already existing on the destination server? I then used the UI to delete the existing list and ran the import again. It then seemed to fail at the sa...

FLEX components: updating import statements to move the component into another folder

hi, I've just imported a Flex component into my project. I have a theory question about importing. all the imports statements in the component source files started with "com.subFolder.etc", but I have preferred to move the component folders into "componentName" and to replace all import statements as "componentName.com.subFolder.etc" ...

Svn import with auto-props & pre-commit hook

My company's svn repo has a lot of MS Word docs in it. We've implemented a policy that all .doc files must have the svn:needs-lock property set to prevent parallel access on files that are hard to merge (we've also done this for xls, ppt, pdf etc.). We've implemented the policy by distributing a svn config with auto-props set appropriat...

Octave: importing a large matrix in csv format

I'm trying to import a matrix (about 80.000 rows) from a csv file to Octave. The obvious solution seems something like: load("-ascii","relative_directory/the_file.csv") or maybe renaming the file and trying: load("-ascii", "relative_directory/the_file.txt") Yet I keep getting the error: load: failed to read matrix from file "...

Importing HTML into TinyMCE using ColdFusion

Hey everyone, I would appreciate a pointing in the right direction with the problem I'm having. In short, I'm working on an application that will create PDFs using TinyMCE and ColdFusion 8. I have the ability to create a PDF by just entering in text, pictures, etc. However, I want to be able to import an html template and insert it into ...

Importing NULL Values in Tab-Delimited File Using SSMS 2005

I'm in the process of importing a very large tab-delimited text file using the Import Wizard in SQL Server Management Studio 2005. Some of the column values are empty, which are represented by the string value "NULL." However, when I try to import the file I get the following error message dialog: Is there some other value I should ...

How to use sqlite database from inside MS Access ?

I would like to use a sqlite databse inside MS Access in order to use (transfer would be good enough) the content of sqlite database table in MS-Access. How can this be done in VBA ? EDIT: This "Application" is for a client and I can not make him install "extra software" than the one already installed (in this case MS-Access): Does...

Importing a function/class from a Python module of the same name

I have a Python package mymodule with a sub-package utils (i.e. a subdirectory which contains modules each with a function). The functions have the same name as the file/module in which they live. I would like to be able to access the functions as follows, from mymodule.utils import a_function Strangely however, sometimes I can import...

.Net MEF newbie question

I am missing something basic when it comes to using MEF. I got it working using samples and a simple console app where everything is in the same assembly. Then I put some imports and exports in a separate project which contains various entities. I want to use these entities in an MS Test, but the composition is never actually done. When ...

Convert C function to Objective C or alternative way to include C library?

Background: I'm new to Objective-C and I've never touched C before. I'm trying to include a C library in my iPhone/iPod Touch project and I could not successfully compile the library's source code using the included instructions, so I've resorted to including the .h and .c files in Xcode. The library is for Hebrew Dates and correspondin...

python: list modules within the package

I have a package with a few modules, each module has a class (or a few classes) defined within it. I need to get the list of all modules within the package. Is there an API for this in python? Here is the file structure: \pkg\ \pkg\__init__.py \pkg\module1.py -> defines Class1 \pkg\module2.py -> defines Class2 \pkg\module3.py -> define...

Can't import pygame to Netbeans on Mac

I am running python 2.6.5 and pygame 1.9.1 It seems to me I've tried everything but it keeps showing 'module not found' errors... Please help! ...

How do you determine which file is imported in Python with an "import" statement?

How do you determine which file is imported in Python with an "import" statement? I want to determine that I am loading the correct version of a locally modified .py file. Basically the equivalent of "which" in a POSIX environment. ...

How do you invoke a python script inside a jar file using python ?

I'm working on an application that intersperses a bunch of jython and java code. Due to the nature of the program (using wsadmin) we are really restricted to Python 2.1 We currently have a jar containing both java source and .py modules. The code is currently invoked using java, but I'd like to remove this in favor of migrating as muc...

Importing a dmp with partitioned tables into Oracle XE

I've got a schema containing partitioned tables. I can use exp to create a .dmp, but when I import that into Oracle XE, I get errors because Oracle XE doesn't support partitioned tables. How do I get the .dmp imported into Oracle XE? I think pre-creating the tables might do it, but how do I extract the DDL in some automated way to do th...

mysql insert data from multiple select queries

What I've got working and it's what I need to improve on: INSERT form_data (id,data_id, email) SELECT '',fk_form_joiner_id AS data_id , value AS email FROM wp_contactform_submit_data WHERE form_key='your-email' This just gets the emails, now this is great, but not enough as I have a good few different values of ...

Importing csv file to SQL Server Management Studio - No tables available

I am trying to import a csv file to insert data into an existing table on my database. I go through the wizard and when it comes to select source tables and views for the destination, there are none to choose from. It just thinks I am trying to create a new table. Any suggestions? Thanks! ...

Automating site interaction

I'm working with a CMS and need to import data to it using typical html forms. The data itself is in csv files with one page per row. Such is the CMS that importing directly to db isn't possible due to the complexity of the design. It's pretty important that i "fake" usual user interaction because the CMS does a lot of background work th...