HI There,
I'm using MySQLdb as the MySQL client. Recently I got a weird problem of this
library. After looking into it, I suspect the problem may related to the
conversion from unsigned long to PyLongObject.
Here is the detail, If you are familiar with MySQLdb, the following snippet is
a way t
)
break
print("You just entered:", inp)
Is this along the line that you are thinking? As pointed out earlier, it will
be much easier for people to help if you can share the exact code you put into
and the error messages as well. Thanks and good luck!
All the best,
Tian
--
https://mail.python.org/mailman/listinfo/python-list
ke it very informative.
Hope this helps.
All the best,
Tian
--
https://mail.python.org/mailman/listinfo/python-list
ably I would log it just for record
keeping purpose. As long as you follow up and trace back to the root cause,
they seem to serve the same goal.
Hope this helps...
All the best,
Tian
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
There are 2 statements:
A: a = ‘h’
B: b = ‘hh’
According to me understanding, A should be faster as characters would shortcut
this 1-byte string ‘h’ without malloc; B should be slower than A as characters
does not work for 2-byte string ‘hh’, which triggers the malloc. However, when
I put
I know how to capture window close event, but what i want to do is to
close window using commands. now i am simply using "sys.exit()" to
close the whole program. but it seems that window close events will are
be generated in this case. is there any function in wxpython that i can
use to close appli
I have made a program in wxpython, but how could i exit the program? I
am using wxFrame for my window, what is the function to close the
program?
Thanks!!
--
http://mail.python.org/mailman/listinfo/python-list
this is very useful, thanks very much!
--
http://mail.python.org/mailman/listinfo/python-list
In Windows, I have been simply using os.system() to run command line
program in python. but there will be a black console window. How can I
run the program without invoking that window? i guess there are some
function with which I can redirect the output?
--
http://mail.python.org/mailman/listinf
I googled about how to write singleton in python, but even if I use
Singleton, in which module's namespace should I keep the instance of
this singleton? suppose I have a singleton class definiton in
"utils.py", how should I import and where should I make instance and
initialize? Thanks!!
--
http:
I have tried using "sysctx=None" instead of "global sysctx", but it
doesn't work either.
It seems my initialization work in the previous calling of init() has
no persistent effect when "utils" is imported using "from myproj.utils
import getContext".
What's weird, when a module is in the same direc
I want to create a object directory called Context in my program, which
is based on a dict to save and retrieve values/objects by string-type
name. I have the definition like this:
utils.py
global sysctx
class Context:
def __init__(self):
def set(self, name, obj, over
I have a module called ModuleA.py, in which there is a class called
Dog, what should I put in the "" part to get the instance of class
Dog???
import ModuleA
classname = "Dog"
module = globals()["ModuleA"]
classobj = ??? <---using classname
instanct = classobj()
--
http://mai
I am writing a python program which needs to support some plug-ins. I
have an XML file storing some dynamic structures. XML file records some
class names whose instance needs to be created in the run time while
parsing the XML file. I wonder what is the best solution for this
problem?
I also have
I am python beginner, I have a question about the interdependence of
modules.
For example, when I have two modules:
module1.py
-
def plus(x):
return add(x,1)
module2.py
-
def add(x,y):
return x+y
def plus2(x):
return plus(x)+1
How should I write "import" in both
This is very useful, thanks!
--
http://mail.python.org/mailman/listinfo/python-list
How can I create an instance of an object from a string?
For example, I have a class Dog:
class Dog:
def bark(self):
print "Arf!!!"
I have a string:
classname = "Dog"
How can I create a instance of Dog from classname?
Is there any such methods like those in Java?
--
http://mail.python.o
description file. I will set some rules for plug-in writing (like you
must inherit some class and implement some method). I hope plugin can
be added while original program is running. Is there any good method to
read in python code and test availability and invoke the functions
inside?
Thanks
Tian
I think I did have put the DLL file in the correct place, but I still
cannot make it work. same problem. I checked my version of pyfmod,
ctypes, they are all the newest one. can you tell me the version you
are using? Thanks
--
http://mail.python.org/mailman/listinfo/python-list
I am trying to use pyfmod in python to manipulate sound.
i have installed pyfmod, ctype, numarray (if they are necessary), i
also copied fmod.dll to python/DLLs as well as windows/system32, but
when i tried
import pyFMOD
I got:
Traceback (most recent call last):
File "", line 1, in -topleve
Another question, where can I find a tutorial of pyFMOD? the document
of FMOD itself is daunting and I don't know how exactly pyFMOD wraps
it.
Thanks!!
Tian
--
http://mail.python.org/mailman/listinfo/python-list
21 matches
Mail list logo