HI all
I am making an application with wxpython.
But I got a problem when I want to change the display string
according to process status.
I passed the frame to the processing function and use the
frame.txtobj to change displaying strings.
I found it is a bad method to do that.
Can any one
'f_hi', 'random'],
['f_thanks', 'random']]
But how can I call them from that list??
Thank you.
Jia Lu
--
http://mail.python.org/mailman/listinfo/python-list
Hi all
I'm trying to parsing html with re module.
html = """
DATA1DATA2DATA3DATA4
DATA5DATA6DATA7DATA8
"""
I want to get DATA1-8 from that string.(DATA maybe not english words.)
Can anyone tell me how to do it with regular expression in python?
Thank you very much.
--
http://mail.py
Hi all
I see dict type can do 1-to-1 pattern, But is there any method to do
1-to-many, many-to-1 and many-to-many pattern ? What about using some
Serialized objects?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
>
> You need to define a file __init__.py in your newly created lib directory.
>
Thank you very much :)
--
http://mail.python.org/mailman/listinfo/python-list
Hi all
I created a folder named *lib* and put a py file *lib.py* in it.
In the upper folder I created a py file as:
import lib.lib
def main():
"""
__doc__
"""
lib.lib.test()
#
if __name__ == "__main__":
main()
But I got an error
,
pickle(cPickle), shelve, marshal
Any advice? Thank you.
Jia Lu
--
http://mail.python.org/mailman/listinfo/python-list
Hi all.
I have 2 lists,
a = [1,2,3]
b = ["ooo","aaa","ppp"]
What is the fastest way to make a dict like {1:"ooo",2:"aaa",
3:"ppp"} ?
Thanx
--
http://mail.python.org/mailman/listinfo/python-list
Hi all.
I have 2 lists,
a = [1,2,3]
b = ["ooo","aaa","ppp"]
What is the fastest way to make a dict like {1:"ooo",2:"aaa",
3:"ppp"} ?
Thanx
--
http://mail.python.org/mailman/listinfo/python-list
Hello all
I donot want to use a real DB like MySQL ... But I need something to
save about more than 1000 articles.
Is there any good ways?
Thanx
Jia Lu
--
http://mail.python.org/mailman/listinfo/python-list
> If you just expand the length to five million* or so, one of those
> strings will contain all the works of Shakespeare.
Oops, you have this formula in math?
Actually I want to scan a range of network for some certain files.
--
http://mail.python.org/mailman/listinfo/python-list
fgdfgdg"
.
Need I write 26 for loops to do this?
Thanx
Jia LU
--
http://mail.python.org/mailman/listinfo/python-list
Hi all.
I want to create a large list like:
~
Is there any good algorithm to do this?
Thanx
Jia Lu
--
http://mail.python.org/mailman/listinfo/python-list
Hello
I have a program that can telnet to a host.
But I cannot understand from [for c in data] part, can anyone explain
it to me?
Thank you very much.
[CODE]
import sys, posix, time
from socket import *
BUFSIZE = 1024
# Telnet protocol characters
IAC = chr(255) # Interpret as command
DONT
>
> def make_module_from_file(module_name, file_name):
> """ Make a new module object from the code in specified file """
>
> from types import ModuleType
> module = ModuleType(module_name)
>
> module_file = open(file_name, 'r')
> exec module_file in modu
Hi all
I wonder if I can import a file with other file extensions ?
Can I do that only with python?
Thank you
Jia Lu
--
http://mail.python.org/mailman/listinfo/python-list
But you can do capsulation to them.
On 1月24日, 午後7:50, "techtonik" <[EMAIL PROTECTED]> wrote:
> A: Because you need three modules to parse, edit and reassemble query
> string. urlparse, cgi and urllib
--
http://mail.python.org/mailman/listinfo/python-list
Hi all
I want to study twisted of python . But I donot know how to start.
Any suggistions?
Thank you
--
http://mail.python.org/mailman/listinfo/python-list
Hi all.
I am using a hosting space with python cgi.
But this host haven't got MySQLdb installed.
Is there any methods to connect to Mysql without MySQLdb.
Or any other DB methods with original python release?
Thanx
--
http://mail.python.org/mailman/listinfo/python-list
Paul McGuire のメッセージ:
> AUTOCOMMIT is a dangerous crutch, beware. Ok for single record updates, but
> if you need to update 2 records in synch, AUTOCOMMIT leaves you open to
> hard-to-debug bugs (will work ok in development under light load, then fail
> intermittently with concurrent users).
Tha
Hi all.
I use cx_Oracle to connect to an Oracle9i DB. And I want to turn on
AUTOCOMMIT function.
I see that cur.execute("SET AUTOCOMMIT ON") cannot work. Is there any
method to do that ??
Thanks a lot!
--
http://mail.python.org/mailman/listinfo/python-list
Franz Steinhaeusler wrote:
> Is it really an instance of wx.Frame?
> What do you get, if you make a "print self" statement?
sovled it
I think it is an installation problem.
I used yum on FC6 to install wxPython 2.6
But after that I got that error.
Now I uninstalled them and did an installation of
Robin Dunn wrote:
> Announcing
> --
Thanx.
But I found wxPy's release speed is too fast that we nearly cannot
catch up with it :)
--
http://mail.python.org/mailman/listinfo/python-list
> In Python, the real constructor is called __new__, >
> Carl Banks
But the code below won't invoke __new__:
[CODE]
class Test:
def __new__(self, value):
print "__new__",value
def __init__(self,value):
print "__init__",value
x = Test("testing")
[/CODE]
--
http://mail.p
Frank Millman のメッセージ:
> This works perfectly for me, using wxPython 2.6.3.2, on both Linux and
> Windows.
>
> What platform are you using?
Yes this works OK for me too on my FedoraCore 5, but cannot work on my
FedoraCore 6...
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden のメッセージ:
> Perhaps you could show us the code that's failing,
the code is :
#!/usr/bin/python -tt
__author__ = "Jia Lu <[EMAIL PROTECTED]>"
__verstion__ = "1.0.0"
import wx
class MyFrame(wx.Frame):
def __init__(self):
wx.Frame.__init
Hi all
I am using wxPy 2.6.3.2-2, But when run an application with self.Bind
, I got an error that there is no Bind.
How can I fix it. thanx
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Greetings,
>
> I am attempting to view all files in a directory and if those files
> have not been modified within the last couple days I will remove them.
> In order to do this I need to look at the file date modied and check
> the date. I know how to look at each file
Hi all.
I'm using wxPython 2.6.3.2-2 on FC 6.
I wrote a demo used 'self.Bind(xx)' but I got an error says:
" MyFrame instance has no attribute 'Bind' "
I did that when I used FC 5 and it worked.
Is new wxPy changed about the Bind method??
thanx
--
http://mail.python.org/mailman/list
Hi all.
After using python shell (IDLE) for a while, I typed commands below
to exit . But error ocurred.
>>> raise SystemExit
Traceback (most recent call last):
File "", line 1, in
raise SystemExit
SystemExit
>>> sys.exit(0)
Traceback (most recent call last):
File "", line 1, in
Thank you very much. I memoed all you views.
:)
--
http://mail.python.org/mailman/listinfo/python-list
Hi all
I have a list like:
>>> list
[1, 2, 3]
>>> list[1:]
[2, 3]
I want to get a string "2 3"
>>> str(list[1:])
'[2, 3]'
How can I do that ?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Hi all:
I try to do things below:
>>>import sys
>>> for i in sys.modules.keys():
import i
Traceback (most recent call last):
File "", line 2, in
import i
ImportError: No module named i
But it seems that import donot know what is i ? why?
Thanks/
--
http://mail.python.org/mailman
> try:
> import curses
> except ImportError:
> print "Missing the Curses-library."
> print "Please install the curses-library correctly."
> SystemExit
~
Does this work ? Maybe *raise SystemExit* ??
--
http://mail.python.org/mailman/listinfo
Hi all.
I wrote a program to get key press and echo to the screen at once. But
I found I must use refresh() to let it show in the screen.
Is there a method which can show charactors at once without refresh()
??
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Hi all
I write a program to detect key press,but , why there is a *space*
before the character I typed.??
#!/usr/bin/env python
import sys
import tty
import termios
i = sys.stdin.fileno()
o = sys.stdout.fileno()
backup = termios.tcgetattr(i)
def loop():
while 1:
ch =
Hi all,
I want to deal keyboard event in Linux console.
Example: I Create a deamon at background and when I press F1 key then
print Hello at Console.
Can python do it? with which module?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
hello,all.
I wrote a module in C as below, BUT msg() method cannot work
allright.
#include
#include
static PyObject *Roka_msg(PyObject *self,PyObject *args)
{
printf("Roka Python lib. Version 1.0\n");
}
static PyObject *Roka_func(PyObject *self,PyObject *args)
{
long arg;
38 matches
Mail list logo