Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
60% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
1 Commented Post
0 Endorsements
Ranked #4K
~139.35K People Reached
About Me

Software Developer

PC Specs
MacBook Pro OSx
Favorite Tags
Member Avatar for vegaseat

Using PySide's QAbstractTableModel allows you to easily customize a widget like QTableView and make it more generic in its application. Here we use it to present solvent data in tabular form and sort each column content by simply clicking on the header. You can feed it any data as long …

Member Avatar for Mark_94
5
6K
Member Avatar for TrustyTony

Sometimes we want to not split by every space character, but we want to split only on those outside of brackets and quotes. This way we can have for example quoted string as single argument for command. EDIT: 1. Added hierarchical nesting of same kind of brackets. 2. Bunching multiple …

Member Avatar for gamesbook
1
3K
Member Avatar for krystosan

Does anyone have idea how to fetch a file split into defined number of ranges using the requests module instead of urllib2 ?

Member Avatar for snippsat
0
123
Member Avatar for krystosan

Hi need help passing an argument through signal emitted from a function at module level, when the function is executed I want to emit a signal with an argument whose value i want to pass to the method that is connected to that signal in the class in that same …

Member Avatar for woooee
0
329
Member Avatar for krystosan

when getting file from a web server or ftp server, if we use `u = urllib2.urlopen(url)` Correct me if I am wring, it is not getting downloaded to disk, i think its getting stored in buffer(RAM), is there a way that the buffer split should get saved onto disk directly …

Member Avatar for slate
0
301
Member Avatar for krystosan

I am on OSx and I am trying to exit the program by pressing CTRL+C. but it seems like even if I have a signal handler registered in main thread it doesn't exit while the thread is executing on pressing CTRL+C. Here is a piece of cake where I am …

Member Avatar for TrustyTony
0
2K
Member Avatar for krystosan

I havent done this before, but I want to make a window that plots a graph looking at file structure on different server locations, and in that UI I want to add control like if i want to copy the remote the file to local if missing or if outdated, …

Member Avatar for woooee
0
456
Member Avatar for vegaseat

Using the Python Image Library (PIL) you can resize an image. Several filters can be specified. ANTIALIAS is best for downsampling, the other filters work better with upsampling (increasing the size). In this code snippet one image of each filter option is saved, so you can compare the quality in …

Member Avatar for Budy_1
0
73K
Member Avatar for krystosan

