![]() |
2010-09-21
, 21:58
|
Posts: 13 |
Thanked: 2 times |
Joined on Nov 2009
@ Stockholm
|
#12
|
#!/usr/bin/env python # -*- coding: utf-8 -*- from sys import argv, exit from PyQt4 import QtCore, QtGui from qt4_designer_output_python_file import Ui_MainWindow class main_win(QtGui.QMainWindow): def __init__(self, *args, **kw): super(main_win, self).__init__(*args, **kw) self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ctimer = QtCore.QTimer() QtCore.QObject.connect(self.ctimer, QtCore.SIGNAL("timeout()"), \ self.constantUpdate) self.ctimer.start(25) self.move_count = 0 def constantUpdate(self): splash = self.ui.SplashLabel if self.move_count < 200: self.move_count += 1 splash.move(splash.x() + 1, splash.y() + 1) else: self.ctimer.stop() splash.hide() if __name__ == "__main__": app = QtGui.QApplication(argv) myapp = main_win() myapp.show() exit(app.exec_())
![]() |
2010-09-23
, 12:11
|
Posts: 161 |
Thanked: 85 times |
Joined on Feb 2010
|
#13
|
dir_name = "src" #Name of the subfolder containing your package source files (for example, usr\share\icons\hicolor\scalable\myappicon.svg, usr\lib\myapp\somelib.py). We suggest to leave it named src in all projects and will refer to that in the wiki article on maemo.org #Thanks to DareTheHair from talk.maemo.org for this snippet that recursively builds the file list for root, dirs, files in os.walk(dir_name): real_dir = root[len(dir_name):] fake_file = [] for f in files: fake_file.append(root + os.sep + f + "|" + f) if len(fake_file) > 0: p[real_dir] = fake_file print p r = p.generate(version,build,changelog=changeloginformation,tar=True,dsc=True,changes=True,build=False,src=True)
![]() |
2010-09-23
, 12:37
|
Posts: 161 |
Thanked: 85 times |
Joined on Feb 2010
|
#14
|
#Thanks to DareTheHair from talk.maemo.org for this snippet that recursively builds the file list for root, dirs, files in os.walk(dir_name):
#Thanks to DareTheHair from talk.maemo.org for this snippet that recursively builds the file list . for root, dirs, files in os.walk(dir_name): real_dir=...
![]() |
2010-09-23
, 15:02
|
Posts: 161 |
Thanked: 85 times |
Joined on Feb 2010
|
#15
|
p[real_dir] = fake_file File "/usr/lib/python2.5/site-packages/py2deb.py", line 90, in __setitem__ raise Py2debException("key path '%s' malformed (don't start with '/')"%path) py2deb.Py2debException: key path '' malformed (don't start with '/')
![]() |
2010-09-23
, 17:52
|
Posts: 161 |
Thanked: 85 times |
Joined on Feb 2010
|
#16
|
dir_name = "src" for root, dirs, files in os.walk(dir_name): real_dir = root[len(dir_name):]
dir_name = "src" for root, dirs, files in os.walk(dir_name): real_dir = root
a="src" In [13]: len(a) Out[13]: 3 In [14]: cacca=[1,2,3,4,5,6,7] In [15]: cacca[len(a):] Out[15]: [4, 5, 6, 7] In [16]: cacca[:len(a)] Out[16]: [1, 2, 3]
for root, dirs, files in os.walk(dir_name): real_dir ="//" + root[len(dir_name):]
The Following User Says Thank You to erniadeldesktop For This Useful Post: | ||
Cheers
Bjoern
My website:
- olausson.de
- gallery.olausson.de
My Applications: