Re: [Tutor] pytsk

2016-04-29 Thread SM
I often refer to the same blog (hacking exposed), and find many of the links broken, even though there is a lot of very useful information there. I use pytsk on Linux and always build it from source from here: https://github.com/py4n6/pytsk/releases/download/<>/pytsk-<>.tgz e.g: https://github.com

Re: [Tutor] Question on os.popen

2014-01-19 Thread SM
> In the upper left corner of that page is a dropdown you can use to get to 3.3 for example. Thanks for that info. On Sun, Jan 19, 2014 at 11:42 PM, Dave Angel wrote: > SM Wrote in message: > > Sorry for not giving details on the OS and python version I am using: > Ubu

Re: [Tutor] Question on os.popen

2014-01-19 Thread SM
Eryksun: Thanks for your reply. Yes, as I mentioned in my reply to Allen, I used subprocess.check_output and it worked for me. -SM On Sun, Jan 19, 2014 at 11:33 PM, eryksun wrote: > On Sun, Jan 19, 2014 at 6:36 PM, SM wrote: > > > > This time it probably ran for a few more

Re: [Tutor] Question on os.popen

2014-01-19 Thread SM
working. Does that mean this is one of the limitations of os.popen? I am not sure. Sorry for not giving details on the OS and python version I am using: Ubuntu and Python3. Thanks, SM On Sun, Jan 19, 2014 at 8:20 PM, Alan Gauld wrote: > On 19/01/14 23:36, SM wrote: > > I read about os

[Tutor] Question on os.popen

2014-01-19 Thread SM
iDictList[i]['inode'] + ' > ' + outfile print(">> D: Executing iCAT command: ", icat_cmd) f2 = os.popen(icat_cmd) else: return I am n

Re: [Tutor] Pretty printing XML using LXML on Python3

2013-11-29 Thread SM
Thank you, eryksun. using tounicode seems to work on this small piece of code. It still has issues with my code which is generating a big XML code. I will figure out why. -SM On Thu, Nov 28, 2013 at 2:45 PM, eryksun wrote: > On Thu, Nov 28, 2013 at 2:12 PM, SM wrote: > > Run wit

[Tutor] Pretty printing XML using LXML on Python3

2013-11-28 Thread SM
;child')) # another child with text child = etree.Element('child') child.text = 'some text' root.append(child) # pretty string s = etree.tostring(root, pretty_print=True) print(s) Run with Python: $ python testx.py some text $ Run with Python3: $ python3 test

Re: [Tutor] UnicodeDecodeError while parsing a .csv file.

2013-10-28 Thread SM
Thanks to all, for so much information. I just checked that the encoding is Latin-1 and it works when I use it in the file open call. (instead of ignoring it). On Mon, Oct 28, 2013 at 7:54 PM, Danny Yoo wrote: > Hi Sm, > > Note: if possible, I would strongly suggest reusing csv.read

Re: [Tutor] UnicodeDecodeError while parsing a .csv file.

2013-10-28 Thread SM
which I have no control over. What worked was your suggestion to ignore the errors (I made sure that my results are not messed up when I choose to ignore the errors). Thanks, much. On Mon, Oct 28, 2013 at 7:49 PM, Steven D'Aprano wrote: > On Mon, Oct 28, 2013 at 06:13:59PM -0400,

Re: [Tutor] UnicodeDecodeError while parsing a .csv file.

2013-10-28 Thread SM
31 PM, bob gailer wrote: > On 10/28/2013 6:13 PM, SM wrote: > > Hello, > Hi welcome to the Tutor list > > > > I have an extremely simple piece of code > > which could be even simpler - see my comments below > > > > which reads a .csv file, which has 1000 li

[Tutor] UnicodeDecodeError while parsing a .csv file.

2013-10-28 Thread SM
lf.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 1173: invalid continuation byte $ I am not able to figure out the cause of this error. Any clues as to why I am seeing this error, are appreciated. Thanks, -SM __

Re: [Tutor] How to Terminate a Popen call?

2013-10-23 Thread SM
Hello eryksun, Thanks, very much, for the very quick and helpful reply. It fixed my problem. -Sm On Tue, Oct 22, 2013 at 10:33 PM, eryksun wrote: > On Tue, Oct 22, 2013 at 9:04 PM, SM wrote: > > def run(self): > > (process, err) = Popen(self.fwc

[Tutor] How to Terminate a Popen call?

2013-10-22 Thread SM
bject has no attribute 'send_signal' So how would I terminate Popen before it has finished executing?? Appreciate any help. Thanks! -Sm ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to access a method defined in one class from another class (which is a thread) in Python3?

2013-08-12 Thread SM
ok. Some responses in line at [SM] On Sun, Aug 11, 2013 at 12:05 PM, Alan Gauld wrote: > On 09/08/13 16:50, SM wrote: > > Sorry I only just picked this up. > > > (ex: self.tab_fw = QtGui.QWidget(), self.tab_ann = QtGui.QWidget(), >> etc), its own textEdit window and its

Re: [Tutor] How to access a method defined in one class from another class (which is a thread) in Python3?

2013-08-09 Thread SM
On Fri, Aug 9, 2013 at 4:01 AM, Alan Gauld wrote: > On 09/08/13 02:52, SM wrote: > > OP is me? Not sure what it stands for, but I am a 'she' :) >> > > Oops. my bad. Stereotyping is a bad habit. [SM]: Not your fault. My bad too. Dog's face tells little abo