getting errror related to pkg_resources while running PIP PIP install cython Traceback (most recent call last): File "/usr/local/bin/PIP", line 6, in <module> from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module> working_set.require(__requires__) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require needed = self.resolve(parse_requirements(requirements)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve raise DistributionNotFound(req) …

Member Avatar for Gribouillis
0
512
Member Avatar for krystosan

i am trying to recieve input from external text editor using python's `subprocess` but I am not sure why i am getting the error diff = subprocess.Popen('open(os.path.join(os.getcwd(), "foo.txt") "w")', stdout=subprocess.PIPE) pr = subprocess.Popen(sublime, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, stdin=diff.stdout) pr.wait() if pr.returncode == 0: msg = pr.stdout.read() print msg er = pr.stderr.read() …

Member Avatar for krystosan
0
375
Member Avatar for krystosan

books = { 'Contact':['Carl Sagan', '2'], 'End of Faith':['Sam Harris', '7'], 'on Mars':['Patrick Moore', '1'], } based on dictionary above, how can i get Modales Qdialog box that should have 3 column containing like below DialogBox BookName_Label: BookAutor_Label : Quantity_QSpinBox BookName_Label: BookAutor_Label : Quantity_QSpinBox BookName_Label: BookAutor_Label : Quantity_QSpinBox Ok Cancel

Member Avatar for bnn678
0
272
Member Avatar for krystosan

I have made a python script that takes path of a folder and dispalys images in gallery or slideshow made in pyqt? So how do I add a right click menu of the folder in finder to pass the same folder path as argument to python script ?

0
173
Member Avatar for krystosan

I have made a QTableView that displays images from disk, there are two seriously agonizing problem I am facing. First of after the windows shows up making it maximize or changing size of window is very slow, and secondly I want to display images height width dependong on what can …

0
176
Member Avatar for krystosan

How do I display images in QListView of size of standard thumbnail size like 250 x 200 , and file nametext should wrap to next line , right now the images displayed are very small and are not positioned under each other in proper row column order. import sys import …

Member Avatar for krystosan
0
2K
Member Avatar for krystosan

I am trying yo create symbolic link on my mac, but when i try to run i get error saying original item searchMethod cannot be found `$ ln -s '/usr/bin/env python ~/Development/python/searchMethod/python/searchMethod.py' searchMethod`

Member Avatar for rojomoke
0
472
Member Avatar for krystosan

I have a function in which i want to mock `os.listdir` that returns directory content to variable `dirContent` def setUp(self): self._filePaths = ["/test/file/path"] self.mox = mox.Mox() def imageFilePaths(paths): imagesWithPath = [] for _path in paths: try: dirContent = os.listdir(_path) except OSError: raise OSError("Provided path '%s' doesn't exists." % _path) for …

0
138
Member Avatar for krystosan

How do I rotate image in this code every n seconds http://pastebin.com/SKDzuC15 lets say i want to change the image in pixmap after 5 seconds to next image, what is happening right now the last one gets displayed.

Member Avatar for krystosan
0
265
Member Avatar for krystosan

It seems like the slotDirChanged is getting executed twice, becuase everything seems to be working fine, import datetime from PyQt4 import QtGui,QtCore from PyQt4.QtCore import pyqtSlot import sys import os class WatchFilesBin(QtGui.QMainWindow): def __init__(self, lookinpath=None): super(WatchFilesBin, self).__init__() self._filesBinPath = lookinpath createFilesBin(self._filesBinPath) self.filesList = os.listdir(self._filesBinPath) print self.filesList self.fileSysWatcher = QtCore.QFileSystemWatcher() def …

Member Avatar for krystosan
0
999
Member Avatar for Remy the cook

I am trying to extract blogs related to economy using the RSS feeds in python. I have no idea how to get a specific number of blogs and how to get those blogs in a particular domain (like economy). My project requires analysing these blogs using NLP techniques, but I'm …

Member Avatar for Remy the cook
0
2K
Member Avatar for krystosan

Is there any way to start an application with python and count how much time does it take to completely load, any idea if I can do it with os.syste, or subprocess.Popen ?

Member Avatar for germ
0
272
Member Avatar for krystosan

Why is this stacking ontop of each other, as far as the index should get each of them to next row. data1 = {'PHOTOSHOP': '6.5', 'NUKE': '7.0v9', 'MAYA': '2014', 'TESTING': '1.28', 'KATANA': '1.7', 'MARI': '4.0'} data2 = {'PHOTOSHOP': '10.5', 'NUKE': '6.3v6', 'MAYA': '2012', 'TESTING': '1.28', 'KATANA': '1.0', 'MARI': '1.0'} class …

Member Avatar for krystosan
0
190
Member Avatar for krystosan

I have a list that contains some paths ['/users/sanfx/test1', '/users/sanfx/test2/', '/App/project/modules'] dirModel = QtGui.QFileSystemModel() dirModel.setRootPath(QtCore.QDir.currentPath()) dirModel.setFilter(QtCore.QDir.AllDirs | QtCore.QDir.NoDotAndDotDot | QtCore.QDir.Files) # dirModel.setNameFilters(self.filter) dirModel.setNameFilterDisables(0) completer = QtGui.QCompleter(dirModel,self) completer.setModel(dirModel) completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive) self.addPathEdit.setCompleter(completer) i want to add both these list and completer to be set to completer for self.addPathEdit

0
85
Member Avatar for krystosan

How should I make an entry appended to existing entries instead of overwriting the whole file ? class ReadWriteCustomPathsToDisk(object): """docstring for ReadWriteCustomPathsToDisk""" def __init__(self, modulePath): super(ReadWriteCustomPathsToDisk, self).__init__() self.modulePath = modulePath def _xmlFileLocation(self): xmlFileLocation = os.path.join(os.path.expanduser("~"), "Documents","searchMethod","modules.xml") return xmlFileLocation if os.path.exists(xmlFileLocation): return xmlFileLocation def readXml(self): xmlFile = self._xmlFileLocation() root = etree.parse(xmlFile).getroot() …

0
108
Member Avatar for krystosan

I just discovered that while doing check of the functions available in `os.path` using `dir(os.path)` is not the same as shown by `dir(__import__("os.path", globals={}, locals={}, fromlist=[], level=-1))`, in the later case it is actually showing all the modules of `OS` while I just want to look inside for the modules …

Member Avatar for Gribouillis
0
207
Member Avatar for krystosan

if i try to dump from shell like this `python -c 'help("modules")' > ~/Desktop/modules.txt` but if I try to execute from within the python like this `>>os.system("python -c 'help("modules")' > ~/Desktop/modules.txt")` i get error File "<stdin>", line 1 os.system("python -c 'help("modules")' > ~/Desktop/modules.txt") ^ SyntaxError: invalid syntax once i get …

Member Avatar for krystosan
0
200
Member Avatar for krystosan

in the designer when i right click a widget, and i click promote to i get this window? see attached screenshot what is it for ? does that mean i can create a new class in this case inherit QLineEdit and add more methos to it ? how can i …

0
145
Member Avatar for krystosan

why this works `> varhelp = __import__("sys")` and this doesn't`> varhelp = __import__("sys.path")` the second one throws: Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named path then how to achieve the second one?

Member Avatar for woooee
0
184
Member Avatar for krystosan

I am trying to load the help on each method into a QTextEdit in PyQt4 how can I have this variable hold help on a method, example: `data = os.system('python -c "import sys; help(sys.path)"')` but data value contains `0`

Member Avatar for krystosan
0
368
Member Avatar for krystosan

how do I make a class return as `Namespace(filter='b', list="['hi','by']")` class NameSpace(object): """Mock for argparse's NameSpace """ def __init__(self, lst=None, flter=None): super(NameSpace, self).__init__() self._filter = flter self._lst = lst Is it possible what I am thinking, i guess we have to do something using special method call ?

Member Avatar for krystosan
0
320
Member Avatar for krystosan

In the scripts ddirectory of my dummy project I have created this file without extension and has given executable permission using chmod +x filterList #!/bin/env python print "Hello World!" 'python ~/Development/python/listFilter/python/filterList.py $1 $2' but still when I run this i get error message saying $ filterList -bash: filterList: command not …

Member Avatar for krystosan
0
796