Hi list,
I was just wondering why the below function return different location on
different machine?
import distutils.sysconfig
distutils.sysconfig.get_python_lib()
On my computer:
'/usr/lib/python2.5/site-packages'
On my friend's computer:
'/usr/local/lib/python2.5/site-packages'
What is the
Hi every one,
In my program, I want to have "Report Bug..." under Help menu. So, whenever
user clicks on it, it will open an email client for reporting bugs with the
given address. How can I do this?
I set text to actionReportBug like this:
Report Bug...
but it doesn't support html tag.
Any m
នៅថ្ងៃ ពុធ 13 មិថុនា 2007 19:09, Kent Johnson បានសរសេរថា ៖
> hok kakada wrote:
> >> What kind of object is matcher? Does it have any attributes that are
> >> functions? (Not methods you defined for the class, but functions or
> >> methods that you assign to attribu
Dear everyone,
I got a problem while pickling a class object. I have done something as below:
pickleFile = open(filename, 'wb')
pickle.dump(matcher, pickleFile)
pickleFile.close()
where matcher is class object and I got the follow errors:
Traceback (most recent call last)
Hi all,
I just start to use ConfigParser to store the configuration for my
application.
I surfed the mails related to ConfigParser, however I couldn't found the way
of how to set value back to the .conf file.
Let say, I have a test.conf file with:
[General]
userName="da"
later on, I wanna add
Dear All,
A friend of mine is well programming in vb.net and C#.
He got a python sourcecode of KhmerConverter tool.
He would like to port to either vn.net or C#.
Are there any tools to do this?
Thanks,
da
___
Tutor maillist - Tutor@python.org
http:/
On Wednesday 04 October 2006 11:54, John Fouhy wrote:
> On 04/10/06, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
> > you can make a config.ini file and use that one module that parses ini
> > files.
> > I can't remember what it's called.
> > configparser I think, but I wouldn't bet my life on it :
Hi,
Can anybody guide me how to write the code for configure one application?
For example, I want to set Font and Color for a textbox; later when the
application is opened again. the previous font is set.
So, which related function are used to form this feature?
Thanks,
da
_
បានសរសេរ Alan Gauld:
Hi Alan,
>> the folders modules and translate are in the same level, so if I want to
>> import factory.py into myfile.py, how can I do?
>
> You need to make your folders into packages.
> Its fairly simple, you basically create an init.py file
> But its worth reading about packa
Hi all,
I have problem with import statement.
supposed that I have two files in different folders : modules/myfile.py
and translate/factory.py.
the folders modules and translate are in the same level, so if I want to
import factory.py into myfile.py, how can I do?
I have already done in myfil
បានសរសេរ kakada:
> Thank Alan and Luke,
>
> My coding is divided up into many modules and import from one to another.
> Here is my editor.py interface.
>
>
> #!/usr/bin/python
> # -*- coding: utf8 -*-
>
> import sys
> import application_rc
> from PyQt4 import Q
Thank Alan and Luke,
My coding is divided up into many modules and import from one to another.
Here is my editor.py interface.
#!/usr/bin/python
# -*- coding: utf8 -*-
import sys
import application_rc
from PyQt4 import QtCore, QtGui
from ui_editor import Ui_MainWindow
from translate.storage imp
Hello,
I have problem with function jumping:
in my class, I have three function here:
def gotoNextFuzzy(self):
state = "isfuzzy"
self.navigationNext(state)
def gotoNextFuzzy(self):
state = "isapproved"
self.navigationNext(state)
def navigationNext(self,state):
Hi there,
I am trying to build GUI python using Qt4.
I am working with treeWidget to view my data.
With the first load, I want the selected item go to the first row by doing:
curItem = self.ui.treeWidget.itemAt(1,1)
self.ui.treeWidget.setCurrentItem(curItem)
It's ok.
Then I want it jump to 4th
Hello list,
I am on the way of learning QT design.
I need to have pyQT installed. In the meanwhile, It needs sip-4.4.5
before proceed.
I went across with the steps:
python configure.py ...ok
make
In this step, I got alot of errors as follow and some more:
siplib.c: In function ‘sipGetAdd
Hi everyone!
Does any body know how to put icon on windows manager using Tix module?
Thanks,
da
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Michael Lange wrote:
> On Tue, 06 Jun 2006 13:39:21 +0700
> kakada <[EMAIL PROTECTED]> wrote:
>
>
>> Dear Friends,
>>
>> I am now working on GUI python (Tkinter).
>> I want to use combobox as my widget, but I cannot find it in any document.
&g
Dear Friends,
I am now working on GUI python (Tkinter).
I want to use combobox as my widget, but I cannot find it in any document.
Does anybody have experience with that?
Thanks,
da
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman
Hi Linda,
Let say you have a tool named convert.py and other module
(processing.py) in modules folder.
In modules folder create an empty file named __init__.py
In convert.py do:
from modules import processing.py
It would work.
da
linda.s wrote:
> Hi,
> How to import a module which was not in t
Danny Yoo wrote:
>> I want to use the module StringIO as read and write strings as files,
>> I looked into document but cannot understand. Could anyone give me a
>> simple example?
>>
>> something like:
>> from StringIO import *
>> fin = StringIO("abc")
>> .
>> How can I used fin?
>
> 'fin' is
Hello list,
I want to use the module StringIO as read and write strings as files, I
looked into document but cannot understand.
Could anyone give me a simple example?
something like:
from StringIO import *
fin = StringIO("abc")
.
How can I used fin?
Thanks,
da
__
learner404 wrote:
> It works great, thanks very much to the three of you for these
> light-speed answers ... I love this list !
>
> Wesley, I've just pre-order your new edition "Core Python programming"
> on amazon France, it looks great. :)
>
> Thanks
I love this list too.
Da
__
Hi again folks,
I wonder if we can check the encoding of text in one text file.
user is free to encode the file whether Latin1, utf-8, ANSI...
Any ideas?
Thx
da
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
orks for me:
>
> >>> dict1 = { 0x2018:u'k', 0x2019:u'd'}
> >>> n = 0x2018
> >>> print dict1[n]
> k
> >>>
>
> On 4/11/06, * kakada* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> He
Hello all,
For example, I have a dictionary:
dict1 = { 0x2018:u'k', 0x2019:u'd'}
I assign:
n = 0x2018
print dict1[n]
Then:
KeyError: '0x2018'
But I can call directly:
print dict1[0x2018]
So, what is wrong with this? Ho
o it?
Thanks and !Happy Khmer New Year!
kakada
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi all,
How can we know that one specific file is already exist in filesystem?
for instance, I want to read zipfile by issuing code:
import zipfile
ziparchive = zipfile.ZipFile(inputfilename, "r")
if the inputfilename doesn't exist then an error would be occurred.
I want to catch up this special
Hello all,
Could anyone help me by giving example of getAttribute
xmldata = ziparchive.read("content.xml")
xmldoc = minidom.parseString(xmldata)
officeNode = xmldoc.getElementsByTagName('office:text')
I have another function:
def go_thru (nodelist):
for x in range(nodelist.length):
n
Hi all,
Just a quick question again, how can I remove not-empty directory in python?
assumed I have the following directory:
( temp/a/b/
temp/a/c/d.odt
temp/e.xml)
I want to remove the whole temp/ directory.
Thanks :)
da
___
Tutor maillist -
Hello everyone,
textp = xmldoc.getElementsByTagName('text:p')
from the example above, How can I know how many node are there?
Thanks,
da
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
30 matches
Mail list logo