Re: [Tutor] How to access a method defined in one class from another class (which is a thread) in Python3?

2013-08-08 Thread SM
called by __init__. I tried doing it and the gui crashed! (I am yet to see why and where it crashed) I am not sure I know what the problem or the solution is. Hence the email Thanks for all your time, suggestions and help. Thanks, -SM On Thu, Aug 8, 2013 at 6:30 PM, Alan Gauld wrote: > On 08/08/

Re: [Tutor] How to access a method defined in one class from another class (which is a thread) in Python3?

2013-08-08 Thread SM
On 08/08/13 21:24, SM wrote: example, I ended up doing exactly what you suggested. I am sure I am > missing something, as it is giving the same error: > Here is what I am doing based on your suggestion: > > class bcThread(threading.Thread): >

Re: [Tutor] How to access a method defined in one class from another class (which is a thread) in Python3?

2013-08-08 Thread SM
] self.textEdit_fwcmdlineoutput = QtGui.QTextEdit(self.tab_fw) self.textEdit_fwcmdlineoutput.setObjectName(_fromUtf8("textEdit_fwcmdlineoutput")) self.gridLayout.addWidget(self.textEdit_fwcmdlineoutput, 6, 0, 1, 3) Thanks, -SM On Thu, Aug 8, 2013 at 4:41 PM, Prasad, Ramit wrote: > Please post

Re: [Tutor] How to access a method defined in one class from another class (which is a thread) in Python3?

2013-08-08 Thread SM
AttributeError: 'Ui_MainWindow' object has no attribute 'textEdit_fwcmdlineoutput' Wonder why it says the class/object has no attribute. Thanks, -SM On Thu, Aug 8, 2013 at 1:22 PM, Alan Gauld wrote: > On 08/08/13 17:23, SM wrote: > >> I am defining multiple classes (some of the

Re: [Tutor] How to access a method defined in one class from another class (which is a thread) in Python3?

2013-08-08 Thread SM
code that creates an attribute in Ui_MainWindow() class: self.textEdit_fwcmdlineoutput = QtGui.QTextEdit(self.tab_fw) This is what is making me get confused as to why it complains that there is no attribute. Thanks, -SM On Thu, Aug 8, 2013 at 1:17 PM, Prasad, Ramit wrote: > SM wrote: > &g

[Tutor] How to access a method defined in one class from another class (which is a thread) in Python3?

2013-08-08 Thread SM
StdoutToTextEditWindowFw() I see the same error. Can someone guide me as to what is the correct way to do something like this? Thanks in advance. -SM ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Implementing Copy/Cut/Paste menu actions using MainWindow/PyQT4

2013-08-01 Thread SM
tabs of the Gui to do cut/copy/paste actions. Is there a way in PyQt4 that I can do it? Thanks! SM ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to redirect console output to a TextEdit box on a QT Python Gui ?

2013-06-20 Thread SM
Thanks, much, Ramit. On Wed, Jun 19, 2013 at 4:44 PM, Prasad, Ramit wrote: > SM wrote: > > Hello Chris, Thanks for your response. I have a follow-up question, if > you don't mind, to understand > > your answer better. > > I am running a python3 script. So firs

Re: [Tutor] How to redirect console output to a TextEdit box on a QT Python Gui ?

2013-06-19 Thread SM
quot; and "output_goes_here" as the argument of setText, I am a bit confused as to how I can redirect multiple print statements to the setText call. Can you please clarify? Thanks! Sm On Sun, Jun 16, 2013 at 2:02 PM, Chris “Kwpolska” Warrick < kwpol...@gmail.com> wrote: > On

[Tutor] How to redirect console output to a TextEdit box on a QT Python Gui ?

2013-06-16 Thread SM
g either. Appreciate any pointers. If there are better ways than what I am trying to use, appreciate that as well. Thanks, -SM ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Fwd: QT Python: How to re-use the return value of fileDialog.openFileName() ?

2013-05-27 Thread SM
Thank you, for the details. On Mon, May 27, 2013 at 10:13 AM, eryksun wrote: > On Mon, May 27, 2013 at 9:45 AM, Matthew Ngaha > wrote: > > On Mon, May 27, 2013 at 2:14 PM, SM wrote: > > > >>But then I also had to use self.fileDialog from within the function. Not

Re: [Tutor] Fwd: QT Python: How to re-use the return value of fileDialog.openFileName() ?

2013-05-27 Thread SM
Yes, the following works. path = QtGui.QFileDialog.getOpenFileName() Thanks! On Mon, May 27, 2013 at 9:45 AM, Matthew Ngaha wrote: > On Mon, May 27, 2013 at 2:14 PM, SM wrote: > > >But then I also had to use self.fileDialog from within the function. Not > > sure how I

Re: [Tutor] Fwd: QT Python: How to re-use the return value of fileDialog.openFileName() ?

2013-05-27 Thread SM
Thanks! I defined a function, as you suggested, to call when the button was clicked. But then I also had to use self.fileDialog from within the function. Not sure how I could avoid using fileDialog. I also defined global variable (under the class) and assigned it to the filename, so I could access