Possible To Access APIs In Python
Mar 17, 2011To programming in Python, I was wondering if there is a way to access VB .net APIs using Python.
View 1 RepliesTo programming in Python, I was wondering if there is a way to access VB .net APIs using Python.
View 1 Repliesi am terrible when it comes to the programming area of APIs. Though APIs are well used in Visual Basic.NET so i must learn it.How do APIs work?How are they used?Can anyone either explain or supply me with a link about writing an API?
View 3 RepliesIs it possible to get information on the APIs in Vb.Net?
View 2 RepliesShow the page where i can get all the APIs used in vb.net? Also i need a program to put my Vb.net program in the startup.
View 8 RepliesAPIs for Printer Page number
View 2 RepliesI am currently working on an application to automate file download(s). My main application is running a query for downloads with embedded browser. When the results are returned they need to be downloaded and saved. This works fine. The last step of the process it to start download and the 'File Download' dialog pops up. I wanted to create another application that would monitor for the 'File Dialog' windows (knowing the main application Process ID I can ensure that I find only the dialogs generated by my application).
View 7 RepliesLong story short, code that used to work on my 32 bit computer doesn't work on my 64 bit computer. Does 64 bit require something like changing Integers -> IntPtrs?
View 11 RepliesI need an API for sendmessage and sendmessagetimeout for my VB .net application. I have searched quite a bit, and everything I find doesn't seem to work: either the message just doesnt seem to be sent, or the message appears to be sent with the msg parameter always 0, and the wparam setting as what I enter for the msg setting. Pinvoke's also always seems to throw an AccessViolationException for I have no idea what reason. I tried playing around with maybe just where I put the variable, but unsurprisingly, there is not a simple logical switch of the variables.I have tried pinvoke's:
<DllImport("user32.dll", SetLastError:=True)> _
Public Shared Function SendMessageTimeout(ByVal windowHandle As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr, ByVal flags As
[code].....
What is the difference between the winreg and advapi32.dll APIs. I am trying to convert a VB code into Python. I have seen that the VB code has RegOpenKeyEx() from advapi32.dll. Now in Python, there is a topic on WinReg access and there this api RegOpenKeyEx() is mentioned. can I use this instead.
View 1 RepliesI have consumed a word doc in my app with the SetParent and SetWindowLong APIs. When I close the app I want to leave the word doc open. I have used the SetParent and used IntPtr.Zero(2nd parameter) which kinda works - it just does not have a document border. Would I use the SetWindowLong function - if so what would the parameters be? I have looked at the SetWindowLong function, just not sure about the second and last parameters. What would be the proper way to do this?
CODE:
Finding the documentation on windows API's for use with visual basic? I used to use API guide until they stopped updating it in 2002. All I need is the api name as well as the list of parameters in order to use the API's functions.
View 2 RepliesAm writing a GPS application but I need APIs or Libraries I can easily use. It's supposed to work real time...
View 5 RepliesI am refactoring a large and complicated code base in .NET that makes heavy use of P/Invoke to Win32 APIs. The structure of the project is not the greatest and I am finding DllImport statements all over the place, very often duplicated for the same function, and also declared in a variety of ways:The import directives and methods are sometimes declared as public, sometimes private, sometimes as static and sometimes as instance methods. My worry is that refactoring may have unintended consequences but this might be unavoidable.
My instict is to organize a static/shared Win32 P/Invoke API class that lists all of these methods and associated constants in one file... EDIT There are over 70 imports to the user32 DLL.(The code base is made up of over 20 projects with a lot of windows message passing and cross-thread calls. It's also a VB.NET project upgraded from VB6 if that makes a difference.)
I'm having some problems with some API calls. I'm trying to return device driver information for a given device in device manager so I can access the available information and display it. I'm using a series of API calls which in turn populates a list with device driver objects associated with that device. The API calls fail. The problem is that I can't find any reference material online for these APIs so I can figure out what's wrong. [code]
View 1 Repliescan we unzip a zipped folder using microsoft APIs or namespaces perhaps System.IO.Compression. However, it seems to be cumbersome to use them. With a thrid party dll file it works perfectly fine, however i dont want to use it as we dont know what is actually happening inside. Can we have a piece of code which unzips a zipped folder.
View 3 RepliesI 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.
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]...
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 RepliesI 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 RepliesI'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 ..
Is there a way to have multiline strings in VB.NET like python
[Code]...
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]...
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?
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].....
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?
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 RepliesI 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 RepliesI 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]...
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]...
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.