Simon Morgan wrote:
> Can somebody please explain to me why:
>
> class SomeClass:
> def __init__(self, contents=[]):
> self.contents = contents[:]
> def add(self, element):
> self.contents.append(element)
>
> when called a second time (i.e. to create a new instance of a S
rh0dium wrote:
> Hi all,
>
> I believe I am having a fundamental problem with my class and I can't
> seem to figure out what I am doing wrong. Basically I want a class
> which can do several specific ldap queries. So in my code I would have
> multiple searches. But I can't figure out how to do
John Machin <[EMAIL PROTECTED]> writes:
>>>My list is not arbitrary. I'm looking for all 'combinations' as I
>>>originally posted. Order does not matter to me... just all possibilities.
>> That's good, since you only need combinations of "a", "b" and "c" the
> "You keep using that word. I do not
Joseph Garvin wrote:
> Peter Hansen wrote:
>
>> (I believe this is something Guido considers an "abuse of *args", but
>> I just consider it an elegant use of zip() considering how the
>> language defines *args. YMMV]
>>
>> -Peter
>>
>>
> An abuse?! That's one of the most useful things to do w
Titi Anggono wrote:
> I've downloaded vrmlexport.py from:
> http://www.andrew.cmu.edu/user/mzk/vrmlexport/
...
> File "vrmlexport.py", line 220, in export_box
> if (new_axis.x!=0 or new_axis.y!=0 or
> new_axis.z!=0):
> UnboundLocalError: local variable 'new_axis'
> referenced before assignmen
Anand wrote:
>Hi
>
> Are there any tools that would help in porting code from
>Pyton 2.3 to 2.4 ? I have gone through the whatsnew documents
>and created a document comparing Python 2.4 to 2.3. But so far
>has not been able to find any tool that will signal code in
>Python 2.3 that can cause err
"Walter Brunswick" <[EMAIL PROTECTED]> wrote:
> Is there any way to [efficiently] iterate through a sequence of characters to
> find N [or more]
consecutive equivalent characters?
>
> So, for example, the string "taaypiqee88adbbba" would return 1 if the number
> (of consequtive
characters) suppl
Good luck, report back. My canonical 1st step w/stuff that looks like
NLP, is to flip thru the Jurafsky/Martin and Norvig Russell AI texts
and identify paths of least resistance, like naive Bayesian or LSI,
that have perl/python/ruby/C packages that i can thrash around in with
my data .
some othe
Hi
Are there any tools that would help in porting code from
Pyton 2.3 to 2.4 ? I have gone through the whatsnew documents
and created a document comparing Python 2.4 to 2.3. But so far
has not been able to find any tool that will signal code in
Python 2.3 that can cause errors in Python 2.4 .
Peter Hansen wrote:
>(I believe this is something Guido considers an "abuse of *args", but I
>just consider it an elegant use of zip() considering how the language
>defines *args. YMMV]
>
>-Peter
>
>
An abuse?! That's one of the most useful things to do with it. It's
transpose.
--
http://ma
Actually i went through the NLTK site tutorials and it has a steep
learning curve associated with it. Well if i can learn it, it will be
the best fit module for my app. But if it gets hard, i'll definitely
opt for the text indexers u gratefully pointed to me. Thanks.
--
http://mail.python.org/mai
Hi all,
I've downloaded vrmlexport.py from:
http://www.andrew.cmu.edu/user/mzk/vrmlexport/
and install it under /usr/lib/python2.2/lib-old
directory using command:
python vrmlexport.py
I got the following error:
=
Traceback (most recent call last):
Fi
Wendell III wrote:
>Hey,
>
>I'm looking for a few good Lua guys with some IM network experience.
>Anyone around fit that criteria?
>
>Bestest,
>-Wendell
>
>
I'd say it's a no brainer to try lua's mailing list ;)
--
http://mail.python.org/mailman/listinfo/python-list
Hey,
I'm looking for a few good Lua guys with some IM network experience.
Anyone around fit that criteria?
Bestest,
-Wendell
--
web: www.meetro.com phone: 312.275.7865 fax: 312.275.7865 icq: 12107743
skyp: wendell_iii msn: [EMAIL PROTECTED] gg: 7116285 aim: wadm00se
--
http://mail.pyt
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> >>> hex(75)
> '0x4b'
> >>> hex(75*256**4)
> '0x4BL'
>
> By accident or design? Apart from the aesthetic value that lowercase hex
> digits are ugly, should we care?
Use ('%x' % 75) or ('%X' % 75) if you care.
--
http://mail.python.org/mailman/
I have designed a project, gvpnc, that I think would be useful to the
folks out there who use GNOME and want a GNOME app to VPN into their
office with. It is simple, yes, but it works well (at least on my
Ubuntu 5.04). It is a front-end to the vpnc tool for Linux.
There is kvpnc, so I thought I wo
[Steven D'Aprano]
> (All previous quoting ruthlessly snipped.)
And ruthlessly appreciated ;-)
> A question for Tim Peters, as I guess he'll have the most experience in
> this sort of thing.
>
> With all the cross-platform hassles due to the various C compilers not
> implementing the IEEE standard
Stephen Toledo-Brown <[EMAIL PROTECTED]> writes:
> I've not tried Mac, but under both Windows and Linux on x86, I find
> Eclipse (3.0) is slow with less than 1.25 GB of RAM, reasonably fast
> with 1.5GB or more. Processor speed and disk speed don't seem to be
> anywhere near as important.
I've use
rh0dium wrote:
> Hi all,
>
> I believe I am having a fundamental problem with my class and I can't
> seem to figure out what I am doing wrong. Basically I want a class
> which can do several specific ldap queries. So in my code I would have
> multiple searches. But I can't figure out how to do
Andreas Kostyrka <[EMAIL PROTECTED]> writes:
> That doesn't change the contrary facts:
>
> -) the general threading programming model is very hard to get right.
> It's basically at the moment where we were with memory management at C
> level. Painful, and errorprone. Nothing to be happy about.
I'd
Walter Brunswick wrote:
> Is there any way to [efficiently] iterate through a sequence of characters to
> find N [or more] consecutive equivalent characters?
>
> So, for example, the string "taaypiqee88adbbba" would return 1 if the number
> (of consequtive characters) supplied in the parameters
Hi all,
I believe I am having a fundamental problem with my class and I can't
seem to figure out what I am doing wrong. Basically I want a class
which can do several specific ldap queries. So in my code I would have
multiple searches. But I can't figure out how to do it without it
barfing..
Th
Richard wrote:
> I have a large list of two element tuples. I want two separate
> lists: One list with the first element of every tuple, and the
> second list with the second element of every tuple.
Variant of Paul's example:
a = ((1,2), (3, 4), (5, 6), (7, 8), (9, 10))
zip(*a)
or
[list(t) for
Walter Brunswick wrote:
> Is there any way to [efficiently] iterate through a sequence of characters to
> find N [or more] consecutive equivalent characters?
>
> So, for example, the string "taaypiqee88adbbba" would return 1 if the number
> (of consequtive characters) supplied in the parameters
> Are there any decent python memory profilers available?
As part of Google's "summer of code", Nick Smallbone (mentored by Michael
Hudson and Jeremy Hylton) will be developing a Python memory profiler.
I think the fact that this was a project suggestion by the PSF, and that it was
accepted, i
To possibly clearify what the others have said, group() is the same as
saying group(0). Group is, if I recall correctly, supposed to return
the n-th subpattern from the regular expression (subpatterns, as you
know, being indicated by parenthises).
Hope that helps :)
-Wes
--
http://mail.python.or
Tim Williams (gmail) wrote:
> Using zipfile.Zipfile
>
> How can I add a file to a zip file and keep its date and time correct?
> Currently the date/time change to the time the file was added to the
> zip.Zipinfo doesn't have a write method!
>
> Solutions other than zipfile are welcome, with
Is there any way to [efficiently] iterate through a sequence of characters to
find N [or more] consecutive equivalent characters?
So, for example, the string "taaypiqee88adbbba" would return 1 if the number
(of consequtive characters) supplied in the parameters
of the function call was 2 or 3,
Richard <[EMAIL PROTECTED]> writes:
> I have a large list of two element tuples. I want two separate
> lists: One list with the first element of every tuple, and the
> second list with the second element of every tuple.
>
> I know I can use a 'for' loop and create two new lists
> using 'newList1.a
if t is your data, you can use:
l1, l2 = zip(*t)
Cyril
On 7/14/05, Richard <[EMAIL PROTECTED]> wrote:
I have a large list of two element tuples. I want two separatelists: One list with the first element of every tuple, and thesecond list with the second element of every tuple.Each tuple contains
I have a large list of two element tuples. I want two separate
lists: One list with the first element of every tuple, and the
second list with the second element of every tuple.
Each tuple contains a datetime object followed by an integer.
Here is a small sample of the original list:
((dateti
Fantastic. May I ask what you are hoping to use it for?
I checked out Scientific python:
http://starship.python.net/~hinsen/ScientificPython/
It has a module with multivariate polynomials with support for a good
functionality but I think the input style won't suit my needs. In any
case, perhaps i
"edgrsprj" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Hank Oredson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> "edgrsprj" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> > "Hank Oredson" <[EMAIL PROTECTED]> wrote in message
>> > news:[EMA
When I add files to my .ZIP files using python zipfile module
the date/time that is stored in mine is the one that comes from
the file's attributes. I'm not sure I understand why you think
yours are not.
-Larry Bates
Tim Williams (gmail) wrote:
> Using zipfile.Zipfile
>
> How can I add a file
Larry Bates wrote:
> I recently upgraded from 2.2 to 2.4 (ActiveState for Windows).
> I was accustomed to having the most recent 10 files that I had
> edited show up under File menu under Recent.
"File menu" of what? Let's guess that you mean Pythonwin.
The problem is now fixed. It is possible th
Using zipfile.Zipfile
How can I add a file to a zip file and keep its date and time correct?
Currently the date/time change to the time the file was added to the
zip.Zipinfo doesn't have a write method!
Solutions other than zipfile are welcome, with snippets if possible :)
ginmf in this ins
Larry Bates said unto the world upon 13/07/2005 15:54:
> I recently upgraded from 2.2 to 2.4 (ActiveState for Windows).
> I was accustomed to having the most recent 10 files that I had
> edited show up under File menu under Recent. After upgrading
> these don't seem to be saved after exiting. I t
rbt wrote:
> On Wed, 2005-07-13 at 10:21 -0400, rbt wrote:
>
>>Say I have a list that has 3 letters in it:
>>
>>['a', 'b', 'c']
>>
>>I want to print all the possible 4 digit combinations of those 3
>>letters:
>>
>>4^3 = 64
>>
>>
>>abaa
>>aaba
>>aaab
>>acaa
>>aaca
>>aaac
>>...
>>
>>What is the
Wow that is pretty stupid of me. Yeah I was searching "python
timeoutsocket.py" and that doesn't give any good results :P Thanks
guys!
Scott
--
http://mail.python.org/mailman/listinfo/python-list
Thank you, Peter. Your point is well taken. We a control system, but
I just never got around to using it. I think now I'll get a round to
it. :)
Thanks again,
Joe
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> On Wed, 13 Jul 2005 10:39:41 -0400, rbt wrote:
[snip]
> Ah, then that's easy. Sit down with pencil and paper, write out all 64
> combinations yourself, and then type them into a Python list. Then you can
> access any one of those combinations with a single call.
[snip]
>>My
Unfortunately I am stuck with Python 2.2 (I don't think the sysadmins
like me), so that's not an option. Thanks though.
Scott
--
http://mail.python.org/mailman/listinfo/python-list
Why doesn't group have an argument? group() or group(0) returns what
the pattern matched, not what it returns.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Can anybody provide a mirror for this module? The original URL seems to
> be down. I have been looking for over an hour, and every single
> resource that uses it links to the timo-tasi.org site to download it.
Google returns several sites which link directly to their own
Joe wrote:
> I have the executable of a script that I wrote, that has been erased.
> Is there any way to retrieve the uncompiled python script from the
> executable that was created with py2exe?
The .pyc files are in a file called library.zip, and they're pretty easy
to extract.
To convert .pyc
[EMAIL PROTECTED] wrote:
> Can anybody provide a mirror for this module? The original URL seems to
> be down. I have been looking for over an hour, and every single
> resource that uses it links to the timo-tasi.org site to download it.
FWIW, Python 2.3+ has the timeout functionality built in, so
[EMAIL PROTECTED] wrote:
> I'm trying to open a text file, remove all instances of the words
> "f=x;" and "i=x;" where x can be any number 0-14. Also, I want to
> remove all { " or ) or ( or ' } each time one of those characters
> occurs respectively. This is what I've been able to piece toge
rbt wrote:
> Say I have a list that has 3 letters in it:
>
> ['a', 'b', 'c']
>
> I want to print all the possible 4 digit combinations of those 3
> letters:
>
> 4^3 = 64
Should be 3**4 = 81.
>
>
> abaa
> aaba
> aaab
> acaa
> aaca
> aaac
> ...
>
> What is the most efficient way to do this?
Can anybody provide a mirror for this module? The original URL seems to
be down. I have been looking for over an hour, and every single
resource that uses it links to the timo-tasi.org site to download it.
Thanks!
Scott Kilpatrick
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 13 Jul 2005 23:25:46 +0300, Elmo Mäntynen wrote:
> On Wed, 13 Jul 2005 23:22:01 +0300, Elmo Mäntynen wrote:
>
>> On Wed, 13 Jul 2005 15:49:27 +0300, Elmo Mäntynen wrote:
>>
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA1
>>>
>>> I'm interested in various metadata
>>> extraction/pr
This is a complete shot in the dark but you might want to
sys.stdout.flush() between print calls?
--
http://mail.python.org/mailman/listinfo/python-list
Hi David,
b.group() is equivalent to b.group(0), the entire RE
match. (^(.*?)\.) will give you 'dfsf.' for that input string.
What you want is b.group(1), the subgroup you're looking for inside
the main RE. (.*?) which gives you 'dfsf', which is what you're
looking for.
Cheers,
# string s simulating an html file
s='ffy: ytrty python fyt wx dtrtf'
p=re.compile(r'\bhref\b',re.I)
list=p.split(s) #< gets you your final list.
good luck,
Joe
--
http://mail.python.org/mailman/listinfo/python-list
Hi there.
I am doing a bunch of processing over a list of lists, and am
interested in doing several things taht don't seem to be working for me
just at the moment.
I have a list of books with several fields (Title, Author1, Author2,
Publisher, ISBN) in a csv.
I have a cell.txt file that looks l
I have a rather large python application (uses around 40MB of memory to
start) that gradually chews up memory over many hours. I've done a
little googling around, but it looks like I'm faced with prowling
through the gc.get_objects() myself. I need a tool to identify where
the memory is going. It m
I am having trouble trying to figure out how to use Tix widgets
in a Python program. The documentation is scanty and in
TCL syntax with no examples. Specifically, I'm trying to use
a Tix ComboBox widget and haven't been able to figure out
how to initialize the set of values in the widget's lis
Hello
It seems the grouping feature isn't behaving correctly.
In [1]: a = 'dfsf.oct.ocfe'
In [2]: b = re.match(r'^(.*?)\.', a); b.group()
'dfsf.'
The expected result is 'dfsf'. Why did the regexp grab that period at
the end?
David
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
First ;-) I don't know Tk or plot, but from looking at your code I see you want
to plot
a line a minute long, after that, all dots are drawn to the screen. You call
>self.graph.addSet(x,y)
My guess is that you have to explicitly draw to the screen using same call from
graph
>I have the executable of a script that I wrote, that has been erased.
>Is there any way to retrieve the uncompiled python script from the
>executable that was created with py2exe?
You're gonna need a case of 20-weight ball bearings and several quarts
of antifreeze. Preferably Quakerstate. No, be
First, in your intro you say you want to remove all strings of the form
"f=n;" where n can be 0-14. So you want to remove "f=0;" and "f=1;" and
... Later, you appear to be trying to remove "f=;" which may be what
you want but it doesn't match your described intentions.
Second, the formatting (whit
On Wed, 13 Jul 2005 23:22:01 +0300, Elmo Mäntynen wrote:
> On Wed, 13 Jul 2005 15:49:27 +0300, Elmo Mäntynen wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> I'm interested in various metadata
>> extraction/prosessing/distribution/something tools(including ways of
>> differenti
"Hank Oredson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "edgrsprj" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > "Hank Oredson" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >> "edgrsprj" <[EMAIL PROTECTED]> wrote in message
> >> news:[EM
On Wed, 13 Jul 2005 15:49:27 +0300, Elmo Mäntynen wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> I'm interested in various metadata
> extraction/prosessing/distribution/something tools(including ways of
> differentiating between files, eg hashing etc) and especially python
> enabled
On Tue, 12 Jul 2005 18:56:30 -0700, Chris wrote:
> Does anyone know of a good standalone implementation of multivariable
> polynomials in python?
>
> Thanks,
> Chris
I'm interested also, and am posting this in the hope that being now a
multipostthread with a plus sign next to it, someone more kn
Hi, First, I want to thank those who responded to my question about "the plot module" yesterday. I realize now that the question could have been vague. There is a plot module, simply called "plot," that I am using, and I guess it is not a very widely circulated plotting utility. Anyway, I
On Wed, 13 Jul 2005 15:49:27 +0300, Elmo Mäntynen wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> I'm interested in various metadata
> extraction/prosessing/distribution/something tools(including ways of
> differentiating between files, eg hashing etc) and especially python
> enabled
Hi,
Can somebody please explain to me why:
class SomeClass:
def __init__(self, contents=[]):
self.contents = contents[:]
def add(self, element):
self.contents.append(element)
when called a second time (i.e. to create a new instance of a SomeClass
object) results in self.c
On Wed, 13 Jul 2005 15:22:35 -0400, Chris Lambacher <[EMAIL PROTECTED]> wrote:
>reverse dns lookup is not really special compared to a regular dns lookup.
>you just need to look up a special name:
>http://www.dnsstuff.com/info/revdns.htm
>
>to format the ip address properly use something like:
>def
I recently upgraded from 2.2 to 2.4 (ActiveState for Windows).
I was accustomed to having the most recent 10 files that I had
edited show up under File menu under Recent. After upgrading
these don't seem to be saved after exiting. I tried changing
the number in the Preferences, but nothing seems
"George Sakkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "rbt" <[EMAIL PROTECTED]> wrote:
>
> > Say I have a list that has 3 letters in it:
> >
> > ['a', 'b', 'c']
> >
> > I want to print all the possible 4 digit combinations of those 3
> > letters:
> >
> > 4^3 = 64
>
>
> It's
reverse dns lookup is not really special compared to a regular dns lookup.
you just need to look up a special name:
http://www.dnsstuff.com/info/revdns.htm
to format the ip address properly use something like:
def rev_dns_string(ip_str):
nums = ip_str.split('.').reverse()
nums.extend(('in-
QOTW: "The posts do share an erroneous, implied assumption that the
investment in learning each language is equal. Python has a strong
competitive advantage over Java and C++ in terms of learnability. A
person can get up to speed in a few days with Python." - Raymond Hettinger
"You know, this is
Hi,
> for punctuation in punctuations:
> line=line.replace(punctuation,'')
I would use maketrans or even a regex instead. However, If you care
about speed, it is well known that in some cases regex take more
time than multiple replaces. Even the maketrans could take more time
(I don't
"rbt" <[EMAIL PROTECTED]> wrote:
> Say I have a list that has 3 letters in it:
>
> ['a', 'b', 'c']
>
> I want to print all the possible 4 digit combinations of those 3
> letters:
>
> 4^3 = 64
It's actually 3^4 = 81 (3 candidates/choice ** 4 choices)
>
> abaa
> aaba
> aaab
> acaa
> aaca
> a
You probably need to remove the SpawnInstance_() call.
An abstract WMI class as returned by WBEM.Get should work
for the DriverInfo parm, since the concrete Win32_PrinterDriver
instance is what the AddPrinterDriver call is trying to create.
hth
Roger
<[EMAIL PROTECTED]> wrote in messa
I have the executable of a script that I wrote, that has been erased.
Is there any way to retrieve the uncompiled python script from the
executable that was created with py2exe?
Thank you,
Joe
--
http://mail.python.org/mailman/listinfo/python-list
Ric Da Force <[EMAIL PROTECTED]> wrote:
> I have a string such as 'C1, C2, C3'. Without assuming that each bit of
> text is of fixed size, what is the easiest way to change this list so that
> it reads:
> 'C1, C2 and C3' regardless of the length of the string.
>>> import re
>>> data = "the fir
Scott David Daniels wrote:
> iter(elem in lst if elem[3] == x).next()
>
> Does this look any better? At least it stops when the answer is found.
Next time you'll recommend
if (a>b) == True:
# ...
Watch out, you're on a slippery slope here :-)
Peter
--
http://mail.python.org/mailman/li
SDXF is a Python library to generate DXF files. DXF is an abbreviation
of Data Exchange File, a vector graphics file format. It is supported
by virtually all CAD products (such as AutoCAD, Blender, 3Dstudio,
Maya,Vectorworks...) and vector drawing programs (such as Illustrator,
Flash, ...).
SDXF c
Thomas Lotze wrote:
> Peter Otten wrote:
>
> class frankenstring(StringIO):
>> ... def next(self):
>> ... c = self.read(1)
>> ... if not c:
>> ... raise StopIteration
>> ... return c
>
> Repeated read(1) on a file-like object is one
Scott David Daniels wrote:
>Francois De Serres wrote:
>
>
>>Francois De Serres wrote:
>>
>>
>>>Having a string: "dothat"
>>>and a tuple: (x, y)
>>>1. What's the best way to build a function call like: dothat(x,y)?
>>>
>>>Assuming dothat is def'd in the same module,
>>>2. is: eval("dothat(x,y
Jeremy Sanders wrote:
> fargo wrote:
>
>
>>I'm looking for some way to sort files by date.
>
>
> you could do something like:
>
> l = [(os.stat(i).st_mtime, i) for i in glob.glob('*')]
> l.sort()
> files = [i[1] for i in l]
>
> Jeremy
>
If you have 2.4 or later:
def mtime(filename):
For me this:
z = tkFileDialog.askopenfilename(title='Title',
filetypes=[
('AIFF Files','*.aiff'),
("TXT Files", "*.txt"),
],
i
On Wed, 2005-07-13 at 09:00 -0700, [EMAIL PROTECTED] wrote:
> I'm trying to open a text file, remove all instances of the words
> "f=x;" and "i=x;" where x can be any number 0-14. Also, I want to
> remove all { " or ) or ( or ' } each time one of those characters
> occurs respectively. This
Jack Diederich wrote:
> On Wed, Jul 13, 2005 at 05:07:33PM +0100, Duncan Smith wrote:
>
>>rbt wrote:
>>
>>>On Wed, 2005-07-13 at 11:09 -0400, rbt wrote:
>>>
>>>
On Wed, 2005-07-13 at 10:21 -0400, rbt wrote:
>Say I have a list that has 3 letters in it:
>
>['a', 'b', 'c']
>
Hi, I'm trying to use the AddPrinterDriver method of
Win32_PrinterDriver to create a new. print driver. I can't get my
head round how I need to do this. So far I have
import win32com.client
WBEM =
win32com.client.GetObject(r"winmgmts:{impersonationLevel=impersonate}!\\"
+ "." + r"\root\cimv2
On Wed, Jul 13, 2005 at 05:07:33PM +0100, Duncan Smith wrote:
> rbt wrote:
> > On Wed, 2005-07-13 at 11:09 -0400, rbt wrote:
> >
> >>On Wed, 2005-07-13 at 10:21 -0400, rbt wrote:
> >>
> >>>Say I have a list that has 3 letters in it:
> >>>
> >>>['a', 'b', 'c']
> >>>
> >>>I want to print all the pos
I have an executable
version of a script that I wrote, but my script and backups got erased. Is
it possible to get the python script back from an exe file created with
py2exe?
Joe Woodward
Phoenix Analysis & Design
Technologies
7755 s. Research Drive - Suite
110
Tempe, Arizona 85284
(480
Yes, there's a lot of issues, cross-site scripting, session hijacking,
proper authentication, etc. Open Web App Security Project is useful
www.owasp.org
Also, before you start with NLP and full-on parsers, think about if you
can apply a text indexer, stemming and stopping both your user's
queri
rbt wrote:
> Expanding this to 4^4 (256) to test the random.sample function produces
> interesting results. It never finds more than 24 combinations out of the
> possible 256. This leads to the question... how 'random' is sample ;)
sample(population,k):
Return a k length list of unique element
Hopefully someone can catch what im missing here. Ive googled this and I think
Ive got the filetypes arg written properly, but I get a traceback when calling
this function.
Heres the code followed by its traceback.
def do_ask_fn_1():
z = askopenfilename(title=TITLE, initialdir=Dst_Dir,
rbt wrote:
> On Wed, 2005-07-13 at 11:09 -0400, rbt wrote:
>
>>On Wed, 2005-07-13 at 10:21 -0400, rbt wrote:
>>
>>>Say I have a list that has 3 letters in it:
>>>
>>>['a', 'b', 'c']
>>>
>>>I want to print all the possible 4 digit combinations of those 3
>>>letters:
>>>
>>>4^3 = 64
>>>
>>>
>>>a
I'm trying to open a text file, remove all instances of the words
"f=x;" and "i=x;" where x can be any number 0-14. Also, I want to
remove all { " or ) or ( or ' } each time one of those characters
occurs respectively. This is what I've been able to piece together...
import os, string
x = (
laksh wrote:
>
> is it possible to give parameters like the IP of a DNS server and the
> DNS query to a python program and obtain the response from the DNS
> server ?
http://pydns.sf.net
http://www.dnspython.org/
http://www.google.com/search?hl=en&q=python+dns&btnG=Google+Search
Ciao, Michael.
Francois De Serres wrote:
> Francois De Serres wrote:
>> Having a string: "dothat"
>> and a tuple: (x, y)
>> 1. What's the best way to build a function call like: dothat(x,y)?
>>
>> Assuming dothat is def'd in the same module,
>> 2. is: eval("dothat(x,y)", None, (('x', 100), ('y', 200)))
>> the rig
rbt wrote:
> On Wed, 2005-07-13 at 10:21 -0400, rbt wrote:
>
>>Say I have a list that has 3 letters in it:
>>
>>['a', 'b', 'c']
>>
>>I want to print all the possible 4 digit combinations of those 3
>>letters:
>>
>>4^3 = 64
>>
>>
>>abaa
>>aaba
>>aaab
>>acaa
>>aaca
>>aaac
>>...
>>
>>What is the
On Wed, 13 Jul 2005 11:09:25 -0400, rbt wrote:
> On Wed, 2005-07-13 at 10:21 -0400, rbt wrote:
>> Say I have a list that has 3 letters in it:
>>
>> ['a', 'b', 'c']
>>
>> I want to print all the possible 4 digit combinations of those 3
>> letters:
[snip]
> Expanding this to 4^4 (256) to test t
On Wed, 2005-07-13 at 11:09 -0400, rbt wrote:
> On Wed, 2005-07-13 at 10:21 -0400, rbt wrote:
> > Say I have a list that has 3 letters in it:
> >
> > ['a', 'b', 'c']
> >
> > I want to print all the possible 4 digit combinations of those 3
> > letters:
> >
> > 4^3 = 64
> >
> >
> > abaa
> >
On 13 Jul 2005 07:44:41 -0700, laksh <[EMAIL PROTECTED]> wrote:
>im looking for some advice regarding DNS lookup using python
>
>is it possible to give parameters like the IP of a DNS server and the
>DNS query to a python program and obtain the response from the DNS
>server ?
>
Not using the built
On Wed, 13 Jul 2005 10:39:41 -0400, rbt wrote:
>> > What is the most efficient way to do this?
>>
>> Efficient for who? The user? The programmer? The computer? Efficient use
>> of speed or memory or development time?
>
> The CPU
Ah, then that's easy. Sit down with pencil and paper, write out al
1 - 100 of 170 matches
Mail list logo