Other Programming Languages

NAVIGATION
CATEGORIES
LINKS
Home » Other Languages »» Other Programming Languages
  • Help in python language!

    8 answers - 630 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

    Hi...
    i have project in VB6 and i want to join with it python language..

    So in Command prompt (DOS) i write this command:

    C:\Documents and Settings>cd C:\python24

    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..

    please if any body Know the python language help me because i'm new in it...
    thanks a lot
    :confused:

  • No.1 | | 52 bytes | |

    Why don't you visit some sort of Python forum??
  • No.2 | | 178 bytes | |

    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 ;)
  • No.3 | | 22 bytes | |

    Moved from Classic VB.
  • No.4 | | 198 bytes | |

    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.
  • No.5 | | 706 bytes | |

    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..
    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 itC:\Python24>buckwalter2unicode.py infile.txt outfile.txtWhich 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?
  • No.6 | | 2289 bytes | |

    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:
    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 ..
  • No.7 | | 58 bytes | |

    I added vbcode tags to your code to make it eaier to read.
  • No.8 | | 189 bytes | |

    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.

Re: Help in python language!


max 4000 letters.
Your nickname that display:
In order to stop the spam: 3 + 2 =
SPONSORED
QUESTION

SPONSORED
VISUAL BASIC TECHNOLOGIES