Python - Dynamically Import Classes In VB?

May 3, 2012

I'm working on a school project which need to be done in Visual Basic. For this I'm porting one of my Python project in this programming language, project which (in Python) is scanning a directory for .py files and then imports them (dynamically) with the __import__ statement, at runtime. It is possible to do this in Visual Basic with .DLL classes?

View 1 Replies


ADVERTISEMENT

VS 2008 Create An Application Using .NET Which Will Import Python Object?

Sep 8, 2010

I am trying to create an application using VB.NET which will import python object.

View 4 Replies

Import C# Classes From Dll In A .net Dll?

Feb 16, 2012

IDE: VS2010 Framework.net: 4.0 I created a c# dll project under Visual Studio 2010, with several public classes, and I would like to use its classes inside another dll project, but written in vb.net.

In the vb.net dll project, I referenced the built c# dll, but impossible to import the c# classes. The namespace of the c# dll is even not recognized.

What must I do to see my c# classes? If this is possible.

[Code]...

View 4 Replies

VS 2008 - Can't Import Classes That Are Created?

Apr 16, 2011

For some reason I can't import the classes that I created. I'm not sure why. Can anybody help me out? I added a namespace, but it still isn't working. I need to add these classes to an ASP.NET website for school. However, my imports statement doesn't even show the option. What am I missing?

[code]...

View 1 Replies

VS 2010 Make Classes Import Into Main Form.vb

Mar 20, 2012

I was just wondering how you can make classes import into your main Form.vb

Let's say I make a class with the following.

Public Class OtherStuff
Public Sub HideMe()
Form1.Hide()

[Code]....

How could I make the Form1.vb include the things that are in OtherStuff.vb.

All of the solutions that I have tried come up with the same error. Reference to a non-shared member requires an object reference.

View 2 Replies

Dynamically Import Excel File - Into Sql Table

Jun 30, 2009

I am new to .net, I got a project in which i need to import dynamically excel file into sql table. Like user will select the excel file and the sql table, then all the columns from excel file and the fields from sql table comes on the form, then user will select which column need to go to which table colums.

View 3 Replies

Use LINQ To Filter Collection Of Nested Classes To Yield Dictionary Of Unique Properties Of Those Classes?

Jan 23, 2012

