Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ToasterActivity.py
diff options
context:
space:
mode:
Diffstat (limited to 'ToasterActivity.py')
-rw-r--r--ToasterActivity.py34
1 files changed, 1 insertions, 33 deletions
diff --git a/ToasterActivity.py b/ToasterActivity.py
index 7f84401..485918f 100644
--- a/ToasterActivity.py
+++ b/ToasterActivity.py
@@ -24,7 +24,7 @@ pygtk.require('2.0')
import gtk
import os.path
-import pexpect, re
+
import sugar
from sugar.activity import activity
@@ -259,37 +259,5 @@ class ToasterActivity(activity.Activity):
vt = self.notebook.get_nth_page(self.notebook.get_current_page()).vt
vt.paste_clipboard()
-class WodimParser():
- def __init__(self, args, output_cb, command_path="wodim"):
- wodim_command = command_path + " "
- for arg in args:
- wodim_command += (arg + " ")
-
- wodim_handle = pexpect.spawn(wodim_command)
-
- trackmatcher = (r"Track (?P<tracknum>\d+): (?P<tracktype>[A-Za-z]+)"
- + r"\W+(?P<tracksize>\d+ [MmKkGg]B) (?P<tracktime>\(\d+"
- + r":\d+.\d+\)) (?P<flags>(\w+ *)*)")
- totalmatcher = (r"Total size:\W*(?P<totsize>\d+ [MmKkGg]B)"
- + r"(?P<tottime>\(\d+:\d+.\d+\)) = (?P<totsectors>\d+) sectors")
-
- trackinfo = []
- totalline = ""
-
- while True:
- whichmatch = wodim_handle.expect([trackmatcher, totalmatcher])
- if whichmatch == 1:
- #Total info line
- totalline = wodim_handle.match
- break
- else:
- #Track info line
- trackinfo.append(wodim_handle.match.groupdict())
-
- try:
- while wodim_handle.expect(chr(13)) == 0:
- output_cb(wodim_handle.before)
- except pexpect.EOF:
- return wodim_handle.before