Re: [Gambas-user] Shell command

2017-08-08 Thread Jussi Lahtinen
Isn't that exactly what I suggested..? However there shouldn't be crash anyway, only error raised. Jussi On Tue, Aug 8, 2017 at 4:43 AM, Shane wrote: > of cause missed that looking in wrong place > > Thanks Tony > > > > On 08/08/17 00:17, Tony Morehen wrote: > >> Shane, >> >> I can reproduce y

Re: [Gambas-user] Shell command formating

2017-08-07 Thread Shane
thanks tony this works just needs the & in front of the 1 On 08/08/17 00:30, Tony Morehen wrote: Try changing command to: command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path & " 2>1" On 2017-08-06 09:52 PM, Shane wrote: command = "stm8flash -c stlinkv2 -p " & stmdevice & " -

Re: [Gambas-user] Shell command formating

2017-08-07 Thread Shane
That worked great T Lee thanks On 08/08/17 00:00, T Lee Davidson wrote: On 08/06/2017 09:52 PM, Shane wrote: So again on the shell command I have this code Dim result As String Dim command As String path = File.SetExt(file_name, "ihx") command = "stm8flash -c stlinkv2 -p " & stmdevice &

Re: [Gambas-user] Shell command

2017-08-07 Thread Shane
of cause missed that looking in wrong place Thanks Tony On 08/08/17 00:17, Tony Morehen wrote: Shane, I can reproduce your crash here on 3.9.2. It's cause is the line: Settings["Options/stmDevice"] = ComboBox1.Current If that line is changed to: Settings["Options/stmDevice"] = ComboBox1.C

Re: [Gambas-user] Shell command formating

2017-08-07 Thread Tony Morehen
Try changing command to: command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path & " 2>1" On 2017-08-06 09:52 PM, Shane wrote: command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path -- Check ou

Re: [Gambas-user] Shell command

2017-08-07 Thread Tony Morehen
Shane, I can reproduce your crash here on 3.9.2. It's cause is the line: Settings["Options/stmDevice"] = ComboBox1.Current If that line is changed to: Settings["Options/stmDevice"] = ComboBox1.Current.Text or the simpler, and in my mind preferred: Settings["Options/stmDevice"] = ComboBox1.T

Re: [Gambas-user] Shell command formating

2017-08-07 Thread T Lee Davidson
On 08/06/2017 09:52 PM, Shane wrote: So again on the shell command I have this code Dim result As String Dim command As String path = File.SetExt(file_name, "ihx") command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path Shell command To result FMain.TextArea1.Text = result but t

[Gambas-user] Shell command formating

2017-08-06 Thread Shane
So again on the shell command I have this code Dim result As String Dim command As String path = File.SetExt(file_name, "ihx") command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path Shell command To result FMain.TextArea1.Text = result but the output is going to stdout and not th

Re: [Gambas-user] Shell command

2017-08-06 Thread Shane
here is all the code Public sdevices As String Public Sub SaveOps_Click() Settings["Options/CCompCLine"] = TextBox1.Text Settings["Options/stmDevice"] = ComboBox1.Current 'Settings.Save() Me.Close End Public Sub Form_Open() Dim devices As String[] Dim d As String ' 'TextBox1.Text

Re: [Gambas-user] Shell command

2017-08-06 Thread Shane
Same thing here is a file with the output On 07/08/17 11:10, Tony Morehen wrote: what is the output of the shell line? If you could post the complete output, we could properly test your code. You could try this line: devices = Split(sdevices, " ", "", True) On 2017-08-06 08:35 PM, Shane w

Re: [Gambas-user] Shell command

2017-08-06 Thread Jussi Lahtinen
Is that all the code in the form? Can you give your system information? Jussi On Mon, Aug 7, 2017 at 3:35 AM, Shane wrote: > Hi Jussi > > I gave that a try by commenting that line out still the same result so > that not the problem > > > > > On 06/08/17 22:17, Jussi Lahtinen wrote: > >> I gues

Re: [Gambas-user] Shell command

2017-08-06 Thread Tony Morehen
what is the output of the shell line? If you could post the complete output, we could properly test your code. You could try this line: devices = Split(sdevices, " ", "", True) On 2017-08-06 08:35 PM, Shane wrote: Hi Jussi I gave that a try by commenting that line out still the same result

Re: [Gambas-user] Shell command

