This commit is contained in:
Kovid Goyal 2007-04-26 18:53:40 +00:00
parent 379a5f1a5a
commit 50811803d0
4 changed files with 12 additions and 8 deletions

View File

@ -33,7 +33,7 @@ You may have to adjust the GROUP and the location of the rules file to
suit your distribution.
"""
__version__ = "0.3.14"
__version__ = "0.3.15"
__docformat__ = "epytext"
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"

View File

@ -13,11 +13,7 @@
## with this program; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning
""" Create and launch the GUI """
import sys
import re
import os
import traceback
import tempfile
import sys, re, os, traceback, tempfile
from PyQt4.QtCore import Qt, SIGNAL, QObject, QCoreApplication, \
QSettings, QVariant, QSize, QEventLoop, QString, \

View File

@ -25,6 +25,7 @@ from math import sin, cos, pi
from libprs500.gui import Error, _Warning
from libprs500.ptempfile import PersistentTemporaryFile
from libprs500 import iswindows
from PyQt4.QtCore import Qt, SIGNAL
from PyQt4.Qt import QApplication, QString, QFont, QAbstractListModel, \
@ -66,7 +67,9 @@ class FileDragAndDrop(object):
if o.scheme and o.scheme != 'file':
_Warning(o.scheme + " not supported in drop events", None)
continue
path = unquote(o.path)
path = unquote(o.path)
if iswindows and path.startswith('/'):
path = path[1:]
if not os.access(path, os.R_OK):
_Warning("You do not have read permission for: " + path, None)
continue

View File

@ -680,7 +680,12 @@ class PRS500(Device):
while data_left:
data = array('B')
try:
data.fromfile(infile, chunk_size)
# Cannot use data.fromfile(infile, chunk_size) as it
# doesn't work in windows w/ python 2.5.1
ind = infile.read(chunk_size)
data.fromstring(ind)
if len(ind) < chunk_size:
raise EOFError
except EOFError:
data_left = False
res = self.send_validated_command(FileIO(_id, pos, len(data), \