import

how do python module variables work?

I used to think that once a module was loaded, no re-importing would be done if other files imported that same module, or if it were imported in different ways. For example, I have mdir/__init__.py, which is empty, and mdir/mymod.py, which is: thenum = None def setNum(n): global thenum if thenum is not None: raise ValueE...

How to invoke an external library function on an object within a JSTL loop before outputting it?

Let's say I have the following JSTL loop: <c:forEach items="${foos}" var="foo" varStatus="status"> <c:out value="${processedFoo}"/> </c:forEach> And let's say I have an external library com.foo.processor which contains a ProcessorFactory class with a process method. How do I import this library and call the following code from in...

help needed with magento product import products wont show up in catalog after import

I asked a similar question a couple days ago and didn't get any answers that solved my problem (http://stackoverflow.com/questions/3543992/after-importing-products-into-magento-they-dont-show-up-catalog) Ive tried everything to get this to work i feel like its something trivial im missing. I have used magento before and never had any...

Expression Blend 4.0 - What layer effects and blend modes are supported for imported Photoshop files?

Many Photoshop effects aren't property supported by Expression Blend. Usually I see an option to "flatten layer" to get around this problem. Is there a comprehensive list of what effects or blend modes are supported by Blend? I'm curious about the Silverlight features supported during import but would also like to know if there are an...

Something quite tricky in a python exercise

I wrote a python script test1.py in which I import a module called test2, then in test2, I did import test1; when I run test1, it works correctly; to my very big suprise, when I try to run test2, it outputs exactlly the same result as I run test1, despite these two files have very very different contents. but when I remove import test2, ...

how do i use the c++ dll in c#

i like import c++ dll in my c# application how can i Do this?, what is concept i need to use for this? ...

Is there a good way to verify if a database schema is correct after an upgrade or migration?

We have customers who are upgrading from one database version to another (Oracle 9i to Oracle 10g or 11g to be specific). In one case, a customer exported the old database and imported it into the new one, but for some reason the indexes and constraints didn't get created. They may have done this on purpose to speed up the import process...

How to import a class from a module from a package dynamically?

This is probably really simple, but I don't understand it. The following works: foo.py class Foo: pass bar.py module = __import__('foo') foo = module.__dict__['Foo'] Afterwards, foo is the class foo.Foo as expected. Yet, if I put a.py into a package, it stops working: qux/__init__.py (empty file) qux/foo.py class Foo: ...

import C# form into c++

Is there a way to import a C# windows form and user control into C++.NET? I'm using VS2008 and have VS2010 installed as well. ...

Eclipse 3.5+ - Annotation processor: Generated classes cannot be imported

I am using a 3rd party annotation processor for generating meta-data code (.java files) from the annotated classes in my project. I have successfully configured the processor through Eclipse (Properties -> Java Compiler -> Annotation Processing) and the code generation works fine (code is automatically created and generated). Also, Eclip...

Magento Dropshipping - How to automate catalog updates?

Hi, I am new to Magento and impressed by the MVC framework that powers it, making module development a well thought out solution. I am strong CakePHP developer. I am working on a project that uses a dropshipper for the physical products. As a result, every day at 4am a feed needs to be parsed and the products / categories modified, plu...

Export/Import a list of MSMQ Queues from one server to another

I have a significant amount of MSMQ Queues that need to be migrated to another server. Does anyone have (or know of) a script or tool that does that? Thanks. ...

Importing issues for products

Ok so I am trying to import a csv which I need to insert into a db through rails or anyway that would be quickest so i decided to create a dummy rails application to do the importing. Here is some of the code below which I got some of it from a blog I was reading. def upload table = ImportTable.new :original_path => params[:upload][:c...

How do I restore one database from a mysqldump containing multiple databases?

I have a mysql dump with 5 databases and would like to know if there is a way to import just one of those (using mysqldump or other). Suggestions appreciated. ...

Mass export and import of sql table rows

I need to export the data from 36 SQL tables containing 24GB of data into flat files, copy them to the client and import them there into the existing tables in his SQL database. And I will need this for several customers (same tables, though). How do I mass export and import data? Is there a command line tool for this so I can write a s...

Reasoning behind `from ... import ...` syntax in Python

I always wondered why the syntax for importing specific objects from a module is from module import x, y, z instead of import x, y, z from module. I'm not a native speaker, but isn't the latter more correct/natural? So what's the reason to put the from first? Is it merely to simplyfy the grammer (require less lookahead)? Is it an attemp...

Is it possible to have Delphi auto-generate event-support code for an imported OLE/COM type library?

I'm trying to generate _TLB import units for Outlook 2003, 2007 and 2010 (and also other OLE servers) analogous to the ones bundled with Delphi for Outlook 2000 and 2002. However, I couldn't get the type library importer to also generate the code for capturing events from the OLE servers that is found in the bundled units. The option to ...

How can I import a python module fuction dynamically?

Assuming def my_function(): is located in my_apps.views I would like to import "my_function" dynamically without using something like exec or eval. Is there anyway to accomplish this. I'm looking to do something similar to: my_function = import_func("my_apps.views.my_function") my_function() ... code is executed ...

"no matching architecture in universal wrapper" problem in wxPython?

I am running Python 2.7 under Mac OS 10.6.4, and I just installed wxPython from the wxPython2.8-osx-unicode-2.8.11.0-universal-py2.7.dmg binary. I am getting a weird error on the import wx line in my Python scripts. FYI, I can import the wx module just fine from PyCrust. I don't really see what I have done wrong here. Could anyone please...

Import big (My)SQL file

I got a crappy connection so I can't use apps like BigDump, that would stop if I can't stay in the page. What can I do? I'm looking for a way to import without the necessity of keep connected all the time... ...