I have two classes, one nested in the other. [code]Neither "Name" or "ID" are unique between operations and records.I wish to construct a dictionary using LINQ = Dictionary(Of String, Of List(Of Integer), whereby the keys are uniqe examples of Names in my collection and the values are the collective set of distinct IDs that are associated with those names.

View 2 Replies

VS 2010 Structure Classes So That The User Interfaces Though A Single Class While The Supporting Classes Are Hidden From Their View?

Jun 13, 2012

How can I structure my classes so that the user interfaces though a single class while the supporting classes are hidden from their view? I think its best understood in an example:

Public Class MyInterface
Public Economic as EconomicClass
Public Sub New()
MyBase.New()

[code].....

So you might ask why am I even separating them? It's strictly for others who will be working with this interface. I need to funnel them though a logical structure:

interface.Economic.MyMethod
interface.Currency.MyMethod
etc

This way everything is already handled for them in the background and they only need to run the method they need. I don't know if I can have it both ways in VB.NET.

View 23 Replies

VS 2010 Calling Subs And Functions Within Classes That Are Within Classes?

Oct 24, 2009

Here is some example code of what I mean:

vb
Public Class Form1
Private Sub Button1_Click(ByVal sender as Object, e as systemEventArgs) Handles Button1.Click

[Code]....

View 5 Replies

Calling Dll In Python?

Sep 1, 2009

I have a function in vb that is converted to a dll that I want to use in python. However trying to use it, I get an error message this is the VB function

Function DISPLAYNAME(Name)
MsgBox ("Hello " & Name & "!")
End Function

and this is how I call it in python

from ctypes import *
test = windll.TestDLL
print test
print test.DISPLAYNAME("one")

But I get errors so what is the right way of calling the dll

Traceback (most recent call last):
File "C:Test estdll.py", line 4, in <module>
print test.DISPLAYNAME("one")

[code].....

I have been looking around online but no solution so far. Can't use cdll since this is for c progs.

View 3 Replies

Translation PYTHON To .NET?

May 15, 2009

I am coding an application in VB.NET that sends sms.Would you please post PYTHON->VB.NET translation of this code and/or guidelines?

[Code]...

View 2 Replies

Use Python Module In .net?

Feb 16, 2011

I want to use the python module imaplib, email in vb.net to read the gmail email with attachments. How can i use the python module in vb.net?

View 2 Replies

Derived Classes Cannot Raise Base Classes

Jul 10, 2009

I m trying to raise Click event of Textbox explictly but I m getting "Derived classes cannot raise base classes" error.[code]....

View 1 Replies

.net - VB Flamed For Being Easy And Yet Python Is Not?

Sep 19, 2010

I have always wondered about this and seen this among lots of programmers. Why is a VB programmer or VB code easily dismissed as too noobish and easy while the same does not apply to Python or Python code? After all, isn't Python as easy as VB is? And it does provide drag-n-drop GUI application building also. So why is it that VB is flamed and yet Python is not?

View 1 Replies

Convert Codes To Python ?

Jun 16, 2011

I'm wondering if i can convert vb.net codes to python ?

I have this code"

[code]..............

i guess it's like:

[code].....................

so there any converter ? it would be so nice because i got source code for program in vb.net and as you know it's work on only Windows and i want to make it work in Linux so i need Vb to python converter ..

View 1 Replies

Multiline Strings Like Python

Apr 1, 2009

Is there a way to have multiline strings in VB.NET like python

[Code]...

View 12 Replies

Possible To Access APIs In Python

Mar 17, 2011

To programming in Python, I was wondering if there is a way to access VB .net APIs using Python.

View 1 Replies

Python Use In VB .Net As Compared To Excel?

May 1, 2012

I have an interesting issue I've run into where I can easily tap into python code from VB in an excel instance, as described here: Calling python script from excel/vba.However, when I mimic the exact same code structure in visual studio in a form, the pyscript.language = "python" line fails. Does anyone know if MSScriptControl.ScriptControl can be used in VB .Net to control python like you can in excel? This would be a lot easier than setting up a com object for my python scripts.

Example code (need to add microsoft script control 1.0 and excel object library):

[code]...

View 1 Replies

Converting Python Regex To VisualBasic?

Jun 7, 2011

I'm converting a python application to VB.net

a = 'abcdef'
b = re.compile('[' + a + ']{3,}$', re.I)

Is it possible to convert it to Visual Basic, if so, can you provide any code?

View 1 Replies

Create A Matrix Through An Iteration In Python?

Jul 18, 2011

I want to create a (3n*7) Matrix in python through Iteration, I did this in VB.Net and it worked but it gives me some challenge in Python as this a new language to me. n can be the number of Iterations to build up the matrix, i.e. ; if u iterated 3 times, the matrix will be a 9*7 matrix. Here is how I did it in VB.Net. :

[Code].....

View 3 Replies

How To Set Option Button Values Via Python

Feb 24, 2011

I'm writing a python plugin for a geo referencing program called QGIS where I want an Excel sheet to do all my calculations for me. For different data points I need to set certain input values into the spreadsheet (which was already written by someone else). I'm fine setting the int values (using win32com.client) with
sheet.Cells(row, col).Value = value

For radio buttons I would expect it to work like so:
sheet.opt_name.Value = True

But I get the error message:
AttributeError: '<win32com.gen_py.Microsoft Excel 12.0 Object Library._Worksheet instance at 0x232878608>' object has no attribute 'opt_name'
What are the options attributes of? How do I set their values?

View 1 Replies

Python - VB Developer Wants To Write Linux App?

Apr 17, 2012

I am trying to choose a language, IDE and other tools in order to develop a photo gallery application for a Linux platform. Specifically the Raspberry Pi My background is almost exclusively using Visual basic since the early 90's and most recently VB.NET in VS2008

View 1 Replies

Python Conversion Http Request

Jul 28, 2011

I have gotten this code in python - been going in circles trying to figure out the vb.net equivalent. Will pay somebody for the conversion also.

[Code]...

View 1 Replies

Python To VB: Unknown Data Types

Mar 3, 2010

I never thought I'd say this, but I am getting pissed at how easy it is to just plop down a variable in python without any declaration. I have an existing python script which interfaces with a server, and it builds its own messages to be communicated via sockets. What I am trying to do is take the command line python script and convert it into a VB GUI app that is more user friendly.

[Code]...

View 11 Replies

Run A Python Script Inside A Application

Apr 17, 2011

I am trying to run a python script inside a vb.net application, which means executing the code inside vb.net instead of runing it external. The problem is:

I am using MsScriptControl and set the language to "python", I tried to run it and get the error "A script engine for the specified language can not be created". My research has told me i need these keys in my registry. The problem is I cant find them so how to I make them. Or even better a full solution to my problem.

View 2 Replies

VS 2008 Include A Python / Php Library

May 25, 2010

Is is possible to include a python library, which does API authentication, in a VB.NET app? If so how would I do this? The site that provided this does not provide much documentation on this; I am attempting to create an application that accesses the google API, and this library has been created to do the authentication for you.

View 1 Replies

Why Not Develop VB Into A Dynamic Language Like Python

Nov 7, 2011

.net 4.0 can support dynamic now.So I think why not develop VB in to a dynamic language based on VB6 syntax.

View 4 Replies

Connect A VB Frontend With A Python Backend Using Sockets?

Oct 26, 2009

I have some really nice Python code to do what I need to do.I don't particularly like any of the Python GUI choices though. wxPython is nice, but for what I need, the speed on resizing,refreshing and dynamically adding controls just isn't there. I would like to create the GUI in VB.NET.I imagine I could use IronPython to link the two,but that creates a dependency on a rather large third-party product. I was perusing the MSDN documentation on Windows IPC and got the idea to use sockets. I copied the Python echo server code from the Python documentation and in under 5 minutes was able to create a client in VB.NET without even reading the System.Net.Sockets documentation, so this certainly doesn't seem too hard.

View 2 Replies

Consume A Python Web Service In Webservice Project?

Sep 24, 2010

I'm trying to consume a python web service in my webservice project.how to do that?

View 1 Replies

Converting Socket Connection From Python To VB 2010?

Mar 23, 2012

I have codes which is written with python. I am not good with python and i want to convert this python codes to VB 2010.This python function searching local network and finding my LG TV's local IP adress. I want to find my TV's local IP with VB 2010.

[Code]...

View 9 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved