generating PDF or EPUB, which ?

2014-12-10 Thread Mohsen Pahlevanzadeh
Dear all, I need to create an RTL (Right To Left) documentation, with python.But i don't know which library to use.Which support RTL and etc. If you any experience with pdf generating or EPUB generating please share me --Regards Mohsen -

how to find out utf or not

2013-11-05 Thread Mohsen Pahlevanzadeh
Dear all, Suppose i have a variable such as : myVar = 'x' May be it initialized with myVar = u'x' or myVar = 'x' So i need determine content of myVar that it's utf-8 or not, how can i do it? --mohsen -- https://mail.python.org/mailman/listinfo/python-list

Re: functools and objective usage

2013-10-23 Thread Mohsen Pahlevanzadeh
Another Note: class of caller and myfunc to being differed. On Wed, 2013-10-23 at 21:56 +0330, Mohsen Pahlevanzadeh wrote: > Oh , i changed my code to: > > partial(self.myinstance.myfunc,[arg1,arg2,arg3,arg4,arg5],self.myinstance) > > But i got the following traceback: >

Re: functools and objective usage

2013-10-23 Thread Mohsen Pahlevanzadeh
Oh , i changed my code to: partial(self.myinstance.myfunc,[arg1,arg2,arg3,arg4,arg5],self.myinstance) But i got the following traceback: TypeError: myfunc() takes at least 5 arguments (4 given) ##3 myfunc() prototype is: # def myfunc(self,widget

Re: functools and objective usage

2013-10-23 Thread Mohsen Pahlevanzadeh
lf.myinstance.myfunc TypeError: readonly attribute ### Before any help, Thank you... Yours, Mohsen On Wed, 2013-10-23 at 00:56 +0100, MRAB wrote: > On 22/10/2013 23:13, Ben Finney wrote: > > Mohsen Pahlevanzadeh writes: > > > &g

functools and objective usage

2013-10-22 Thread Mohsen Pahlevanzadeh
Dear all, Suppose i have function name, 3 arguments for it, and object of its caller such as self.blahbalah So: my function is: self.blahblah.name(arg1,arg2,arg3) I read functools documentations, may be objictive usage and functionality differ, Do you have experience with objective usage ? http:

Re: pointer and python

2013-10-17 Thread Mohsen Pahlevanzadeh
On Fri, 2013-10-18 at 00:54 +0100, MRAB wrote: > On 18/10/2013 00:17, Mohsen Pahlevanzadeh wrote: > > Dear all, > > > > Suppose I have the following code: > > ##3 > > mydic = dict() > > mydict.update({'string&

pointer and python

2013-10-17 Thread Mohsen Pahlevanzadeh
Dear all, Suppose I have the following code: ##3 mydic = dict() mydict.update({'string':QtGui.QCheckBox()}) ## suppose this dic has many value with some string and QCheckBox Object #Then i have itreate it : for key, val in mydict.items(): setattr(s

Re: how to add object from dict

2013-10-17 Thread Mohsen Pahlevanzadeh
function according to number of my for, my connect function initilize and call according to last (key, val), Do you have any idea? --mohsen On Thu, 2013-10-17 at 11:50 +1100, Ben Finney wrote: > Mohsen Pahlevanzadeh writes: > > > You say right, but i don't any time to read all of co

Re: how to add object from dict

2013-10-16 Thread Mohsen Pahlevanzadeh
On Thu, 2013-10-17 at 11:46 +1100, Chris Angelico wrote: > On Thu, Oct 17, 2013 at 11:43 AM, MRAB wrote: > > I'm guessing, but perhaps you need: > > > > instance = getattr(self, "%s" % key) > > How's that different from getattr(self,str(key))? > > ChrisA I get the string of CheckBox instead

Re: how to add object from dict

2013-10-16 Thread Mohsen Pahlevanzadeh
related to the given traceback of i sent you. --mohsen On Thu, 2013-10-17 at 11:15 +1100, Ben Finney wrote: > Mohsen Pahlevanzadeh writes: > > > Thank you for your useful link , i paste my code into [an external > > pastebin service] > > I'm glad you li

Re: how to add object from dict

2013-10-16 Thread Mohsen Pahlevanzadeh
On Thu, 2013-10-17 at 10:45 +1100, Ben Finney wrote: > Mohsen Pahlevanzadeh writes: > > > and another file,(projectsFind.py) i have the following code: > > #3 > >

how to add object from dict

2013-10-16 Thread Mohsen Pahlevanzadeh
Dear all, I have the following code in projects.py: ##33 for row in xrange(len(uniqueFields)): instance = QtGui.QCheckBox(uniqueFields[row]) projectsFindInstance.projectsInstance.addOnFieldsInstance.update({"%s" % uniqueFields[ro

Can i run my python program under andriod?

2013-09-19 Thread Mohsen Pahlevanzadeh
Dear all, I need to binary with distutils, and run it under android OS, Do you have any experience? yours, Mohsen -- https://mail.python.org/mailman/listinfo/python-list

QFrame and disable maximum attribute

2013-09-17 Thread Mohsen Pahlevanzadeh
Dear all, I need to disbale maximum attribute , and want to fix size of my QFrame, i set : sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) i attached my ui file , you can : pyuic4 -x myfile.ui -i output.py then see my attribute. Question: How can i disable for

Re: Qt connect and first connect or unicode

2013-09-17 Thread Mohsen Pahlevanzadeh
On Tue, 2013-09-17 at 12:32 +0200, Vincent Vande Vyvre wrote: > Le 17/09/2013 11:05, Steven D'Aprano a écrit : > > On Tue, 17 Sep 2013 08:42:35 +0430, Mohsen Pahlevanzadeh wrote: > > > >> Dear all, > >> > >> Unfortunately, i

Re: Qt connect and first connect or unicode

2013-09-16 Thread Mohsen Pahlevanzadeh
On Tue, 2013-09-17 at 08:42 +0430, Mohsen Pahlevanzadeh wrote: > Dear all, > > Unfortunately, i confused and need help... the following code is: > ### > ##CheckBox: > QtCore.QObject.connect(self.checkBox, > QtCore.SIGNAL(_f

Qt connect and first connect or unicode

2013-09-16 Thread Mohsen Pahlevanzadeh
Dear all, Unfortunately, i confused and need help... the following code is: ### ##CheckBox: QtCore.QObject.connect(self.checkBox, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), lambda: self.materialsInstance.setFilterDict("C",self,"name",self.lineEdi

Re: import problem

2013-09-15 Thread Mohsen Pahlevanzadeh
On Mon, 2013-09-16 at 11:14 +0430, Mohsen Pahlevanzadeh wrote: > On Mon, 2013-09-16 at 02:56 +, Steven D'Aprano wrote: > > On Mon, 16 Sep 2013 06:53:26 +0430, Mohsen Pahlevanzadeh wrote: > > > > > Dear all, > > > >

Re: import problem

2013-09-15 Thread Mohsen Pahlevanzadeh
On Mon, 2013-09-16 at 02:56 +, Steven D'Aprano wrote: > On Mon, 16 Sep 2013 06:53:26 +0430, Mohsen Pahlevanzadeh wrote: > > > Dear all, > > > > i have the following two line codes: > > > > i

Re: import problem

2013-09-15 Thread Mohsen Pahlevanzadeh
thank you, you gave me "how to get fish" instead of "fish", it's very better. On Mon, 2013-09-16 at 02:56 +, Steven D'Aprano wrote: > On Mon, 16 Sep 2013 06:53:26 +0430, Mohsen Pahlevanzadeh wrote: > > > Dear all, &g

import problem

2013-09-15 Thread Mohsen Pahlevanzadeh
Dear all, i have the following two line codes: import ui.interface.interface obj = ui.interface.interface.InterfaceCodes() ###333 I have same code in another package and work fine. but i get the : ##

How to differ between checked and unckecked

2013-09-15 Thread Mohsen Pahlevanzadeh
Dear all, My program have a set of checkbox, When user check a checkbox, i should call slot1() and when user uncheck checkbox, i should call slot2(),But i can't understand when user checks and unchecked. My questions is, How can i find out user check and unchecked checkbox? It's very important

When i leave a LineEdit widget and run slot

2013-09-12 Thread Mohsen Pahlevanzadeh
Dear all, QtCore.QObject.connect(self.checkBox, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), lambda: self.interfaceCodesConstructor.setFilterList(self,"name",self.lineEdit.text())) I code pyqt, I have the following code: /// QtCore.QObject.connect(self.checkBox, QtCore.SIGNAL(_f

Re: a gift function and a question

