import

How do I conditionally import a function from a DLL in an Inno Setup script?

I have a helper DLL and a function I call at the end of my setup script. I only want to run it depending on the operating system version. I include the following lines in the code section: function CompleteInstall(szInstallPath: String) : Integer; external 'CompleteInstall@files:InstallHelper.dll cdecl setuponly'; I've written a fu...

Maven reuse in poms

In our Maven project, we are trying the following directory structure (with about 80 projects total, only a few are shown so that you get the idea): myappli (pom) -- module1 (pom) --|-- utils (pom) --|-- ejb (pom) --|--|-- myappli-module1-a-ejb (jar) --|--|-- myappli-module1-b-ejb (jar) --|-- war (pom) --...

XML data and schema in Excel using VB.NET

Hi, I have an XML schema and an XML data file. I've implemented it in Excel and it works great. I want to Automate the process using vb. I want to open the xls file, the schema is already mapped in the file. then I want to import the XML data file and print a selected working sheet. this is the code that I have to open the file and t...

Importing external module in IronPython

I'm currently working on an application written in C#, which I'm embedding IronPython in. I generally have no problems about it, but there's one thing that I don't know how to deal with. I want to import an external module into the script. How can I do that? Simple import ext_lib doesn't work. Should I add a path to the lib to sys.path...

CSV import (variable fields)

I have to import a series of CSV files and place the records into an Access database. This, in itself, is not too much of an issue. The complication comes from the fact that the format of each CSV file is variable in that the number of fields may vary. The best way to think about this is that there are 80 master fields, and each CSV fi...

How to call C# .dll from a C++/CLI application?

I'm trying to call the LumenWorks .csv file reading library from a C++/CLI application and having some issues. I've added a dependancy on LumenWorks.Framework.IO.dll but when I try to then use the library: namespace MyNamespace { using namespace Lumenworks::Framework::IO::Csv; // <My code definitions here> } I get a message ...

Django : import problem with python-twitter module

Hi, When I try to import python-twitter module in my app, django tries to import django.templatetags.twitter instead of python-twitter module (in /usr/lib/python2.5/site-packages/twitter.py), but I don't know why. :s For example: myproject/ myapp/ templatetags/ file.py In file.py: import twitter # this impor...

Class Not Registered.... when trying to call a managed C# library from unmanaged C++

Hey everyone, I have a C# library that I am using for a COM object in unmanaged C++ code. I registered the library using Visual Studio's checkbox "Register For Com Interop" and set ComVisible to true. imported the tlb to the C++ app..... when I run it, I get a "Class Not Registered".... This has worked before, but this started happen...

C# add a reference using only code (no IDE "Add Reference" functions)

Hello, I am writting a plugin for a program, and I want to put my code inside a DLL so I can share the plugin freely without exposing (giving away) my code. Here is the basic structure i have access to : using System; public class Plugin { public void Initialize() { //do stuff here doWork(); } } Then i jus...

No simple way to "include" in Java?

When logically something seems as if it would be dead simple, then it turns out to be completely convoluted, I have not used Java much, so please forgive my ignorance. Here is what I am trying to do: I have a nice clean algorithm in one .java file, and I want to feed it from an initialized array. The array contains over 40,000 elements...

How to extract and then refer to variables defined in a python module?

I'm trying to build a simple environment check script for my firm's test environment. My goal is to be able to ping each of the hosts defined for a given test environment instance. The hosts are defined in a file like this: #!/usr/bin/env python host_ip = '192.168.100.10' router_ip = '192.168.100.254' fs_ip = '192.168.200.10' How ca...

hashlib / md5. Compatibility with python 2.4

Hi all. python 2.6 reports that the md5 module is obsolete and hashlib should be used. If I change import md5 to import hashlib I will solve for python 2.5 and python 2.6, but not for python 2.4, which has no hashlib module (leading to a ImportError, which I can catch). Now, to fix it, I could do a try/catch, and define a getMd5() func...

Easiest way to interface between a web app and SAP

Greetings! I've spent some time researching how to communicate with SAP from a PHP web application, but the documentation is more than spare. The ways I found are: Creating IDoc files, some sort of proprietary plain-text format. But how do I stick them in SAP when they are created on the webserver? Coding a Windows Application using t...

Problem with import in Python

[Closing NOTE] Thank you everyone that trying to help me. I've found the problem and it have nothing to do with python understanding of mine (which is little). :p The problem is that I edit the wrong branch of the same project, Main.py in one branch and XWinInfos.py in another branch. Thanks anyway. [Original Question] I am a Java/PH...

How to tweak Rhapsody's "Reverse Engineering" tool to morph certain attributes as separate classes?

I am importing legacy C++ code using Rhapsody. One class has many (several dozen) attributes I'd rather see imported as separate classes. I've tried different "options" settings with no results. Is there a way to do this, other than redo all by hand? ...

Tool for transforming Excel files? (swapping columns, basic string manipulation etc)

I need to import tabular data into my database. The data is supplied via spreadsheets (mostly Excel files) from multiple parties. The format of each of these files is similar but not the same and various transformations will be necessary to massage the data into the final format suitable for import. Furthermore the input formats are like...

SQL Server to Access import problem

When I try to import an SQL Server database into access I am getting this error I am using OS: Windows Vista App: MS Access 2007 DB: MS SQL 2005 Error: Connection failed SQLState; "01000' SQL Server Error: 52 [Microsoft] [ODBC SQL Server Driver] [DBNETLIB] ConnectionOpen (Connect()). Connection failed; SQLState: '08001' SQL Server Err...

Trying to use Loader class inside of package, getting Error 1046: Type was not found or was not a compile-time constant

This is driving me nuts, I can run this fine with code on the main timeline, but when I put this inside of my sub Class I'm getting the Compile time error and 1180: Call to a possibly undefined method. This is the line causing all my grief: public var splashLoader:Loader = new Loader(); What I don't get is, inside my main class I'm usi...

How do I find the name of the file that is the importer, within the imported file?

How do I find the name of the file that is the "importer", within the imported file? If a.py and b.py both import c.py, is there anyway that c.py can know the name of the file importing it? ...

module reimported if imported from different path

In a big application I am working, several people import same modules differently e.g. import x or from y import x the side effects of that is x is imported twice and may introduce very subtle bugs, if someone is relying on global attributes e.g. suppose I have a package mypakcage with three file mymodule.py, main.py and init.py mymodu...