I wrote a GUI program on windows. (python & wxPython)
One function is to refresh the data from the COM Object continously.
In the beginning, I used the thread.start_new_thread(xxx,())
But no matter how i try, it will cause the win32com error.
After that, i use the wx.Timer to do the refresh functi
Andrew Dalke wrote:
> Peter Dembinski wrote:
>> If you want to redirect me to Google, don't bother. IMO ninety percent
>> of writings found on WWW is just a garbage.
>
> Sturgeon's law: Ninety percent of everything is crap.
does that apply to sturgeon's law itself?
(fwiw, this is of course why
On Friday 13 May 2005 03:11, Bengt Richter wrote:
> >>> type(obj).mro()
>
> [, , ,
> , ]
>
Wow! No need to write a depth-first tree-traversal algorithm... Somebody add
this idiom to the cookbook.
--- Heiko.
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard wrote:
> Ron Adam wrote:
>
>>What I would like to see is something like the following for each item:
>>
>>0. reference @ sequence code
>>2. "Builtin" | "import "
>>3. Type/class: Name/Syntax
>>4. Description with examples
>>6. Links to other references of this item in docs
>>7. Lin
"Fredrik Lundh" <[EMAIL PROTECTED]> writes:
> does that apply to sturgeon's law itself?
>
> (fwiw, this is of course why google displays 10 results on the
> first page. according to the law, one of them is always exactly
> what you want).
+ 1 QOTW :-)
--
# Edvard Majakari Software
Hmmm, the following session causes me some concern:
>>> print a
$(which sh) ${HOME/b/k} 'the dog'
>>> print b
/bin/sh /home/kill the dog
>>> shlex.split(a)
['$(which', 'sh)', '${HOME/b/k}', 'the dog']
>>> shlex.split(b)
['/bin/sh', '/home/kill', 'the', 'dog']
I started with a, which contains the
Hi everybody,
i´m writing an applications under wxphython and i need to print some
data in an external printer (usb, parallel, i suppose that it doesn´t
mind. Excuse me for the (maybe) stupid question but, how can i do it?
where can i found information about it?
Thanks a lot,
greetings
--
http:/
Trying to process xml (xml-rpx) with a handler in mod_python crashes
mod_python. Previous versions worked fine. Only change is I recompiled
with newest versions of Apache, Python, and mod_python. No PHP or
anything like that involved. Any idea why it seg faults when I try to
import xmlrpclib an
[Alex Moreno]
|
| i´m writing an applications under wxphython and i need to print some
| data in an external printer (usb, parallel, i suppose that it doesn´t
| mind. Excuse me for the (maybe) stupid question but, how can i do it?
| where can i found information about it?
Seems to be a popular su
> I think you will continue to have
> difficulty getting respect on this
> matter as long as you show disrespect
> to those who have come before you.
> ...
Dear Ron Adam and other good people,
I respect people and I respect truth. And, the priority is truth first.
The software community, is one
Xah Lee wrote:
> I respect people
and I was convinced he was going to show different:
> The software community, is one fucked up ball, and in part, because
just one person sees the light...
> people respect not people nor truth. They respect their own asses,
Then you must be the #1 fine exam
I am trying to extract some information from a few web pages, and I was
using the HTMLParser module. It worked fine until it got to the
javascript, at which it gave a parse error. Is there a good way to work
around this or should I just preparse the file to remove the javascript
manually? This is m
Ivan Van Laningham wrote:
> Hi All--
> Yes. There are multiple ways I can correct myself, some, I'm sure,
> involving chains and whips.
Well, if you like it...
> But you're all missing the point:
> Christopher is right! Python docs are not as good as PHP docs.
That's a POV, not a fact.
> Wh
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I am trying to extract some information from a few web pages, and I was
> using the HTMLParser module. It worked fine until it got to the
> javascript, at which it gave a parse error.
It's fairly common for pages with Javascript to al
On Sat, 7 May 2005 13:51:40 +0200, rumours say that "Anthra Norell"
<[EMAIL PROTECTED]> might have written:
>Here's the challenge. Prove this breakable
>
>'\x10\x88d\x1d\xba\xa1\xdcK\x05w\x02/s\xa7Q0\xeb8\xb6Gx\xef\xcb\x1e=\xf5\x7f
>\x9bI\xcb(\x87>\xa5\x04\xc1soF\xfd\xc6\xc6\xd9|\x971\xdb\xcdT\tw#
Python-list,您好!
What is the "property" mean in the python? Who can explain it for me?
I don't know how to use it.
致
礼!
皮大庆
[EMAIL PROTECTED]
2005-05-13
--
http://mail.python.org/mailman/listinfo/python-list
python,您好!
What is the "property" mean in the python? Who can explain it for me?
I don't know how to use it.
致
礼!
皮大庆
[EMAIL PROTECTED]
2005-05-13
--
http://mail.python.org/mailman/listinfo/python-list
--
http://mail.python.org/mailman/listinfo/python-list
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Kay Schluehr wrote:
>
> Why this? eval() consumes a string, produces a code object and executes
> it. Wether the code-object is bytecode or a chunk of machine code makes
> a difference in the runtime but does not alter the high level
> behavioural description of eval(). In either way the comp
Stelios Xanthakis wrote:
> Kay Schluehr wrote:
>
>>
>> Yes. What we are seeking for and this may be the meaning of Armins
>> intentiously provocative statement about the speed of running HLLs is a
>> successor of the C-language and not just another VM interpreter that is
>> written in C and limits
Anthra Norell wrote:
> Thanks a lot for the feedback. This is certainly a great learning
> experience. It's a fascinating topic too. Without wishing to annoy,
I'd be
> interested in knowing more. I insert questions below.
>
>
You can google your questions and you will find them out answered in
man
i wanted to define a function where the number of argument matters.
Example:
def Range(n):
return range(n+1)
def Range(n,m):
return range(n,m+1)
def Range(n,m,step):
return range(n,m+1,step)
this obvious doesn't work. The default argument like
Range(n=1,m,step=1) obviously isn't a s
Armin Steinhoff wrote:
>>
>> pyvm has that. A big part of it is written in "lightweight C++" [1].
>
>
> Realy ? I have downloaded the lwc distribution and checked it out.
> It was a surprise that none of the examples are working.
> I'm using SuSE 9.0 with gcc 3.3.1 ...
>
:(
> Is there a work
Stelios Xanthakis wrote:
>
> Also, for the other part of the thread, I think that bytecode may
> be in fact faster than machine code JIT.
Forgot to add: It depends of course on how good is the bytecode.
IMO Python's bytecode is pretty good for its purpose which is
executing a dynamic language w
> The problem for me is that the pointer "p" in the last function points
> to the arguments:
> If a user caller foo("123") - p points to '123'.
> What I need is to point it to the whole string received - 'foo
> ("123")'.
>
> Is there a way I can do this?
no. at least not a simple one. you can obta
Hi,
> Calling a python method from C++ has the following signature:
>
> PyObject *
> PyObject_CallMethod(PyObject *self, char *method_name,
> char *arg_format, ...);
>
> I'm having trouble figuring out how to declare self.
>
> Let's say my python file is called stuff.py and is
Dear All,
email.Message module base we can build message
for mailing services which is like php Mail_mime
module. In php Mail_mime module willautomatically
build all the header fields like content-type,
content-Transfer-encoding, Return-Path and so on for
a mailing messages. I want to know th
using default args does actually solve it
what about
def Range(n, m=None, step=None)
if step==None:
if m==None:
range(n)
else:
range(n,m)
else:
if m==None:
raise Exception, "missing parameter m"
else:
range(n,m,step)
can be optimized i am sure :-)
--
On 5/13/05, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> using default args does actually solve it
> what about
> def Range(n, m=None, step=None)
> if step==None:
> if m==None:
> range(n)
> else:
<...snip...>
or better still :
def Range(*args):
return range(*args)
Regards
Colin J. Williams schrieb:
> Thomas Pfaff wrote:
>
>> Hello all,
>>
>> I started using the nice Pythonwin IDE together with Python 2.3 (I have
>> come to prefer its editor to IDLE).
>> My problem is, that when I want to run a script in the debugger, I can
>> give the script name and arguments, but
Here's a first attempt at trusted python. I would be grateful if any
python gurus could point out the, no doubt obvious, flaws.
I've stopped fileobject working with patches to fileobject and
frameobject. All child frames of the first 'trusted' frame are trusted
(checked using inspect.getouterfram
On 13 May 2005 02:52:34 -0700,
"Xah Lee" <[EMAIL PROTECTED]> wrote:
> i wanted to define a function where the number of argument matters.
> Example:
> def Range(n):
> return range(n+1)
> def Range(n,m):
> return range(n,m+1)
> def Range(n,m,step):
> return range(n,m+1,step)
> this
You could pass the directory in as an optional extra argument
to the script. Alternately, you might accept either a bare file name
or a full path.
Roger
--
This signature was intentionally left blank.
(except it's not, wtf ??)
"Thomas Pfaff" <[EMAIL PROTECTED]> wrote in messag
Look for:
http://sourceforge.net/projects/pymaillib/
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 13 May 2005 11:52:34 +0200, Xah Lee <[EMAIL PROTECTED]> wrote:
> i wanted to define a function where the number of argument matters.
> Example:
>
> def Range(n):
> return range(n+1)
>
> def Range(n,m):
> return range(n,m+1)
>
> def Range(n,m,step):
> return range(n,m+1,step)
>
Stelios Xanthakis wrote:
> Armin Steinhoff wrote:
>
>>>
>>> pyvm has that. A big part of it is written in "lightweight C++" [1].
>>
>>
>>
>> Realy ? I have downloaded the lwc distribution and checked it out.
>> It was a surprise that none of the examples are working.
>> I'm using SuSE 9.0 with g
On Fri, 13 May 2005 14:57:26 +0800, Austin <[EMAIL PROTECTED]> wrote:
>I wrote a GUI program on windows. (python & wxPython)
>One function is to refresh the data from the COM Object continously.
>In the beginning, I used the thread.start_new_thread(xxx,())
>But no matter how i try, it will cause th
On Fri, 13 May 2005 02:52:34 -0700, Xah Lee wrote:
> i wanted to define a function where the number of argument matters.
> Example:
>
> def Range(n):
> return range(n+1)
>
> def Range(n,m):
> return range(n,m+1)
>
> def Range(n,m,step):
> return range(n,m+1,step)
>
> this obvious d
> def Range(n,m=None,step=1):
> if m is None:
> n,m = 0,n+1
> else:
> n,m = n,m+1
> return range(n,m,step)
i like this one.
coming from php (just a couple weeks ago) its always again interesting
to see how i have to start thinking to program differently, it can be
so much easier wi
Roger Upole schrieb:
> You could pass the directory in as an optional extra argument
> to the script. Alternately, you might accept either a bare file name
> or a full path.
>
> Roger
>
>
Yes, that's true, and I suppose it's good programming style not to
depend on a special working dir
At the interactive prompt, a result is printed when both these things
are true:
* The entered code is an expression, not any other kind of statement
* The result of the expression is not 'None'
If an expression occurs, information about it will be printed instead.
So the interpreter won't
Hi,
I have a wxPython application that call makes a thread (with threading
module). In some moment i've to stop the thread but i need to finish a
funtion in the thread before it can stop. How can i achive this?
Thanks in advance
Zunbletz
--
http://mail.python.org/mailman/listinfo/python-list
Zunbeltz Izaola wrote:
> I have a wxPython application that call makes a thread (with threading
> module). In some moment i've to stop the thread but i need to finish a
> funtion in the thread before it can stop. How can i achive this?
How did you intend to stop the thread in a manner which might
I must be doing something wrong, but for the life of me, I can't figure
out what. Here's the code snippet which is giving me grief:
print type(number), type(name), type(seconds // 60), type(seconds % 60)
print "\t\t\t\n"
% [number, name, seconds // 60, seconds % 60]
(These are lines 49 and 50 of
i was already searching and remember i had seen something like "its not needed".
Anyway, are there any doc tags, like in Java/PHPDoc etc, where you can
describe parameters (@param[eter]), return values (@ret[urn]),
attributes (@var), references (@see), etc?
I guess I have just not found the link
Hi.
I'm trying to store a text within a MySQL field (v 3.23.58) by using
MySQLdb
(v 1.2.1c3).
The text is: "telephone..." (note the last character)
And I get this error message:
---
File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line
33, in defaulterrorhandler
raise
[EMAIL PROTECTED] wrote:
> I must be doing something wrong, but for the life of me, I can't figure
> out what. Here's the code snippet which is giving me grief:
>
> print type(number), type(name), type(seconds // 60), type(seconds % 60)
> print "\t\t\t\n"
> % [number, name, seconds // 60, seconds
"[EMAIL PROTECTED]"
> I'm trying to store a text within a MySQL field (v 3.23.58) by using
> MySQLdb
> (v 1.2.1c3).
>
> The text is: "telephone..." (note the last character)
>
> And I get this error message:
> ---
> File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line
> 33,
In python they are called decorators, but I've never had a
need to use them myself, but then I'm a little old fashioned.
Larry Bates
Wolfram Kriesing wrote:
> i was already searching and remember i had seen something like "its not
> needed".
>
> Anyway, are there any doc tags, like in Java/PHPD
The argument to string format expression needs to be a tuple not a list.
Also, all the string escaping makes this very hard to read. You can
mix single and double quotes to achieve:
print '\t\t\t\n' % \
(number, name, seconds // 60, seconds % 60)
which IMHO is much easier to read.
Larry
Wolfram Kriesing wrote:
> i was already searching and remember i had seen something like "its not
> needed".
>
> Anyway, are there any doc tags, like in Java/PHPDoc etc, where you can
> describe parameters (@param[eter]), return values (@ret[urn]),
> attributes (@var), references (@see), etc?
>
If I try
>>> 2 < array([1,2,3])
I get:
array([0, 0, 1], type=Bool)
which is pretty slick, However if I set
>>> q = 2 < array([1,2,3])
>>> q and q
I get a runtime error: "An array doesn't make sense as a truth value."
So.. why not? It seems to me that if I could vectorize logical
expressions
On 2005-05-13, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Thu, 12 May 2005 15:34:39 -, Grant Edwards <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>> I think the use of forward slashes for command line switches
>> was adopted by CP/M from DEC's OSes (e.g. RSX-11).
Larry Bates wrote:
> In python they are called decorators, but I've never had a
> need to use them myself, but then I'm a little old fashioned.
Decorators only work on function and method definitions. I don't think
that's what Wolfram is referring to.
> Larry Bates
>
> Wolfram Kriesing wrote:
>
[EMAIL PROTECTED] wrote:
>
> Traceback (most recent call last):
> File "X:\Music (FLAC)\Post-process new rips.py", line 50, in ?
> print "\t\t\t length=\"%i:%i\"/>\n" % [number, name, seconds // 60, seconds % 60]
> TypeError: int argument required
>
> Wait, what? The first line clearly
On Fri, 13 May 2005 06:44:46 -0700, Robert Kern <[EMAIL PROTECTED]> wrote:
>Larry Bates wrote:
>> In python they are called decorators, but I've never had a
>> need to use them myself, but then I'm a little old fashioned.
>
>Decorators only work on function and method definitions. I don't think
>th
Hi Fredrik.
Thank you very much for your quick answer.
Do you suggest to change it by using regexp or must I encode the whole
texto into a suitable one?
Regards.
Fredrik Lundh wrote:
> "[EMAIL PROTECTED]"
>
> > I'm trying to store a text within a MySQL field (v 3.23.58) by
using
> > MySQLdb
> >
In comp.lang.perl.misc John Bokma <[EMAIL PROTECTED]> wrote:
> If you had really any point, you didn't need to swear in every third
> sentence. Nor bother so many groups with your rants.
> If you think it can be done better, pick up a part of documentation, and
> rewrite it. To make it very har
Wolfram Kriesing wrote:
> i was already searching and remember i had seen something like "its not
> needed".
>
> Anyway, are there any doc tags, like in Java/PHPDoc etc, where you can
> describe parameters (@param[eter]), return values (@ret[urn]),
> attributes (@var), references (@see), etc?
do
Hi Fredrik,
thank you very much for your articles (especially that on
import-confusion). At last I grasped, also if not thorougly, the import
mechanism. What cleared my doubts was your recursive import paragraph.
In the Guido's "Python Reference Manual" he says:
"Import statements are executed in t
*hides face* Groan! This is what I get for trying to code first thing
in the morning. Thanks, all, it works fine now...
--
http://mail.python.org/mailman/listinfo/python-list
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 12 May 2005 15:34:39 -, Grant Edwards <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
>> I think the use of forward slashes for command line switches
>> was adopted by CP/M from DE
#! rnews 2528
Newsgroups: comp.lang.python
Path:
news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!attws2!ip.att.net!NetNews1!xyzzy!nntp
From: Harry George <[EMAIL PROTECTED]>
Subject: Re: String formatting strangeness
X-Nnt
Bengt Richter wrote:
> >>> type(obj)
>
> >>> type(obj).mro()
> [, , ,
> [, ]
> >>> tuple(x.__name__ for x in type(obj).mro())
> ('A', 'B1', 'B2', 'C', 'object')
Wow awesome, thats exactly what I was looking for. I hate to bring up the
documentation thing again...but.where the hell is
Matt Feinstein wrote:
> If I try
>
>
2 < array([1,2,3])
>
>
> I get:
>
> array([0, 0, 1], type=Bool)
>
> which is pretty slick, However if I set
>
>
q = 2 < array([1,2,3])
q and q
>
>
> I get a runtime error: "An array doesn't make sense as a truth value."
>
> So.. why not?
bruno modulix wrote:
>
> I fail to see why would it would be better to have to open a browser, go
> to python.org, go to the doc, find the right link etc instead of just
> typing dir(xxx) and/or help(xxx).
Well, for those with Windows machines, the documentation is a simple
Start->All Programs
Hi,
do you know if is there any 'Dive into Python' equivalent for the java
language?
DiP is the best I've seen and I would need to learn some basics of Java
and also ways to interact between the two languages. (I'm already aware
of Jpype and Jython)
Luis
--
http://mail.python.org/mailman/lis
On Fri, 13 May 2005 09:10:13 -0400, Peter Hansen wrote:
>
> How did you intend to stop the thread in a manner which might be unsafe?
> (Hint, unless you're doing something unusual, you can't.)
>
I have a threaded object (Mythread). It checks if want_thread
variable is True to return. The proble
Christopher J. Bottaro wrote:
> Bengt Richter wrote:
>
>> >>> type(obj)
>>
>> >>> type(obj).mro()
>> [, , ,
>> [, ]
>> >>> tuple(x.__name__ for x in type(obj).mro())
>> ('A', 'B1', 'B2', 'C', 'object')
>
> Wow awesome, thats exactly what I was looking for.
Wait a sec...why doesn't the f
Hello all,
I have a username variable luser:
luser = win32api.GetUserName
I need to insert it into the following to replace the hardcoded
"johndoe" in the pathname of GIS.GIS.Parcels:
GIS_GIS_Parcels = "Database
[EMAIL PROTECTED]"
Thanks in advance,
plsullivan
--
http://mail.python.org/mailm
[EMAIL PROTECTED]
|
| Hello all,
| I have a username variable luser:
|
| luser = win32api.GetUserName
|
| I need to insert it into the following to replace the hardcoded
| "johndoe" in the pathname of GIS.GIS.Parcels:
|
| GIS_GIS_Parcels = "Database
| [EMAIL PROTECTED]
| .GIS.Parcels"
Just in
import win32api
GIS_GIS_Parcels = "Database
[EMAIL PROTECTED]"
% (win32api.GetUserName())
HTH
--
http://mail.python.org/mailman/listinfo/python-list
Armin Steinhoff wrote:
>>> Is there a working version of lwc ???
>>>
>>
>> pyvm is written in lwc-2.0 which is not yet released because
>> nobody's using it.
>
>
> As you mentioned it ... lwc-2.0 is used for pyvm. So it is used :)
>
> Do you have an idea when lwc-2.0 will be releast ?
>
> Ever
[EMAIL PROTECTED] wrote:
> > > File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py",
> line
> > > 33, in defaulterrorhandler
> > > raise errorclass, errorvalue
> > > UnicodeEncodeError: 'latin-1' codec can't encode character
> u'\u2026' in
> > > position 288: ordinal not in range(256
I've to use ConfigParser.
It returns values that are exactly in the config file, so get string
variables like:
int1 with quotes and characers: "42"
this is easy to convert to int:
realint = int(int1)
I've read the tutorial, and the FAQ, and not sure if I missed it, but
other than calling eval (wh
Fredrik Lundh wrote:
> [...]
> if you want more control of the replacement, you can skip the translate
> step and use your own error handler, e.g.
>
> charmap = ... see above ...
>
> def fixunicode(info):
> s = info.object[info.start:info.end]
> try:
> return
Hi,
Read this:
http://www.python.org/2.2.3/descrintro.html#property
If you still don't understand or are confused about it's usage, ask here.
Hint: Suppose you need to create an Age class with a 'years' attribute
and ensure that, (assuming I create an object a = Age())
1) when one tries to acces
"Eli" <[EMAIL PROTECTED]> wrote:
> Thanks for the answer; I should better explain my problem.
that's always a good idea ;-)
> So a solution would be creating 'function 1' which preprocess the input
> and calls the original function 1, than do so for any other function.
> This works, but there ar
"Michael" wrote:
> Trying to process xml (xml-rpx) with a handler in mod_python crashes
> mod_python. Previous versions worked fine. Only change is I recompiled
> with newest versions of Apache, Python, and mod_python. No PHP or
> anything like that involved. Any idea why it seg faults when I try
wrote:
> In comp.lang.perl.misc John Bokma <[EMAIL PROTECTED]> wrote:
[ @55, |@#~~|!! ]
> Oh please let him use an ass...
Ok, he is allowed to use ass in examples, e.g. (Perl)
s/ass/domesticated donkey/g;
(Maybe to explain \b ? )
--
John Small Perl scripts: http://johnbok
On Fri, 13 May 2005 16:47:34 +0200, Zunbeltz Izaola <[EMAIL PROTECTED]> wrote:
>On Fri, 13 May 2005 09:10:13 -0400, Peter Hansen wrote:
>
>>
>> How did you intend to stop the thread in a manner which might be unsafe?
>> (Hint, unless you're doing something unusual, you can't.)
>>
>
>I have a thread
I'm trying to execute doc tests without writing to the filesystem (i.e.
in the Python interpreter). I have something like:
"""
Docstring:
>>> n
6
"""
# Code:
n=6
import doctest
doctest.testmod()
The tests all pass when saving this text to a python script (as it
should), but wh
Christopher J. Bottaro wrote:
> Christopher J. Bottaro wrote:
>
> > Bengt Richter wrote:
> >
> >> >>> type(obj)
> >>
> >> >>> type(obj).mro()
> >> [, , ,
> >> [, ]
> >> >>> tuple(x.__name__ for x in type(obj).mro())
> >> ('A', 'B1', 'B2', 'C', 'object')
> >
> > Wow awesome, thats exactly w
"X-No-Archive: yes"
what I am looking for is
1. To create a list of different words of various lengths(1-15) using
A-Z,a-z,0-9 and punctuations.Basically anything that could be found on
a text document.
2. The words formed need not be meaningful .FOr example 'ajf' or
'fcjgdtfhbs' or even 'gfdew!
[EMAIL PROTECTED] wrote:
> "X-No-Archive: yes"
>
> what I am looking for is
>
> 1. To create a list of different words of various lengths(1-15) using
> A-Z,a-z,0-9 and punctuations.Basically anything that could be found on
> a text document.
>
> 2. The words formed need not be meaningful .FOr ex
X-No-Archive: yes
what I am looking for is
1. To create a list of different words of various lengths(1-15) using
A-Z,a-z,0-9 and punctuations.Basically anything that could be found on
a text document.
2. The words formed need not be meaningful .FOr example 'ajf' or
'fcjgdtfhbs' or even 'gfdew!' o
[EMAIL PROTECTED] wrote:
> if there is list1 = "[ 'filea', 'fileb', ]", I can get at list by
> doing:
> reallist = eval(list1)
> is there an easier/simpler method of doing the same thing as
realstring
> and reallist lines above?
http://twistedmatrix.com/users/moshez/unrepr.py
Example:
>>> from u
Hi Robert,
At first I thought it would be an interesting thing to have a little
swift module to create a database of all words in the dictionary.But
then I thought y just the words in the dictionary? y not all possible
words like 'and' and 'adn'. Just was inspired with the little idea of
if its an
[EMAIL PROTECTED] wrote:
> what I am looking for is
>
> 1. To create a list of different words of various lengths(1-15) using
> A-Z,a-z,0-9 and punctuations.Basically anything that could be found on
> a text document.
>
> 2. The words formed need not be meaningful .FOr example 'ajf' or
> 'fcjgdtfh
James, thank you very much for your answer.
Jaime
--
http://mail.python.org/mailman/listinfo/python-list
Im trying to make a simple TCP socket "relay" or "proxy", but my skills in
Python are not high (yet).
The only thing it should do, is to open the connection on behalf of the
client, and when the client closes the connection, it should do so too.
It's going to "relay" PCL and/or PostScript print
>
> code='"""\n>>> n\n6\n"""\nn=6\nimport doctest\ndoctest.testmod()'
> exec(code)
>
Remove 'doctest.tesmod()' and the import from your 'code' string.
]]] exec(code)
]]] import doctest
]]] doctest.testmod()
should do the trick.
Cheers,
SB
--
http://mail.python.org/mailman/listinfo/pytho
Zunbeltz Izaola wrote:
> On Fri, 13 May 2005 09:10:13 -0400, Peter Hansen wrote:
>>How did you intend to stop the thread in a manner which might be unsafe?
>>(Hint, unless you're doing something unusual, you can't.)
>
> I have a threaded object (Mythread). It checks if want_thread
> variable is Tr
[EMAIL PROTECTED] wrote:
> Hi Robert,
> At first I thought it would be an interesting thing to have a little
> swift module to create a database of all words in the dictionary.
Okay, take one more step back. Why is it interesting to have such a
dictionary? How do you intend to use it?
Having ans
On 13/5/05 03:35, in article
[EMAIL PROTECTED], "Robert Kern"
<[EMAIL PROTECTED]> wrote:
> baza wrote:
>> Where is the IDE in 'Tiger' for the mac? Don't tell me I have to use
>> text edit all the time??
>
> PythonIDE never came with the OS. You have to install it yourself.
>
> http://homepage
no specific number of words.
and I get a syntax error on line:
> words["".join(choice(alphabet) for i in range(randint(1,15)))] = None
--
http://mail.python.org/mailman/listinfo/python-list
On 13/5/05 03:35, in article
[EMAIL PROTECTED], "Robert Kern"
<[EMAIL PROTECTED]> wrote:
> baza wrote:
>> Where is the IDE in 'Tiger' for the mac? Don't tell me I have to use
>> text edit all the time??
>
> PythonIDE never came with the OS. You have to install it yourself.
>
> http://homepage
Christopher J. Bottaro wrote:
> Bengt Richter wrote:
>
>
>> >>> type(obj)
>>
>> >>> type(obj).mro()
>> [, , ,
>> [, ]
>> >>> tuple(x.__name__ for x in type(obj).mro())
>> ('A', 'B1', 'B2', 'C', 'object')
>
> Wow awesome, thats exactly what I was looking for. I hate to bring up the
> documentat
[EMAIL PROTECTED] wrote:
> I've to use ConfigParser.
>
> It returns values that are exactly in the config file, so get string
> variables like:
> int1 with quotes and characers: "42"
> this is easy to convert to int:
> realint = int(int1)
>
> I've read the tutorial, and the FAQ, and not sure if I
1 - 100 of 146 matches
Mail list logo