2013-09-09 Thread Mohsen Pahlevanzadeh
sh.index(i)]) return ''.join(returnList) def persianToInterger(persianNumber): listedTmpString = list(persianNumber.decode("utf-8")) returnList = list() for i in listedTmpString: returnList.append(unicodedata.digit(i)) return int ('

a gift function and a question

2013-09-09 Thread Mohsen Pahlevanzadeh
Dear all, I have a gift for mailing list: def integerToPersian(number): listedPersian = ['۰','۱','۲','۳','۴','۵','۶','۷','۸','۹'] listedEnglish = ['0','1','2','3','4','5','6','7','8','9'] returnList = list() listedTmpString = list(str(numb

Logical error in filling QTableWidget and filling all of nodes

2013-09-08 Thread Mohsen Pahlevanzadeh
Dear All, I have the following code (PyQt): / searchFrameObject.tableWidget.setRowCount(rowCounter) searchFrameObject.tableWidget.setColumnCount(5) for row in range(rowCounter): for column in range(5): for result in query: item = QtGui.QTableWidgetItem(_f

Re: NameError: global name '' is not defined , but a bit differences

2013-09-05 Thread Mohsen Pahlevanzadeh
On Wed, 2013-09-04 at 22:38 -0700, Benjamin Kaplan wrote: > On Wed, Sep 4, 2013 at 9:17 PM, Mohsen Pahlevanzadeh > wrote: > > Dear all , > > > > i get the error : > > > > NameError: global name 'ui' is not defined > > > > Complete questi

NameError: global name '' is not defined , but a bit differences

2013-09-04 Thread Mohsen Pahlevanzadeh
Dear all , i get the error : NameError: global name 'ui' is not defined Complete question is at : http://stackoverflow.com/questions/18627608/nameerror-global-name-is-not-defined-but-differences Before answering, Thank you for your attention...! Yours, Mohsen -- https://mail.python.org/ma

a dialog for throublshooting instead of print command pyqt

2013-09-04 Thread Mohsen Pahlevanzadeh
Dear all, I need to a dialg such as aler in javascript in pyqt, my question is at: http://stackoverflow.com/questions/18625406/a-dialog-for-throublshooting-instead-of-print-command-pyqt Before answering, thank you... Yours, Mohsen -- https://mail.python.org/mailman/listinfo/python-list

Re: unbound method () must be called with ... instance as first argument (got nothing instead)

2013-09-03 Thread Mohsen Pahlevanzadeh
Solved, i changed my connect function to: QtCore.QObject.connect(self.pushButtonAdd, QtCore.SIGNAL(_fromUtf8("clicked()")),self.showHideConstructor.showFindMaterials) On Wed, 2013-09-04 at 02:00 +0430, Mohsen Pahlevanzadeh wrote: > Dear all, > > I have the following two lin

unbound method () must be called with ... instance as first argument (got nothing instead)

2013-09-03 Thread Mohsen Pahlevanzadeh
Dear all, I have the following two lines code in my setup frame: // self.showHideConstructor = ui.interface.interface.ShowHide() QtCore.QObject.connect(self.pushButtonAdd, QtCore.SIGNAL(_fromUtf8("clicked()")),self.showHideConstructor,ui.interface.interface.ShowHide.showFin

Re: problem of double import in python

2013-09-02 Thread Mohsen Pahlevanzadeh
t;, line 91, in main interfaceObj.showMaterials() File "/home/mohsen/codes/amlak/amlak/src/common/interface/interface.py", line 80, in showMaterials self.ui = Ui_Materials() NameError: global name 'Ui_Materials' is not defined // Yours, Mohsen O

problem of double import in python

2013-09-02 Thread Mohsen Pahlevanzadeh
Dear all, I remember to avoiding to confusing compiler for header, use / // in my include file #define MYHEADER_H // and in others code use: #ifndef MYHEADER_H #include blahblah / Unfortunately, i prevent to same error, double import to python, but i don't

pyqt and doesnt work out of mainwindow

2013-09-02 Thread Mohsen Pahlevanzadeh
Dear all, My question is at: http://stackoverflow.com/questions/18564293/main-program-work-good-but-when-put-it-into-a-function-doesnt-work-pyqt before answering, thank you Yours, mohsen -- http://mail.python.org/mailman/listinfo/python-list

What does mean @ sign in first of statement

2013-09-01 Thread Mohsen Pahlevanzadeh
Dear all, What does mean @ sign in first of statement such as: // @hybrid_property def fullname(self): return self.firstname + " " + self.lastname /// Sorry for cheap question. Yours, Mohsen -- http://mail.python.org/mailman/listinfo/python-list

semicolon at end of python's statements

2013-08-28 Thread Mohsen Pahlevanzadeh
Dear all, I'm C++ programmer and unfortunately put semicolon at end of my statements in python. Quesion: What's really defferences between putting semicolon and don't put? Yours, Mohsen -- http://mail.python.org/mailman/listinfo/python-list

which better for me?session.query or session.execute?

2013-08-27 Thread Mohsen Pahlevanzadeh
Dear all, Suppose I want to write a function for better using SQLAlchemly dynamically with the following specification: 1. It get field names and values. 2. It get operators such as = , <> , like , between and so on. 3. It get logical operators such as and , or and not. 4. ..

Re: python eval function

2013-08-26 Thread Mohsen Pahlevanzadeh
On Mon, 2013-08-26 at 00:55 +, Steven D'Aprano wrote: > On Sun, 25 Aug 2013 23:48:34 +0430, Mohsen Pahlevanzadeh wrote: > > > Dear all, > > > > eval doesn't run my code at the following link: > > http://stackoverflow.com/questions/18432198/eval-funct

python eval function

2013-08-25 Thread Mohsen Pahlevanzadeh
Dear all, eval doesn't run my code at the following link: http://stackoverflow.com/questions/18432198/eval-function-doesnt-work-in-python Thank you before your answer... --mohsen -- http://mail.python.org/mailman/listinfo/python-list

Re: multifile programming on python 3

2013-08-25 Thread Mohsen Pahlevanzadeh
On Sun, 2013-08-25 at 12:13 +, Dave Angel wrote: > Mohsen Pahlevanzadeh wrote: > > > Dear all, > > > > I need help about multifile programming on python 3 and i questioned on > > stackoverflow : > > http://stackoverflow.com/questions/18391230/eclipse-p

cpmplex function call

2013-08-25 Thread Mohsen Pahlevanzadeh
Dear all, Suppose I have function with with 10 args: "def foo(arg1,arg2,arg3,arg4.): " I need to call somtimes with arg1 , somtimes arg1, arg4, , somtimes arg 4 , arg7 , my program doesn't specify to type of call. Does python same way to help me? My link: http://stackoverflow.com/quest

Re: typeid(obj).name in C++ vs (python)

2013-08-25 Thread Mohsen Pahlevanzadeh
On Sun, 2013-08-25 at 13:10 +0430, Mohsen Pahlevanzadeh wrote: > Dear all, > > If you C++, I need to (typeid(obj).name) in python. Does python same > thing? > > --mohsen > Of course i need to typeof(). -- http://mail.python.org/mailman/listinfo/python-list

typeid(obj).name in C++ vs (python)

2013-08-25 Thread Mohsen Pahlevanzadeh
Dear all, If you C++, I need to (typeid(obj).name) in python. Does python same thing? --mohsen -- http://mail.python.org/mailman/listinfo/python-list

multifile programming on python 3

2013-08-25 Thread Mohsen Pahlevanzadeh
Dear all, I need help about multifile programming on python 3 and i questioned on stackoverflow : http://stackoverflow.com/questions/18391230/eclipse-python-nameerror-name-mymodule-is-not-defined I thank you if you answer me. --mohsen -- http://mail.python.org/mailman/listinfo/python-list

python3-sqlalchemy and debian repo

2013-08-21 Thread Mohsen Pahlevanzadeh
Dear all, I want to use sqlalchemy library, When i use "apt-cashe search sqlalchemy" , get the following result(part of result): /// python-sqlalchemy - SQL toolkit and Object Relational Mapper for Python python-sqlalchemy-doc - documentation for the SQLAlchemy Python library python-sq

help function and operetors overloading

2012-02-05 Thread Mohsen Pahlevanzadeh
Dear all, You know python has many functions for operators overloading such as __add__, __radd__, __invert__, __eq__ and so on. How i see the complete list of them with help function? Yours, Mohsen signature.asc Description: This is a digitally signed message part -- http://mail.python.org/mai

Re: Function parameters list

2009-12-01 Thread Mohsen Pahlevanzadeh
You need to define a function same following definition: def myfunc(*arglist): yourbody calling function: myfunc("it's first argument","It's second argument","It's thr argument") On Tue, 2009-12-01 at 10:15 +0200, Nadav Chernin wrote: > Hello, all > > > > I need to know dynamically