Multiline Strings Like Python
Apr 1, 2009Is there a way to have multiline strings in VB.NET like python
[Code]...
Is there a way to have multiline strings in VB.NET like python
[Code]...
I am using a multililne textbox and I want to take the text typed and merge it with another string. So for example....
CoverPage = Replace(CoverPage,
Me.Note.Replace("{", "{").Replace("}", "}"), txtNote.Text)
Where Me.Note is a string that I am looking for and replacing it with the contents of txtNote.text. And then storing it all back in the string CoverPage.CoverPage is an rtf string that will holds place holders for the text I want to change.(That works) But when i update the note that may have a carriage return in it, the coverpage does not reconize the carriage returns comping from the Multiline textbox when its displayed.I have tried replaceing Enivronment.Newline with vbCr, vbCrl and whatever else I can think of. is there an issue with taking a string carriage control and tranfering it to a rtf carriage control?
Say I have a List(Of Tag) with Tag being an object. One member of Tag, Tag.Description, is a string, and I want to make a comma-separated concatenation of the Description members.Is there an easier way to do this than to read the Description members into a List(Of String) and then use the Join function?
View 2 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 ..
To programming in Python, I was wondering if there is a way to access VB .net APIs using Python.
View 1 RepliesI 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.
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.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 RepliesI 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 RepliesI'm trying to consume a python web service in my webservice project.how to do that?
View 1 RepliesI 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]...
[code]I suspect the reason the results are different is because vb.net returns a double when you call ^ and I should be "shifting" it but can't seem to work out the syntax (or find it)
View 1 RepliesI am working on a UDP Client/Server, and currently i have them sending back and forth strings, which i convert to bytes, and then open the bytes to read. I want to now send an Object instead of those strings, which includes multiple unsigned integers and strings.
View 39 RepliesI'm a C++ programming who was tapped to write a small application in Visual Basic. The application hosts an IronPython runtime and I am attempting to define some function in python and then call them from VB. I have written a simple test function in python
def test():
print "Test was Called"
Then I use the iron python to create a ScriptSource from the python file. I am able to look up the "test" variable through object operations but I can not figure out how to call the object that. For example (in VB):
pyScope = engine.CreateScope()
pySource = engine.CreateSourceFromFile("C:SomeFilepath est.py")
pySource.Execute(pyScope)
[Code]....
I am able to call the function and I see the expected output at stdout. I am still under the impression that there is some function-pointer-like type that I can cast objects of type PythonFunction to which will let me invoke temp directly without calling to the Python engine.
I created python executables with py2exe with both 64bit python interpreter and 32 bit python interpreter.In my program, I use the module pywin32 com, and so I dl'ed and installed both the 64bit and 32bit versions of the program prior to creating the executable.[code]I tried both versions by running the source directly, ie python program.py and C:python_32python.exe program.py and both work fine.I tested the 64bit exe on a 64bit windows 7 computer and the 32bit exe on a 32bit windows XP computer.
View 1 RepliesI am coding a web-crawler which will crawl the websites and selectively parse different sections of a web site.I am a .Net developer so the choice was obvious that I did it in .Net but the speed was very slow which included downloading and parsing of HTMLPages..Then I tried to just download the contents first using .Net and then same domains using python but the python was very impressive in downloading data. I have achieved downloading using python but the later part is not that easy to code in python, which obviously i don't want to do.The same batch of domain which took 100 seconds in Python was taking 20 minutes in .Net based crawler..I tried url... to download and in took 8 seconds in Python and same was taking 100 Seconds in .Net crawler..Does anyone anyone have any idea why this is slow in .Net but fast in python?
View 1 RepliesI'm a Python programmer and VB.NET newbie converting an application from Python to VB.NET (3.5).In Python, I have a function which returns a list of tuples which I run on two datasets with results like this:
data1 = [(1,"a",2),(5,"c",7)...]
data2 = [(1,"a",2),(5,"x",7)...]
Then I want to check if the two data sets are identical.In Python I check for equality like this:
"Equal" if data1 == data2 else "Not Equal"I want to know the easiest way to structure the data in VB.NET.
It looks like the right data structure for each data set in VB.NET is a List(of Something).
Should I create a Class to hold each data item, or is there a simpler way? If I do, will I need a custom way to decide if two instances hold the same data? What is the easiest way to compare the two data sets for equality?
I am trying to create an application using VB.NET which will import python object.
View 4 Replies