import

What's Python good practice for importing and offering optional features?

I'm writing a piece of software over on github. It's basically a tray icon with some extra features. I want to provide a working piece of code without actually having to make the user install what are essentially dependencies for optional features and I don't actually want to import things I'm not going to use so I thought code like this...

import csv or sql thru phpmyadmin and skip PK?

Is it possible to have phpmyadmin or other tool to import a csv or sql backup into an existing DB and skip the primary key or is this a manual, table by table process of inserting with queries and manually removing the primary key? ...

How to exit a module before it has finished parsing?

I have a module that imports a module, but in some cases the module being imported may not exist. After the module is imported there is a class inherits from a class the imported module. If I was to catch the ImportError exception in the case the module doesn't exist, how can I stop Python from parsing the rest of the module? I'm open to...

problem while importing the data from text to mysql

Hi, I have used an application to import some data from a text file to mysql. I have used the following code. try { stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); stmt1= (Statement) conn.createStatement(); int deleteRows = stmt1.executeUpdate("delete fro...

How to convert old data to a new system? using sql or managed code?

Let say a company are building a brand new application. The application are following the DDD principles. The old codebase has alot of products (or another "entity" for the company) that they want to convert to the new codebase. How should this work be done? normally it is faster and easier to import using for examples ssis,-transferrin...

How do I build an import library (.lib) AND a DLL in Visual C++?

I want to have a single Visual Studio project that builds a DLL file and an import library (.lib) file. (An import library is a statically-linked library that takes care of loading that DLL file in other projects that use it). So I went to Visual Studio C++ 2008 Express Edition, created a New Project of type Class Library, and set the ...

Which would make a Class file bigger? import java.awt.*, or a bunch or single import statements?

Okay, so if I had a project that used: import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Dimension; import java.awt.Font; import java.awt.Color; import java.awt.Polygon; Would it make the Class file smaller to use: import java.awt.* I'm thinking against it because I'm importing a lot of things I don't need. I'm ...

IronPython "LookupError: unknown encoding: hex"

When I try to "import simplejson" (or something that depends on it) in IronPython 2.0, I get "LookupError: unknown encoding: hex". How do I make this work? ...

Why can't I use my Jython class in an imported module?

I have a couple of Jython modules living in the same directory. One of them defines the following class: from java.lang import Runnable class MyTask(Runnable): def __init__(self, params): Runnable.__init__(self) self._params = params def run(self): # do stuff print "Done doing stuff" I can ins...

OpenMP: What is the difference between foo() and bar()

void foo(void) { #pragma omp parallel { #pragma omp single {fprintf(stderr, "first part\n"); } #pragma omp barrier #pragma omp single { fprintf(stderr, "second part\n"); } } } void bar (void) { #pragma omp parallel { #pragma omp sections { ...

Import data from Microsoft Works database into SqlServer

How can data be imported from a Microsoft Works database (*.wdb file) into a SqlServer2005 database. Would SSIS be able to do this? ...

How to Import System.ServiceProcess namespace into WPF project? Not showing in CodeSense

Guys, how can I import the System.ServiceProcess namespace into a WPF project in VB.net (not C#)? The ServiceController object is not in the toolbox in VS2008 and can't see to figure it out. Any ideas? If that particular namespace cannot be imported into WPF projects, could somebody suggest another way of controlling windows services fro...

How can I read a Microsoft Money data file using .NET?

I have a requirement to read and import data from MS Money data file. How can I achieve this? Is there a SDK available? I would like to have a similar mechanism to read Quicken files too. ...

Import Dumped SVN Repo into Visual SVN

I have dumped my repository on my old computer to a file with the command. svnadmin dump C:\myrepo/ > mydumpfile Now I decided to use Visual SVN on my new computer as opposed to just a baseline subversion. How do I import my repository into VisualSVN? ...

Unable to import python-mysqldb

I installed python-mysqldb using sudo apt-get install python-mysqldb I have tried to use it unsuccessfully. The following commands do not work in Python prompt: import python-mysqldb Or import mysqldb How can I solve this problem? ...

Help with packages in java - import does not work

I'm a C++ developer - not a java developer, but have to get this code working... I have 2 public classes that will be used by another product. I used the package directive in each of the java files. package com.company.thing; class MyClass ... When I try to compile a test app that uses that I add import com.company.thing.*; T...

Is there a way to import an Excel worksheed file (ver 2.1) into SQL 2005 using SSIS?

I am receiving an Excel Worksheet file (ver 2.1) from one of our clients as part of a weekly date update. I am trying incorporate it into our automated update process, but I can't import the file in SSIS (or Sql Management Studio) as the oldest format I can process is Excel 3.0. Is there an update that will add support for this older f...

Error importing oracle dump

I am trying to import a dump into two schema in the same oracle DB.Following a workaround to do this. I am trying to run the imp command with the INDEXFILE option to be able to modify the tablespace names in the sql. This is what I get : E:\oracle_10_2\BIN>imp atlantis/atlantis@orcl file=ABCD1_EXCLUDE_CLOB_TABS_BAK.dmp indexfile=in...

iPhone - Importing/Exporting App data?

iPhone apps are great for managing or viewing small elements of data however doing mass and/or long data entry or typing is a pain. For apps that need to have longer dynamic data that can be used on the iPhone but more easily created at the desktop, what sort of options exist for getting data from the desktop to the iPhone app? Are web...

Matrix Munging (with import and export to CSV file)

Here's a (simplification of a) task I do a lot: 1) Import a CSV file like the following: 1, cat, 10, junk 2, dog, 20, junk 3, mouse, 30, junk 2) Remove the fourth column and replace it with twice the third column. 3) Insert a new column that is half the third column. 4) Export to to CSV, ie: 1, cat, 5, 10, 20 ...