Jump to content

Export text to txt using python


Recommended Posts

Hello people, 

 

I just edit because I found this way.

 

import vs
import os

Vendor = 'ACME'
Price = 123.45
Tax = 1.07

fileName = 'Classes.txt'


def Example():
	vs.GetFile(fileName)
	if not vs.DidCancel():
		vs.Rewrite(Vendor, 0)
		#vs.WriteBin(Vendor)
		#vs.WriteMac(Vendor)
		#vs.WriteLnMAC(Vendor)
		#vs.Write(Vendor)
		vs.Close(fileName)

Example()

 

 

 

But, the next attributes get this message:   "AttributeError: module 'vs' has no attribute 'WriteBin'. "

 

-vs.Write

-vs.WriteLnMac

-vs.WriteBin

-vs.WriteMac

 

With write I don't get error, but also no result.

-vs.Rewrite

 

 

Edited by avictorgm
I found this other way
Link to comment
  • 3 years later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...