2017-08-06 Thread Shane
Hi Jussi I gave that a try by commenting that line out still the same result so that not the problem On 06/08/17 22:17, Jussi Lahtinen wrote: I guess settings component can't handle saving of arbitrary object. In this case "Settings["Options/stmDevice"] = ComboBox1.Current". Maybe you want

Re: [Gambas-user] Shell command

2017-08-06 Thread Jussi Lahtinen
I guess settings component can't handle saving of arbitrary object. In this case "Settings["Options/stmDevice"] = ComboBox1.Current". Maybe you want to save ComboBox1.Current.Text? However there shouldn't be segfault. Jussi On Sun, Aug 6, 2017 at 7:18 AM, Shane wrote: > I have this in a sub fo

[Gambas-user] Shell command

2017-08-05 Thread Shane
I have this in a sub form Public sdevices As String Public Sub SaveOps_Click() Settings["Options/CCompCLine"] = TextBox1.Text Settings["Options/stmDevice"] = ComboBox1.Current 'Settings.Save() Me.Close End Public Sub Form_Open() Dim devices As String[] Dim d As String ' TextBox1.

Re: [Gambas-user] shell

2017-04-26 Thread Mike Crean
Thanks Fabien I have solved the problem. Regards Mike On Tuesday, 25 April 2017, 22:58, Fabien Bodard wrote: ??? 2017-04-25 10:52 GMT+02:00 Charlie : > Can you post the 'Shell' code you are using. > > > > - > Check out www.gambas.one > -- > View this message in context: > http://g

Re: [Gambas-user] shell

2017-04-25 Thread Fabien Bodard
??? 2017-04-25 10:52 GMT+02:00 Charlie : > Can you post the 'Shell' code you are using. > > > > - > Check out www.gambas.one > -- > View this message in context: > http://gambas.8142.n7.nabble.com/shell-tp58793p58795.html > Sent from the gambas-user mailing list archive at Nabble.com. > -

Re: [Gambas-user] shell

2017-04-25 Thread Charlie
Can you post the 'Shell' code you are using. - Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/shell-tp58793p58795.html Sent from the gambas-user mailing list archive at Nabble.com. -

[Gambas-user] shell

2017-04-24 Thread Mike Crean
If I run make from the terminal in a named directory make works as expected. Using Gambas 3.9.2 and run the command, shell "make" while in the named directory I get an error make: *** No targets specified and no makefile found. Stop The same error when I try to shell to a file containing #!/bin/s

[Gambas-user] shell

2013-12-03 Thread Mike Crean
Hey Ivan, thanks very much for that. I forgot all about the piping command.   Regards Mike -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how applicat

Re: [Gambas-user] shell

2013-12-03 Thread Jussi Lahtinen
> Try > Shell "echo 'mypassword' |sudo -S sh -c 'echo out > /sys/class/gpio/gpio27/direction" > Bad idea. Firstly, it supports only one password, which is stored as plain text. Secondly, if the password is variable it would need proper sanitation before entering it to shell. Jussi --

Re: [Gambas-user] shell

2013-12-02 Thread Ivan Kern
Hi Try Shell "echo 'mypassword' |sudo -S sh -c 'echo out /sys/class/gpio/gpio27/direction" Regards -Ursprüngliche Nachricht- Von: Mike Crean [mailto:mike.cr...@y7mail.com] Gesendet: Montag, 2. Dezember 2013 12:18 An: Mike Betreff: [Gambas-user] shell Hey boy

Re: [Gambas-user] shell

2013-12-02 Thread Rolf-Werner Eilert
You could allow a certain user to execute a command via the sudo system. I've got this here, one of the teachers is able to switch the internet on and off for students by applying a script. Normally, only the admin is allowed to change the filter chain... A Gambas front-end picks out the person

Re: [Gambas-user] shell

