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


ADVERTISEMENT

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

Converting Regex From .NET To C#?

Dec 24, 2011

I hired a coder to code me something in Regex. The issue was that he coded it in Visual Basic and I need it in C#. I tried using a converter but it didnt fix the issue.

string iamtwit = ss("http://www.mailinator.com" + GetBetween(GetBetween(iamtwit1, matches.ToString(), "</a>"), "<a href=", ">"));MessageBox.Show(GetBetween(matches1.ToString(), "<a href="", Strings.Chr(34)));

Here is the original code:

Dim iamtwit As String = ss("http://www.mailinator.com" & GetBetween(GetBetween(iamtwit1, matches.ToString, "</a>"), "<a href=", ">"))

MsgBox(GetBetween(matches1.ToString, "<a href=""", Chr(34)))

The error messages I am getting are:

The name 'GetBetween' does not exist in the current context

The name 'Strings' does not exist in the current context

View 3 Replies

RegEx: Converting Email Address To Mailto Link In A String Using VB

Oct 21, 2010

i have tried various ways to accomplish this, but to no avail. I don't know how to generate the replacement text (mailto link) so I just used a bunch of x's until I can figure it out. Here is what I have (which currently not replacing emails in string): Here is my Code behind:

[Code]...

View 4 Replies

Concatenating A Variable With A Regex Group Match In Regex.replace?

Apr 5, 2012

I am having an issue where I am using regex.Replace to replace part of a string. The basic idea is that I want to capture the beginning of the string then replace the end of the string with a value from code. For an example pretend I have a string that says "Test Number " followed by number and I want to increment that number. I capture the "Test Number " but when I try to concatenate that capture with the new number it treats the capture ($1) as a literal and replaces the entire string with $1[new number].

[code]...

This will output "We are on Test Number 2", as expected. how I can use a variable in the replacement string portion of the Regex.Replace when including a captured group?

View 1 Replies

Regex: Take Text & Some Special Characters Between The Xml Tags Using Regex On C#.net?

Feb 23, 2012

I want to take the text and some special characters between the xml tags.. My input file contains:

[Code]...

now i want the Regex to take text and the special characters between the tags <line>,<inline>..

View 2 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

.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

Increment Regex Match Using Regex.Replace

Jun 21, 2012

I'm creating a program in VB.NET to output multiple images. Some images will have the same file name. If there is multiple files with the same name I want to add "_1_" to the end of the file name. If the "_1_" file already exists I want to increment the 1 to be "_2_". If this file already exists I want to continue incrementing the number ultil it doesn't exist. So for example "filename", filename_1_", "filename_2_", etc. Here is the code that I have tried

[Code]...

View 1 Replies

Regex Builder That Actually BUILDS RegEx From A Highlight

Nov 17, 2011

I've been working straight since yesterday trying to get this to work. I'm a noob to RegEx and I've tested out about 5 different RegEx "builders" but each of them require you to navigate through the options to build the Regex...each of them has failed when I try to use them.Is there an application out there free/paid where you select the line you want to grab and the RegEx is auto generated from that highlight rather than having to try to build the line of code? [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 - 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

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

Trying To Get UInt64 Into A Base32 String / Works In Python

Mar 1, 2012

[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 Replies

.net - Upgrade Software From VisualBasic 5 To 8?

Jan 23, 2012

I've given a VisualBasic Software, written in VB5. Now the whole thing should run under Windows 7, so it needs to be converted to VB8 or VB9. It seems that most of the API of VB changed a lot in these years, so for me it seems quite impossible to run just a few code upgrades and everything is fine...

The biggest Problem are Forms. There are a lot of Forms in this Software, which are declared inside .frm files and begin always like this:

[Code]...

It seems for me that this Stuff was generated with an UI-Layouter, so none self written code is in there.Is it possible to run this code in VB8/9 or even rewrite it that VB8/9 understands it? I'm currently very pesimistic and think that the whole software needs to rewritten...

View 1 Replies

Add A Graph To VisualBasic Application?

Jan 9, 2010

I want to create an app for Windows that displays a graph. I want to plot points on that graph.

I can't find a Toolbox control for this.software developer

View 8 Replies







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