Re: Help in python language!
Why don't you visit some sort of Python forum??
Re: Help in python language!
Quote:
Originally Posted by gavio
Why don't you visit some sort of Python forum??
Why are you so mean to him?? lol. Just kidding. Yeah, or visit the other programing language section in the foums ;)
Re: Help in python language!
Re: Help in python language!
I know some Python. Did you write the script in question? If so, under which circumstances would you output that message? (Post code!) If not, read its documentation and possibly contact the author.
Re: Help in python language!
Quote:
Originally Posted by bodoora
C:\Python24>buckwalter2unicode.py <infile.txt> outfile.txt
C:\Python24>
i think the run is done but i have message in outfile (notepade file) is:
(Must specify a file to use store the output! Aborting...)
and the output i want it can not be print in outfile..
Code:
C:\Python24>buckwalter2unicode.py outfile.txt <infile.txt
The program obviously wants the output file as a parameter.
If you get the same complaint about the input file, make it
Code:
C:\Python24>buckwalter2unicode.py infile.txt outfile.txt
Which way it should be depends on how the .py file is written - is it looking for keyboard input or a filename on the parameter list for input?
Re: Help in python language!
Hi... thanks for help
I used this code to get the data from (outfile.txt) file and also i want to run this data (file) in command prompt (DOS) by python code.
Code:
VB Code:
Private Sub GetData()
Dim tW As String
Dim tmp() As String
Dim Words() As String
Dim gloss() As String
Open "C:\buckwalter_morphan_1\data\outfile.txt" For Input As #1
tmp = Split(Input(LOF(1), 1), vbCrLf)
Close #1
Dim sLine As String
For x = 0 To UBound(tmp)
If UCase(Left(tmp(x), 10)) = " SOLUTION" Then
Words = Split(tmp(x), "(")
If UCase(Left(tmp(x + 1), 12)) = " (GLOSS)" Then
sLine = sLine & Left(Words(1), InStr(Words(1), ")") - 1)
gloss = Split(tmp(x + 1), "+")
sLine = sLine & " (" & Trim(gloss(1)) & ");"
Else
sLine = sLine & Left(Words(1), InStr(Words(1), ")") - 1) & ";"
End If
ElseIf UCase(Left(tmp(x), 12)) = " Comment" Then
Words = Split(tmp(x), ":")
sLine = sLine & Words(1)
ElseIf UCase(Left(tmp(x), 5)) = "INPUT" Then
If sLine <> "" Then
If Right(sLine, 1) = ";" Then
sLine = Left(sLine, Len(sLine) - 1)
End If
sLine = sLine & vbCrLf
End If
Words = Split(tmp(x), ":")
sLine = sLine & Trim(Words(1)) & ":"
ElseIf UCase(Left(tmp(x), 7)) = "LOOK-UP" Then
'nothing
End If
Next
Debug.Print sLine
WORDLIST = Split(sLine, vbCrLf)
End Sub
now i have this code but i don Know if it corect or not to open the DOS and run the outfile.txt by python code.. and if is ok where can i put it?
''open command prompt to run Python script
'Open Apath & "dos.bat" For Output As #1
'Print #1, "cd C:\python24"
'Print #1, "buckwalter2unicode.py -o outfile.txt"
'Close #1
'' ShellAndWait Apath & "dos.bat"
Shell Apath & "dos.bat"
please help...
Thanks a lot ..
Re: Help in python language!
I added vbcode tags to your code to make it eaier to read.
Re: Help in python language!
That's not at all helpful. The code you use to read the output is irrelevant if the Python script does not produce output.
This seems to have become a VB question in any case.