2013-12-02 Thread MinnesotaJon
Maybe I'm not understanding the problem, but "sudo" always wants a password, right? In which case you have to feed it a password with the Exec or Shell command. I'm not a shell script expert (just learning), but I assume that the string would look like this: Exec [system.shell, "sudo sh -c 'echo

Re: [Gambas-user] shell

2013-12-02 Thread Tobias Boege
On Mon, 02 Dec 2013, Mike Crean wrote: > > Hey boys, I am trying to emulate the terminal string sudo sh -c > 'echo out /sys/class/gpio/gpio27/direction' (works OK in terminal, on > BBB wheezy arm lxde) I run this from gambas3.5.90 Exec [system.shell, > "sudo sh -c 'echo out /sys/class/gpio/gpio27

Re: [Gambas-user] shell

2013-12-02 Thread Kende Krisztián
2013-12-02 12:17 keltezéssel, Mike Crean írta: > > Hey boys, I am trying to emulate the terminal string sudo sh -c > 'echo out /sys/class/gpio/gpio27/direction' (works OK in terminal, on > BBB wheezy arm lxde) I run this from gambas3.5.90 Exec [system.shell, > "sudo sh -c 'echo out /sys/class/gp

[Gambas-user] shell

2013-12-02 Thread Mike Crean
Hey boys, I am trying to emulate the terminal string sudo sh -c 'echo out /sys/class/gpio/gpio27/direction' (works OK in terminal, on BBB wheezy arm lxde) I run this from gambas3.5.90 Exec [system.shell, "sudo sh -c 'echo out /sys/class/gpio/gpio27/direction'"] and get an error /bin/sh: 0: Can't

Re: [Gambas-user] Shell - commands with arguments doesn't work

2013-05-31 Thread Jesus
El 31/05/13 08:15, Kende Krisztián escribió: > Thu, 30 May 2013 23:50:30 +0200 -n > Jesus írta: > >> El 30/05/13 21:35, Kende Krisztián escribió: >>> An interesting example, why do not you use native methods? >>> >>> Dim item As String >>> >>> For Each item In Dir(User.Home).Sort() >>> >>> Wit

Re: [Gambas-user] Shell - commands with arguments doesn't work

2013-05-31 Thread Benoît Minisini
Le 31/05/2013 08:15, Kende Krisztián a écrit : > > It's works: > > Shell "ifconfig --help 2>&1" To somevar > > but stderr cannot be seen. > Yes. I have updated the documentation with that information. -- Benoît Minisini ---

Re: [Gambas-user] Shell - commands with arguments doesn't work

2013-05-30 Thread Kende Krisztián
Thu, 30 May 2013 23:50:30 +0200 -n Jesus írta: > El 30/05/13 21:35, Kende Krisztián escribió: > > An interesting example, why do not you use native methods? > > > > Dim item As String > > > > For Each item In Dir(User.Home).Sort() > > > >With Stat(User.Home & "/" & item) > > > > Print .A

Re: [Gambas-user] Shell - commands with arguments doesn't work

2013-05-30 Thread Jussi Lahtinen
Hmmm... no "--help" seems to be documented option... Then I don't understand why it's output goes to standard error. But it does anyway. Jussi On Fri, May 31, 2013 at 1:29 AM, Jussi Lahtinen wrote: > It's because ifconfig is bit weird... there is no --help option and so > output is directed to

Re: [Gambas-user] Shell - commands with arguments doesn't work

2013-05-30 Thread Jussi Lahtinen
It's because ifconfig is bit weird... there is no --help option and so output is directed to standard error output (invalid option). This creates empty file: $ ( ifconfig --help ) 1> test.txt This creates file with the actual content: $ ( ifconfig --help ) 2> test.txt So, to use it with gambas

Re: [Gambas-user] Shell - commands with arguments doesn't work

2013-05-30 Thread Jesus
El 30/05/13 21:35, Kende Krisztián escribió: > An interesting example, why do not you use native methods? > > Dim item As String > > For Each item In Dir(User.Home).Sort() > >With Stat(User.Home & "/" & item) > > Print .Auth & " " & .User & " " & .Group & " " & .Size & " " & > .LastModifi

Re: [Gambas-user] Shell - commands with arguments doesn't work

2013-05-30 Thread Kende Krisztián
An interesting example, why do not you use native methods? Dim item As String For Each item In Dir(User.Home).Sort() With Stat(User.Home & "/" & item) Print .Auth & " " & .User & " " & .Group & " " & .Size & " " & .LastModified & " " & item End With Next > Hi all > > AFAIR this us

Re: [Gambas-user] Shell - commands with arguments doesn't work

2013-05-30 Thread Jesus
El 30/05/13 20:48, Jesus escribió: > Hi all > > AFAIR this used to work until now: > > Shell "ls -la" To variable > Exec ["ls", "-la"] To anothervariable > > But now, whatever command I use, if it has one or more arguments > beginning with a dash or double dash, I don't get any output. > > Quoting

[Gambas-user] Shell - commands with arguments doesn't work

2013-05-30 Thread Jesus
Hi all AFAIR this used to work until now: Shell "ls -la" To variable Exec ["ls", "-la"] To anothervariable But now, whatever command I use, if it has one or more arguments beginning with a dash or double dash, I don't get any output. Quoting it with Shell$() function does not help. Also, I've

Re: [Gambas-user] Shell command not working

2013-03-07 Thread Jesus
El 07/03/13 13:40, Jose Monteiro escribió: > text = "cd ~/.relat_bact && rm -rf Modelo*.odt && zip -r " & "MA" & > Mid$(ListBox1.Text, 1, 9) & ".odt ." >Shell text Wait > > 1 - navigating to ~/.relat_bact directory and deleting the odt file is > working fine. > > 2 - generating the "zipped"

[Gambas-user] Shell command not working

2013-03-07 Thread Jose Monteiro
text = "cd ~/.relat_bact && rm -rf Modelo*.odt && zip -r " & "MA" & Mid$(ListBox1.Text, 1, 9) & ".odt  ."   Shell text Wait 1 - navigating to ~/.relat_bact directory and deleting the odt file is working fine. 2 - generating the "zipped" odt file (MA.odt) using the files and directories ins

Re: [Gambas-user] Shell sudo

2013-01-31 Thread MinnesotaJon
Thanks, Les -- I had this same problem, and you solved it for me. For other readers, here is the command adapted for Gambas3: Shell "sudo -S chmod 0777 ~/myfilename << EOF\nmypassword\nEOF" Note: "chmod 0777" is just an example of a chmod code The newline code "\n" should NOT have spaces be

Re: [Gambas-user] Shell command including string containing a quote

2013-01-29 Thread Tobias Boege
On Tue, 29 Jan 2013, John Rose wrote: > Tobias, > > Thanks for that useful reply. > > I have a quick question (it doesn't seem worth asking on the Mailing List): > Using Dialog.OpenFile(), the resulting Dialog.Path shows the full path > to the file (e.g. /home/john/x.txt). Given that the runtime

Re: [Gambas-user] Shell command including string containing a quote

2013-01-29 Thread John Rose
Tobias, Thanks for that useful reply. I have a quick question (it doesn't seem worth asking on the Mailing List): Using Dialog.OpenFile(), the resulting Dialog.Path shows the full path to the file (e.g. /home/john/x.txt). Given that the runtime user might change to a different directory (from t

Re: [Gambas-user] Shell command including string containing a quote

2013-01-24 Thread Rob Kudla
On 01/24/2013 12:59 PM, John Rose wrote: > I have written a GUI to execute a command which involves selecting > filenames (e.g. sCombinedPath below) to be used in a Shell command (as part > of a Process). It works OK generally. However, if any filename includes a > quote, it goes wrong. > sCommand

Re: [Gambas-user] Shell command including string containing a quote

2013-01-24 Thread John Rose
Thanks Tobias. It worked. Regards, John On 24/01/13 21:08, Tobias Boege wrote: > On Thu, 24 Jan 2013, John Rose wrote: >> I have written a GUI to execute a command which involves selecting >> filenames (e.g. sCombinedPath below) to be used in a Shell command >> (as part of a Process). It works OK

Re: [Gambas-user] Shell command including string containing a quote

2013-01-24 Thread Tobias Boege
On Thu, 24 Jan 2013, John Rose wrote: > I have written a GUI to execute a command which involves selecting > filenames (e.g. sCombinedPath below) to be used in a Shell command > (as part of a Process). It works OK generally. However, if any > filename includes a quote, it goes wrong. > > sCommand

Re: [Gambas-user] Shell command including string containing a quote

2013-01-24 Thread M. Cs.
I guess you will need Chr$(39) as ASCII code for ', or if you need double quote just use Chr$(34). 2013/1/24 John Rose > I have written a GUI to execute a command which involves selecting > filenames (e.g. sCombinedPath below) to be used in a Shell command (as part > of a Process). It works OK

[Gambas-user] Shell command including string containing a quote

2013-01-24 Thread John Rose
I have written a GUI to execute a command which involves selecting filenames (e.g. sCombinedPath below) to be used in a Shell command (as part of a Process). It works OK generally. However, if any filename includes a quote, it goes wrong. sCommand = "mplex -f 8 -o " & "'" & sCombinedPath & "'

Re: [Gambas-user] Shell not working properly in G 3.2

2012-07-13 Thread M. Cs.
You may be right. In fact the mentioned process is executed after another extracting process, which may be not finished before this starts. Inserting a delay fixes the issue, yet it isn't as good. Csaba -- Live Security Vir

Re: [Gambas-user] Shell not working properly in G 3.2

2012-07-13 Thread jm
On Fri, 2012-07-13 at 15:52 +0200, M. Cs. wrote: > I have a BIG problem with the Shell command: doubt it! Simple debug problem. DIM a AS String a = "unzip -u " & Chr$(34) & User.Home & "/.GamCat/GamCat.zip" & Chr $(34) & " -d " & Chr$(34) & User.Home & "/.GamCat/" & Chr$(34) Freeze the IDE an

Re: [Gambas-user] Shell not working properly in G 3.2

2012-07-13 Thread Fabien Bodard
So why are you using chr$(34) ? And you can try with exec ... There is no need of shell for that Le 13 juil. 2012 15:53, "M. Cs." a écrit : > I have a BIG problem with the Shell command: > > Shell "unzip -u " & Chr$(34) & User.Home & "/.GamCat/GamCat.zip" & Chr$(34) > & " -d " & Chr$(34) & User.

[Gambas-user] Shell not working properly in G 3.2

2012-07-13 Thread M. Cs.
I have a BIG problem with the Shell command: Shell "unzip -u " & Chr$(34) & User.Home & "/.GamCat/GamCat.zip" & Chr$(34) & " -d " & Chr$(34) & User.Home & "/.GamCat/" & Chr$(34) Wait Tells me the the following: "unzip: cannot find zipfile directory in one of /home/minthaka/.GamCat/GamCat.zip or

Re: [Gambas-user] Shell with wait does not wait till work complettion

2012-05-21 Thread tobi
On Mon, 21 May 2012, sundar j wrote: > In my application I need to copy folder content to other folder using shell > cp command (since gambas does not support COPY recurse) with wait option. > When copying is in progress TextLabel will indicate "Copy in Progress" > .  Once copying is complete th

[Gambas-user] Shell with wait does not wait till work complettion

2012-05-21 Thread sundar j
In my application I need to copy folder content to other folder using shell cp command (since gambas does not support COPY recurse) with wait option. When copying is in progress TextLabel will indicate "Copy in Progress" .  Once copying is complete then TextLable will indicate something else. Fo

Re: [Gambas-user] Shell script output to label text

2011-04-09 Thread Benoît Minisini
> Hi , > > I want shell script output, printed to the label text, Please help me.. > > my code,, > > *** > > PUBLIC SUB Form_Open() > DIM sStr AS String > SHELL "sh /home/dhana/foo.sh" TO sStr > IF InStr(sStr, " ") THEN > L

[Gambas-user] Shell script output to label text

2011-04-08 Thread Ganesh Kumar
Hi , I want shell script output, printed to the label text, Please help me.. my code,, *** PUBLIC SUB Form_Open() DIM sStr AS String SHELL "sh /home/dhana/foo.sh" TO sStr IF InStr(sStr, " ") THEN Label1.text =" " & sStr E

Re: [Gambas-user] shell script output controls gambas

2011-04-05 Thread Jussi Lahtinen
Shell "YourScript.sh" To sStr If InStr(sStr, "UP") Then 'Internet connection is up, do something... Else 'Do something else. Endif Jussi On Tue, Apr 5, 2011 at 13:12, Ganesh Kumar wrote: > Hi Gurus, > > I am new to Gambas. I have executed shell script,, the shell script > output control

Re: [Gambas-user] shell script output controls gambas

2011-04-05 Thread Ron
On 5-4-2011 12:12, Ganesh Kumar wrote: > Hi Gurus, > > I am new to Gambas. I have executed shell script,, the shell script > output control the decision. > > My script > / > #! /biin/bash > host google.com>/dev/null

[Gambas-user] shell script output controls gambas

2011-04-05 Thread Ganesh Kumar
Hi Gurus, I am new to Gambas. I have executed shell script,, the shell script output control the decision. My script / #! /biin/bash host google.com>/dev/null if [ $? -eq 0 ]; then echo "Internet connection is

Re: [Gambas-user] SHELL is more faster than SUB Process_Read()

2010-08-15 Thread Demosthenes Koptsis
ok , i got it. Thanks both of u! 2010/8/15 Benoît Minisini > > Hi i wrote a test program that "ls -1" a directory with 1700 and more > files > > (mp3). > > > > i wanted to make a string as following > > > > Content = "/mnt/store/MUSIC/free/new age/webradio recs/Trancemission.FM > > Radio 128K

Re: [Gambas-user] SHELL is more faster than SUB Process_Read()

2010-08-15 Thread Benoît Minisini
> Hi i wrote a test program that "ls -1" a directory with 1700 and more files > (mp3). > > i wanted to make a string as following > > Content = "/mnt/store/MUSIC/free/new age/webradio recs/Trancemission.FM > Radio 128K- New Age 2- new experience of meditation and new age music - > livestream 12

Re: [Gambas-user] SHELL is more faster than SUB Process_Read()

2010-08-15 Thread Fabien Bodard
2010/8/15 Demosthenes Koptsis : > Hi i wrote a test program that "ls -1" a directory with 1700 and more files > (mp3). > > i wanted to make a string as following > >  Content = "/mnt/store/MUSIC/free/new age/webradio recs/Trancemission.FM > Radio 128K- New Age 2- new experience of meditation and ne

[Gambas-user] SHELL is more faster than SUB Process_Read()

2010-08-15 Thread Demosthenes Koptsis
Hi i wrote a test program that "ls -1" a directory with 1700 and more files (mp3). i wanted to make a string as following Content = "/mnt/store/MUSIC/free/new age/webradio recs/Trancemission.FM Radio 128K- New Age 2- new experience of meditation and new age music - livestream 128k/" & sLine in

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-12 Thread Benoît Minisini
> Benoît Minisini ha scritto: > > Query to Benoit ... is there a way to define 'NOT NULL' entry via > > gambas code ? > > You have to define the default value. What's the point of having a > mandatory field (NOT NULL) without a default value? > >>> > >>> just say i want somet

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-12 Thread Doriano Blengino
Benoît Minisini ha scritto: >> > > Query to Benoit ... is there a way to define 'NOT NULL' entry via > gambas code ? > You have to define the default value. What's the point of having a mandatory field (NOT NULL) without a default value? >>> just s

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Fabien Bodard
2010/2/11 Vassilis K : > I 'll use the Gambas Mysql commands to make a table ! it works ! > The reason that I asked you is that the code for creating a Mysql table > in Gambas is less accurate than the code of python. no at same... but the gambas code way allow you to change the database server wit

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Benoît Minisini
> Fabien Bodard ha scritto: > > Le 11 février 2010 15:23, Benoît Minisini > > > > a écrit : > >>> sql = "CREATE TABLE Aplianikis (" > >>> "aa BIGINT(20) NOT NULL auto_increment," > >>> "Eponimia VARCHAR(40) NOT NULL," > >>> "AFM VARCHAR(18) NOT NULL," > >>> "Hmerom

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Vassilis K
I 'll use the Gambas Mysql commands to make a table ! it works ! The reason that I asked you is that the code for creating a Mysql table in Gambas is less accurate than the code of python. -- SOLARIS 10 is the OS for Data

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Doriano Blengino
Fabien Bodard ha scritto: > Le 11 février 2010 15:23, Benoît Minisini > a écrit : > >>> sql = "CREATE TABLE Aplianikis (" >>> "aa BIGINT(20) NOT NULL auto_increment," >>> "Eponimia VARCHAR(40) NOT NULL," >>> "AFM VARCHAR(18) NOT NULL," >>> "Hmerominia DATE NOT N

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Fabien Bodard
Le 11 février 2010 15:23, Benoît Minisini a écrit : >> sql = "CREATE TABLE Aplianikis (" >>         "aa BIGINT(20) NOT NULL auto_increment," >>         "Eponimia VARCHAR(40) NOT NULL," >>         "AFM  VARCHAR(18) NOT NULL," >>         "Hmerominia DATE NOT NULL," >>         "Checkbox TINYINT(1) NO

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Benoît Minisini
> sql = "CREATE TABLE Aplianikis (" > "aa BIGINT(20) NOT NULL auto_increment," > "Eponimia VARCHAR(40) NOT NULL," > "AFM VARCHAR(18) NOT NULL," > "Hmerominia DATE NOT NULL," > "Checkbox TINYINT(1) NOT NULL," > "primary key(aa)" > ")" >

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Fabien Bodard
sql = "CREATE TABLE Aplianikis (" "aa BIGINT(20) NOT NULL auto_increment," "Eponimia VARCHAR(40) NOT NULL," "AFM VARCHAR(18) NOT NULL," "Hmerominia DATE NOT NULL," "Checkbox TINYINT(1) NOT NULL," "primary key(aa)" ")" "DEFAULT CHARSET

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Vassilis K
I am using python because it executes the table creation commands with the same type like in terminal mode. For example in python we write: sql = """CREATE TABLE Aplianikis ( aa BIGINT(20) NOT NULL auto_increment, Eponimia VARCHAR(40) NOT NULL, AFM VARCHAR(18) NOT NULL,

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Doriano Blengino
Fabien Bodard ha scritto: > >>> >>> I am using the following code for the creation of a table in a Mysql DB: >>> >>> >>> SHELL"python >>> /home/delphi/Documents/Apodeixi/dimiourgiaTableMYSQLmePython1.py" IF ERROR >>> THEN >>> Message.Error(DConv(Error.Text)) >>> ENDIF >>> >>> The co

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Fabien Bodard
and why are you using python to create your table ??? Le 11 février 2010 12:35, Benoît Minisini a écrit : >> Hello again, >> >> I am using the following code for the creation of a table in a Mysql DB: >> >> >> SHELL"python >>  /home/delphi/Documents/Apodeixi/dimiourgiaTableMYSQLmePython1.py" IF E

Re: [Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Benoît Minisini
> Hello again, > > I am using the following code for the creation of a table in a Mysql DB: > > > SHELL"python > /home/delphi/Documents/Apodeixi/dimiourgiaTableMYSQLmePython1.py" IF ERROR > THEN > Message.Error(DConv(Error.Text)) > ENDIF > > The command works perfectly and it cr

[Gambas-user] SHELL command with python does not execute!

2010-02-11 Thread Vassilis K
Hello again, I am using the following code for the creation of a table in a Mysql DB: SHELL"python /home/delphi/Documents/Apodeixi/dimiourgiaTableMYSQLmePython1.py" IF ERROR THEN Message.Error(DConv(Error.Text)) ENDIF The command works perfectly and it creates the table.

Re: [Gambas-user] Shell sudo

2009-12-25 Thread M. Cs.
I've found a better solution: I've created a module file with a process. This can be triggered from within the main program. ' Gambas module file PUBLIC hProcess AS Process PUBLIC wins AS Form PUBLIC szoveg1 AS TextBox PUBLIC SUB ReadPassword() DIM black AS Button wins = NEW Form wins.Width = 150

Re: [Gambas-user] Shell sudo

2009-12-24 Thread Les Hardy
sudo allows you to pass a password to the shell with -S The following should do it. sudo -S apt-get install PACKAGENAME << EOF PASSWORD EOF Regards Les Hardy M. Cs. wrote: > I'd like to make my app able to download and install packages via apt-get > (or any other command-line package manager)

Re: [Gambas-user] SHELL not working (GB_DIR)

2009-12-24 Thread Doriano Blengino
Benoît Minisini ha scritto: >> Doriano Blengino ha scritto: >> >>> Jesus Guardon ha scritto: >>> > > SHELL is just an equivalent of EXEC ["sh", "-c", "XXX"] where "XXX" is > the string passed to the SHELL command. > >>> je...@jesus:~$ cat /usr/local/b

Re: [Gambas-user] SHELL not working (GB_DIR)

2009-12-24 Thread Benoît Minisini
> Doriano Blengino ha scritto: > > Jesus Guardon ha scritto: > Hi again > > Continuing my testings on GB_DIR, I'm running into a new problem: > SHELL command has no effect at all. All sentences using SHELL are not > executed. As you can guess, running my project executable

Re: [Gambas-user] Shell sudo

2009-12-23 Thread Joshua Higgins
I've been writing the command I want to execute as root ("apt-get install package") to a temporary file (e.g. /tmp/install.package), making it executable (chmod +x) then using SHELL "gksu sh /tmp/install.package" which prompts the user for the password. Its probably not the best way, but its quit

[Gambas-user] Shell sudo

2009-12-23 Thread M. Cs.
I'd like to make my app able to download and install packages via apt-get (or any other command-line package manager). How can I do that? I know it will need the user's password but how can I pass the command? The simple SHELL "sudo apt-get install ..." won't do the thing! Thanks! -

Re: [Gambas-user] SHELL not working (GB_DIR)[solved]

2009-12-19 Thread Jesus Guardon
Doriano Blengino escribió: > Jesus Guardon ha scritto: Hi again Continuing my testings on GB_DIR, I'm running into a new problem: SHELL command has no effect at all. All sentences using SHELL are not executed. As you can guess, running my project executable the normal way >

Re: [Gambas-user] SHELL not working (GB_DIR)

2009-12-19 Thread Doriano Blengino
Doriano Blengino ha scritto: > Jesus Guardon ha scritto: > Hi again Continuing my testings on GB_DIR, I'm running into a new problem: SHELL command has no effect at all. All sentences using SHELL are not executed. As you can guess, running my project executable the norma

Re: [Gambas-user] SHELL not working (GB_DIR)

2009-12-19 Thread Doriano Blengino
Jesus Guardon ha scritto: >>> Hi again >>> >>> Continuing my testings on GB_DIR, I'm running into a new problem: SHELL >>> command has no effect at all. All sentences using SHELL are not >>> executed. As you can guess, running my project executable the normal way >>> (not using GB_DIR) it is runnin

Re: [Gambas-user] SHELL not working (GB_DIR)

2009-12-18 Thread Jesus Guardon
>> Hi again >> >> Continuing my testings on GB_DIR, I'm running into a new problem: SHELL >> command has no effect at all. All sentences using SHELL are not >> executed. As you can guess, running my project executable the normal way >> (not using GB_DIR) it is running right. Could this be a bug? >>

Re: [Gambas-user] SHELL not working (GB_DIR)

2009-12-18 Thread Benoît Minisini
> Jesus Guardon escribió: > > Benoît Minisini escribió: > >>> Hi all > >>> > >>> I am experimenting with the GB_DIR environment variable, and I've made > >>> a deb package with my program to install it in /opt. The current dir > >>> structure is as follows: > >>> > >>> je...@jesus:~$ tree /opt > >>

Re: [Gambas-user] SHELL not working (GB_DIR)

2009-12-18 Thread Jesus Guardon
Jesus Guardon escribió: > Benoît Minisini escribió: >>> Hi all >>> >>> I am experimenting with the GB_DIR environment variable, and I've made a >>> deb package with my program to install it in /opt. The current dir >>> structure is as follows: >>> >>> je...@jesus:~$ tree /opt >>> /opt >>> `-- dfhlo

Re: [Gambas-user] shell return parameter (text)

2009-07-10 Thread Stefano Palmeri
Il venerdì 10 luglio 2009 10:09:00 Szenográdi Norbert ha scritto: > Hi, > > > Can I build to Fmain window a textbox with shell return text ? > > AS: SHELL ("echo hello") > and textbox.text will be: "hello" > DIM sShellOut AS String SHELL "echo -n hello" TO sShellOut TextBox.Text = sShellOut Ci

Re: [Gambas-user] shell return parameter (text)

2009-07-10 Thread Doriano Blengino
Szenográdi Norbert ha scritto: > Hi, > > > Can I build to Fmain window a textbox with shell return text ? > > AS: SHELL ("echo hello") > and textbox.text will be: "hello" > SHELL "echo hello" TO textbox.text Regards,

[Gambas-user] shell return parameter (text)

2009-07-10 Thread Szenográdi Norbert
Hi, Can I build to Fmain window a textbox with shell return text ? AS: SHELL ("echo hello") and textbox.text will be: "hello" regards, Sevoir -- Enter the BlackBerry Developer Challenge This is your chance to win

Re: [Gambas-user] shell

2008-09-02 Thread Szenográdi Norbert Péter
Hi, this is working fine: PUBLIC SUB Form_Open() SHELL "espeak Hello" END regards, Sevoir 2008. 09. 2, kedd keltezéssel 19.16-kor Mike ezt írta: > Hi all > > > > I am trying to run the terminal with input from the gambas shell command. > Looks like I have it wrong, any help please. > >

[Gambas-user] shell

2008-09-02 Thread Mike
Hi all I am trying to run the terminal with input from the gambas shell command. Looks like I have it wrong, any help please. SHELL "/home/mike/Desktop/Terminal espeak Hello" Regards all Mike - This SF.Net email