Skip to content

Commit

Permalink
fixed system calls
Browse files Browse the repository at this point in the history
  • Loading branch information
fzumstein committed Jul 10, 2015
1 parent ed05d25 commit 2b24043
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xlwings/xlwings.bas
Expand Up @@ -119,10 +119,11 @@ Sub ExcecuteMac(Command As String, PYTHON_MAC As String, LOG_FILE As String, SHO
'Check if .bash_profile is existing and source it
Res = system("source ~/.bash_profile")
If Res = 0 Then
Res = system("source ~/.bash_profile;" & RunCommand & """" & WORKBOOK_FULLNAME & """ ""from_xl""" & " " & Chr(34) & ToPosixPath(Application.Path) & "/" Application.Name & Chr(34) & ">" & Chr(34) & LOG_FILE & Chr(34) & " 2>&1 &")
Res = system("source ~/.bash_profile;" & RunCommand & """" & WORKBOOK_FULLNAME & """ ""from_xl""" & " " & Chr(34) & ToPosixPath(Application.Path) & "/" & Application.Name & Chr(34) & ">" & Chr(34) & LOG_FILE & Chr(34) & " 2>&1 &")
Else
Res = system(RunCommand & """" & WORKBOOK_FULLNAME & """ ""from_xl""" & " " & Chr(34) & ToPosixPath(Application.Path) & "/" Application.Name & Chr(34) & ">" & Chr(34) & LOG_FILE & Chr(34) & " 2>&1 &")
Res = system(RunCommand & """" & WORKBOOK_FULLNAME & """ ""from_xl""" & " " & Chr(34) & ToPosixPath(Application.Path) & "/" & Application.Name & Chr(34) & ">" & Chr(34) & LOG_FILE & Chr(34) & " 2>&1 &")
End If

' If there's a log at this point (normally that will be from the Shell only, not Python) show it and reset the StatusBar
On Error Resume Next
Log = ReadFile(LOG_FILE)
Expand Down

0 comments on commit 2b24043

Please sign in to comment.