thanks very much Michael
i'll try your implementation, i hope i can improve it after i
understand all the theory:)
cheers
--
http://mail.python.org/mailman/listinfo/python-list
Op 2005-11-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
> On Thu, 03 Nov 2005 14:13:13 +, Antoon Pardon wrote:
>
>> Fine, we have the code:
>>
>> b.a += 2
>>
>> We found the class variable, because there is no instance variable,
>> then why is the class variable not incremented by two n
Once again, many thanks, your explainations are very detailed and i
think i'm in full understanding of the what/when/why of it all.
And with further introspection i can see why its done this way from a
language processing point of view rather than programming one. I also
now realize that . is ther
Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>:
> Antoon Pardon <[EMAIL PROTECTED]> writes:
>
>> Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>:
>> > Antoon Pardon <[EMAIL PROTECTED]> writes:
>> >
>> > ...
>> >
>> >> Fine, we have the code:
>> >>
>> >> b.a += 2
>> >>
>> >> W
Martin P. Hellwig wrote:
> [EMAIL PROTECTED] wrote:
> > I m not a python Expert or anythin
> > i need help, i m losin my motivation to continue with python
> > can anyone inspire me again.???
>
> Ooh that is easy, start learning other programming languages, you'll go
> back continuing with python
[EMAIL PROTECTED] wrote:
> I m not a python Expert or anythin
> i need help, i m losin my motivation to continue with python
> can anyone inspire me again.???
Ooh that is easy, start learning other programming languages, you'll go
back continuing with python very soon after that! ;-)
--
mph
--
[EMAIL PROTECTED] wrote:
> I m not a python Expert or anythin
> i need help, i m losin my motivation to continue with python
> can anyone inspire me again.???
Why continue then ?
--
http://mail.python.org/mailman/listinfo/python-list
hotbits hotbits hotbits!
http://www.fourmilab.ch/hotbits/
based on quantum mechanics check it out!
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I m not a python Expert or anythin
> i need help, i m losin my motivation to continue with python
> can anyone inspire me again.???
Not without knowing more about your motivations for starting Python in
the first place...
Alex
--
http://mail.python.org/mailman/listi
venk <[EMAIL PROTECTED]> wrote:
> Cool,
> i got it now... accessing thru attribute reference always
> returns a bound or unbound method... so, D.f is an unbound method
Right. Specifically, accessing through a (newstyle) class or instance
always calls the __get__ method of a descriptor [
Chris wrote:
> Wonder if anyone can help me?
I very much doubt that, with as little information you gave us.
> I am trying to run a perl script but I keep getting this error:
>
> /usr/lib/python2.4/posixfile.py:59: DeprecationWarning: The posixfile
> module is obsolete and will disappear in the
I m not a python Expert or anythin
i need help, i m losin my motivation to continue with python
can anyone inspire me again.???
--
* Posted with NewsLeecher v3.0 Beta 7
* http://www.newsleecher.com/?usenet
--
http://mail.python.org/mailman/listinfo/python-list
Thx Alex.
--
* Posted with NewsLeecher v3.0 Beta 7
* http://www.newsleecher.com/?usenet
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Wonder if anyone can help me?
I am trying to run a perl script but I keep getting this error:
/usr/lib/python2.4/posixfile.py:59: DeprecationWarning: The posixfile
module is obsolete and will disappear in the future
DeprecationWarning)
I am running Ubuntu Hoary 5.10. I'll try the same
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Michael J. Fromberger:
> > I can send you a Python implementation I wrote, if you like; but if
> > you're interested in better understanding how the transform works,
> > I would recommend you try writing your own implementation.
>
> I'
Cool,
i got it now... accessing thru attribute reference always
returns a bound or unbound method... so, D.f is an unbound method
whereas i want the "function" of the unbound method... ok, this
example and the nice explanations definitively thought me about
function, bound method (for
[EMAIL PROTECTED] wrote:
> Thanks Guys, Wow, i didnt knew that there was alist reverse function.
> thx. also. i need a good documentation of the os and sys modules as
> well as builtin functions of python.
>
> the standard python documentation doesnt work for me. can u recommend
> something?
I
venk <[EMAIL PROTECTED]> wrote:
> Hi,
> given below is my interaction with the interpreter In one case, i
> have created the class method using the "famous idiom"... and in the
> other, i have tried to create it outside the class definition... why
> isn't the latter working ? (of course, the
Magnus Lycka <[EMAIL PROTECTED]> wrote:
> John Salerno wrote:
> > LOL. As weird as it sounds, that's what I *don't* want to happen with
> > C#! I've spent a lot of time with it, and I love it, but I don't want
> > Python to take over! :)
>
> Then it might be better to keep away from Python. It *
Zlatko Matić wrote:
> Hello.
> I was trying to install PygreSQL and psychopg2 in order to use python as
> front-end for PostgreSQL, on WIndows XP.
> When I tried to install by calling setup.py from command prompt ("setup.py
> install"), in both cases I had the same error:
>
> "error: Python was
Magnus Lycka wrote:
> Stuart Turner wrote:
>
>>Hi Everyone,
>>
>>I'm working hard trying to get Python 'accepted' in the organisation I work
>>for. I'm making some good in-roads. One chap sent me the text below on
>>his views of Python. I wondered if anyone from the group could give me
>>some a
Thanks Guys, Wow, i didnt knew that there was alist reverse function.
thx. also. i need a good documentation of the os and sys modules as
well as builtin functions of python.
the standard python documentation doesnt work for me. can u recommend
something?
--
* Posted with NewsLeecher v3.0 Beta
Tieche Bruce A MSgt USMTM/AFD <[EMAIL PROTECTED]> wrote:
...
> I am new to python,
> Could someone explain (in English) how and when to use self?
A class's methods use 'self' to refer to the object (instance of the
class) they're being called on; mostly, they access (get or set)
attributes on s
Antoon Pardon wrote:
> Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>:
[...]
>>It is all according to how things have been in Python for a long time.
>
> Unsane behaviour for a long time is still unsane behaviour.
>
As your continued contributions on this newsgroup so adequately
demons
Graham wrote:
> Thanks to all of you for your reply's i had no idea it would get this
> sort of response,
> i've read through most of the posts and it seems that its a active
> topic.
>
> My question remains however, i suppose i'm not familiar with how this
> functions in
> other languages, but wh
Antoon Pardon wrote:
> Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>:
>
>>Antoon Pardon <[EMAIL PROTECTED]> writes:
>>
>>...
>>
>>
>No matter wat the OO model is, I don't think the following code
>exhibits sane behaviour:
>
>class A:
> a = 1
>
>b = A()
>
[EMAIL PROTECTED] wrote:
> What is the cheapest/affordable pocket device that I can code python
> on? I think the closest I have seen is pocketpc from this page:
>
> http://www.murkworks.com/Research/Python/PocketPCPython/Overview
I would not recommend trying to code on a handheld device. Small s
import random
print random.randint(1,20)
#prints random integer from 1 to 20
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>
>>>There is a difference between what is *illegal* and what constitutes
>>>a *crime*.
>>
>>Why thank you, you've really made my day. That's the funniest thing I've
>>heard in months. Please, do tell, which brand of corn flakes was i
What is the cheapest/affordable pocket device that I can code python
on? I think the closest I have seen is pocketpc from this page:
http://www.murkworks.com/Research/Python/PocketPCPython/Overview
--
http://mail.python.org/mailman/listinfo/python-list
"Graham" <[EMAIL PROTECTED]> writes:
> Many thanks your explaination cleared up many of the questions I had.
> I know think i can understand the purpose, regardless of my opinion, i
> do however think that one should be able to assign the value in the
> same way it is accessed.
That's not true in
Graham wrote:
> Many thanks your explaination cleared up many of the questions I had.
> I know think i can understand the purpose, regardless of my opinion, i
> do however think that one should be able to assign the value in the
> same way it is accessed.
You mean, like this?
# access the value
Noah <[EMAIL PROTECTED]> wrote:
> This is interesting, but requires two separate files -- the ZIP file
> and the boot script.
No, it doesn't.
> This is because zipimport can only import from file paths.
It can import from a file, and the file (like all zipfiles) can have a
prefix. That prefix
yaipa wrote:
> All,
>
> I've been asked by my boss to put an Icon in WinXP's "My Computer" for
> a utility we use around the shop. My tool of choice is of course
> Python and therefore what I am using to attempt my given task. I have
> no trouble putting Icons in the WinXP Toolbar using Python,
On 3 Nov 2005 17:01:08 -0800, [EMAIL PROTECTED] wrote:
>Another question: I am writing a sudoku solving program. The
>'solving' part of is just multiple iterations. It will take random
>numbers and keep switching it all around until a set of logic
>statements has been met (ie; all numbers in a
Well, I admit the remark was off the cuff because I was thinking of
conventional waterfall development cycles in the aerospace industry
in that context someone who wasn't there during an entire development
cycle is not even a junior member, but is rather a recruit under
training to begin actua
For the
not cellboard[0] in cellboard[1:8] (I knew about ranges/slicing using a
colon, can't believe I didn't think of that!)
line, will I have to write that out for each number?
So the line:
not cellboard in ((cellboard[1:8]) and (cellboard[9] and cellboard[18]
and cellboard[27] and cellboard[
hi
i used ConfigParser to read a config file. I need the config file to
have identical sections. ie :
[server]
blah = "some server"
[destination]
blah = "some destination"
[end]
end= ''
[server]
blah = "some other server"
[destination]
blah = "some other destination"
[end]
end=''
and i need to c
On 3 Nov 2005 12:20:35 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>:
>> Antoon Pardon <[EMAIL PROTECTED]> writes:
>>
>>> Op 2005-11-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
>>>
>>> >> There are two possible fixes, either by prohib
This is interesting, but requires two separate files -- the ZIP file
and the boot script.
This is because zipimport can only import from file paths.
It can't import from a string or an IOString (as far as I can tell).
If only they would let you import from an already open file. Damn!
Squeeze is 99
<[EMAIL PROTECTED]> wrote:
...
> Rather than writing
>
> cellboard[0] is not* (cellboard[1] and cellboard[2] and cellboard[3]
> and cellboard[4] ... cellboard[8])
> cellboard[1] is not (cellboard[0] and cellboard[2] and cellboard[3] and
> cellboard[4] ... cellboard[8])
Urgh... the fastest way
Rocco Moretti <[EMAIL PROTECTED]> wrote:
> Alex Martelli wrote:
> > The Eternal Squire <[EMAIL PROTECTED]> wrote:
> >...
> >
> >>2) Consider what he really wants for a supervisor of software
> >>engineers. Ideally such a person should be a software engineer with
> >>at least 3 times the ex
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> But when we talk about organisation(and convincing sometimes not on
> merit sake), banner name helps. I was once in organisation where The
> MS/Intel/IBM combination is a sure thing because even if there is
> anything went wrong, it wouldn't be the re
On 11/3/05, Ivan Shevanski <[EMAIL PROTECTED]> wrote:
On 3 Nov 2005 18:28:49 -0800, Brett Hoerner <
[EMAIL PROTECTED]> wrote:
> I've been asked by my boss to put an Icon in WinXP's "My Computer" for> a utility we use around the shop. My tool of choice is of course
> Python and therefore what
On 3 Nov 2005 18:28:49 -0800, Brett Hoerner <[EMAIL PROTECTED]> wrote:
> I've been asked by my boss to put an Icon in WinXP's "My Computer" for> a utility we use around the shop. My tool of choice is of course
> Python and therefore what I am using to attempt my given task. I have> no trouble pu
Would PythonEggs be close?
It's basically a zip format with all the Python files inside, it would
maintain the structure and not be a single script file, but would be a
single .egg file... the end user would just run the script and all
would be installed, essentially.
http://peak.telecommunity.co
yaipa wrote:
> I've been asked by my boss to put an Icon in WinXP's "My Computer" for
> a utility we use around the shop. My tool of choice is of course
> Python and therefore what I am using to attempt my given task. I have
> no trouble putting Icons in the WinXP Toolbar using Python, but have
>
> I've been asked by my boss to put an Icon in WinXP's "My Computer" for
> a utility we use around the shop. My tool of choice is of course
> Python and therefore what I am using to attempt my given task. I have
> no trouble putting Icons in the WinXP Toolbar using Python, but have
> totally fail
Steven D'Aprano wrote:
> On Thu, 03 Nov 2005 16:40:43 -0500, Peter Hansen wrote:
>>Steven D'Aprano wrote:
>>
>>>On Thu, 03 Nov 2005 15:51:30 +, Grant Edwards wrote:
>>>
I've never heard of anybody using the data as source of
entropy.
>>>
>>>Me neither, but the original poster did ask
All,
I've been asked by my boss to put an Icon in WinXP's "My Computer" for
a utility we use around the shop. My tool of choice is of course
Python and therefore what I am using to attempt my given task. I have
no trouble putting Icons in the WinXP Toolbar using Python, but have
totally failed t
Many thanks your explaination cleared up many of the questions I had.
I know think i can understand the purpose, regardless of my opinion, i
do however think that one should be able to assign the value in the
same way it is accessed.
Given your previous example:
> class Counter(object):
> "A
On 3 Nov 2005 17:01:08 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> the above so that all the data in one row is not equal to each other,
> is there something I can write to make it simpler? For example,
> (cellboard[0] is not cellboard[1] is not ... cellboard[8]) only worked
> for the nu
Steven D'Aprano a écrit :
> On Thu, 03 Nov 2005 20:19:03 +0100, bruno at modulix wrote:
>
>
>>Steven D'Aprano wrote:
>>
>>>On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote:
>>>
>>>
>>>
Tieche Bruce A MSgt USMTM/AFD wrote:
>I am new to python,
>
>
>
>Cou
Bingo! That is what I was thinking of.
http://effbot.org/zone/squeeze.htm
It turns out that it doesn't quite do what I want
because the resulting script is tightly coupled
to the version of Python used to build the package.
It compiles the PYC byte-code into the package.
It's neat and I may be
Freeze also packages the python interpreter into a binary.
I need a cross platform solution that just packages the scripts.
I expect the user to already have python installed.
Yours,
Noah
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney wrote:
> Howdy all,
>
> I'd like to have an Abstract Data Type for a scalar value that is
> restricted to a small set of values. Like an Enum, I suppose.
>
> What I would like is to be able to use simple 'str' values in most of
> the code, but where the values are actually used in a sema
Another question: I am writing a sudoku solving program. The
'solving' part of is just multiple iterations. It will take random
numbers and keep switching it all around until a set of logic
statements has been met (ie; all numbers in a row are not equal to each
other) ... that's where my questio
Howdy all,
I'd like to have an Abstract Data Type for a scalar value that is
restricted to a small set of values. Like an Enum, I suppose.
What I would like is to be able to use simple 'str' values in most of
the code, but where the values are actually used in a semantically
meaningful context, h
I thought I'd take a shot and see if anyone knows the answer to this? I've been stuck for a while now on this.
Would anyone happen to know why this my function removewatermark() in
this code isn't working? I copied it from a Word macro I recorded
and it did work when I recorded the macro. When
John Salerno wrote:
> I thought it might be interesting to get some opinions on when you know
> when you're "done" learning a language. I've been learning C# for a few
> months (albeit not intensively) and I feel I have a good grasp of the
> language in general.
Never? When you move on? You ca
I would say that learning a few languages is necessary
to realizing what type of things different languages
excel at. For instance I didn't understand why java
would never allocate objects on the stack until I read
about using object pointers in C++ to lower
compilation dependecies. This helped m
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> > There is a difference between what is *illegal* and what constitutes
> > a *crime*.
>
> Why thank you, you've really made my day. That's the funniest thing I've
> heard in months. Please, do tell, which brand of corn flakes was it that
> you got your
Steven D'Aprano wrote:
> On Thu, 03 Nov 2005 14:56:44 -0500, Tim Daneliuk wrote:
>
>
>>There is a difference between what is *illegal* and what constitutes
>>a *crime*.
>
>
> Why thank you, you've really made my day. That's the funniest thing I've
> heard in months. Please, do tell, which bran
[EMAIL PROTECTED] wrote:
> I'd like to find a web framework that works with IIS and SQL Server on
> Windows(I know-but I didn't make that decision). Anyhow, I've
> looked at Turbogears, Django, subway and didn't see any evidence
> that anyone had made these work in that configuration.
> Any sugges
I'm running into import problems trying to create a
package that is similiar in layout to the one in the
docs described here:
http://www.boost.org/libs/python/doc/tutorial/doc/html/python/techniques.html#python.creating_packages
So my package layout is as follows:
xyzzy/
__init__.py
Hi,
I am trying to set-up communication to the coin change-giver from my
Linux box using the Python code. The change giver uses MDB (Multi Drop
Bus) serial protocol to communicate with the master. MDB protocol is
the 9bit serial protocol:
(TX, RX lines only) 9600bps, 9bits, No Parity, 1 Start, 1 S
I'd like to find a web framework that works with IIS and SQL Server on
Windows(I know-but I didn't make that decision). Anyhow, I've looked at
Turbogears, Django, subway and didn't see any evidence that anyone had
made these work in that configuration. Any suggestions?
--
http://mail.python.org/m
Jeffrey Schwab a écrit :
> bruno at modulix wrote:
>
>> Steven D'Aprano wrote:
>>
>>> On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote:
>>>
Tieche Bruce A MSgt USMTM/AFD wrote:
> I am new to python,
>
> Could someone explain (in English) how and when to use self?
>>
On Thu, 03 Nov 2005 16:40:43 -0500, Peter Hansen wrote:
> Steven D'Aprano wrote:
>> On Thu, 03 Nov 2005 15:51:30 +, Grant Edwards wrote:
>>>
>>>I've never heard of anybody using the data as source of
>>>entropy.
>>
>> Me neither, but the original poster did ask how to read every nth byte
>>
[EMAIL PROTECTED] wrote:
> Hello,
>
> I am using pymssql (http://pymssql.sourceforge.net/) to insert data
> from a web-frontend (encoded in utf-8) into fields of type nvarchar of
> an MS-SQL Server 2000.
>
> The problem is, ms-sql server uses ucs-2 and not utf-8. I have looked
> around a bit but
On Thu, 03 Nov 2005 20:19:03 +0100, bruno at modulix wrote:
> Steven D'Aprano wrote:
>> On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote:
>>
>>
>>>Tieche Bruce A MSgt USMTM/AFD wrote:
>>>
I am new to python,
Could someone explain (in English) how and when to use
On Thu, 03 Nov 2005 10:01:04 -0800, Paul Rubin wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> Then you don't approve of inheritance? That's fine, it is your choice, but
>> as far as I know, all OO languages include inheritance.
>
> Some OO languages only implement inheritance for method
[EMAIL PROTECTED] wrote:
> i m trying to reverse the order in which the
> strings are stored in list
>
> then pop it into another list
>
> what m i doin worng??
>
> here's the code:
>
> list1 = []
> list2 = []
> list1.extend('123456789')
How about this instead (Python 2.4 or later):
list2 = l
Not tested:
import glob
import os
path=r'C:\datafiles\'
for fileName in glob.glob(os.path.join(path,'*.DAT')):
dataFile=open(fileName, 'r').readlines()
.
. Continue yur code here
.
-Larry Bates
hungbichvo wrote:
> Dear All,
>
> My python application is small. It reads data from
Steven D'Aprano wrote:
> On Thu, 03 Nov 2005 15:51:30 +, Grant Edwards wrote:
>>
>>I've never heard of anybody using the data as source of
>>entropy.
>
> Me neither, but the original poster did ask how to read every nth byte
> of "the Internet stream", so I assumed he had something like that
On 2005-11-03, Peter Hansen <[EMAIL PROTECTED]> wrote:
>>>I've never heard of anybody using the data as source of
>>>entropy.
>>
>> Me neither, but the original poster did ask how to read every
>> nth byte of "the Internet stream", so I assumed he had
>> something like that in mind.
>
> And to
Thanks to Everyone for replying - it has given me much food for thought.
- Stuart
Stuart Turner wrote:
> Hi Everyone,
>
> I'm working hard trying to get Python 'accepted' in the organisation I
> work
> for. I'm making some good in-roads. One chap sent me the text below on
> his views of Pyth
Brandon K <[EMAIL PROTECTED]> wrote:
> what is .tk? Turkmenistan? or is it just some arbitrary suffix.
The country top-level domains are the ISO 3166 two-letter country
codes.
http://dmoz.com/Science/Reference/Standards/Individual_Standards/ISO_3166/>
--
\"Nothing in life is so
"Graham" <[EMAIL PROTECTED]> writes:
> I just seems to me that . shouldn't defer to the class
> variable if
> an instance variable of the same name does not exists, it should, at
> least how i
> understand it raise an exception.
>
> Is my thinking way off here?
Yes. This behavior is how you get in
Thanks to all of you for your reply's i had no idea it would get this
sort of response,
i've read through most of the posts and it seems that its a active
topic.
My question remains however, i suppose i'm not familiar with how this
functions in
other languages, but what is the common way of referr
Updated: http://www.apress.com/promo/fractal/result.html
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Stanislaw Findeisen <[EMAIL PROTECTED]> wrote:
...
> However I can't see FILE_ATTRIBUTE_REPARSE_POINT turned on in any file /
> directory shortcuts I create. In fact the only attribute set in
> shortcuts created using Windows Explorer is FILE_ATTRIBUTE_ARCHIVE. (
Michael J. Fromberger:
> I can send you
> a Python implementation I wrote, if you like; but if you're interested
> in better understanding how the transform works, I would recommend you
> try writing your own implementation.
I'd like to see it, if you want you can put it somewhere or send it
direc
Steven D'Aprano wrote:
> On Thu, 03 Nov 2005 04:34:20 -0500, Tim Daneliuk wrote:
>
>
>
>>A) I don't much care if people wander off topic from time to time -
>>that's what filters are for. But as a matter of general courtesy
>>is it too much to ask that the subject line be so marked?
>
On Thu, 3 Nov 2005, Paul Cochrane wrote:
> On Wed, 02 Nov 2005 06:33:28 +, Bengt Richter wrote:
>
>> On Wed, 2 Nov 2005 06:08:22 + (UTC), Paul Cochrane <[EMAIL PROTECTED]>
>> wrote:
>>
>>> I've got an application that I'm writing that autogenerates python
>>> code which I then execute wi
bruno at modulix wrote:
> Steven D'Aprano wrote:
>
>>On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote:
>>
>>
>>
>>>Tieche Bruce A MSgt USMTM/AFD wrote:
>>>
>>>
I am new to python,
Could someone explain (in English) how and when to use self?
>>>
>>>Don't use se
...
list2=list1[:]
...
Yes, naturally, where was my head ?-))
--
http://mail.python.org/mailman/listinfo/python-list
bruno at modulix <[EMAIL PROTECTED]> writes:
> >>Don't use self. Use other.
> >
> >
> > Are you serious?
>
> Are you seriously wondering if I am serious ?
Hmmm... I hope there's no deadlock in this loop...
--
Jorge Godoy <[EMAIL PROTECTED]>
--
http://mail.python.org/mailman/listinfo
And me, I'm a 15 to 20 year veteran, I started *very* young
I think Alex has it right. Too many of us elders are like he says.. I
try not to be, to the point where I accepted a promotion from my
captain (wife) from chief engineer of the family to executive officer
(as in, I am now my daughter
[EMAIL PROTECTED] writes:
> If what you want is a reversed copy, you could just append list1
> elements to list2, and use the reverse function such as
...
for i in list1:
> ... list2.append(i)
> ...
Don't do this by ahnd - let python do it for you:
list2 = list(list1)
or
list2 = lis
Steven D'Aprano wrote:
> On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote:
>
>
>>Tieche Bruce A MSgt USMTM/AFD wrote:
>>
>>>I am new to python,
>>>
>>>
>>>
>>>Could someone explain (in English) how and when to use self?
>>>
>>
>>Don't use self. Use other.
>
>
> Are you serious?
Are
On 3 Nov 2005 03:19:22 -0800, "venk" <[EMAIL PROTECTED]> wrote:
>Hi,
> given below is my interaction with the interpreter In one case, i
>have created the class method using the "famous idiom"... and in the
>other, i have tried to create it outside the class definition... why
>isn't the latter
Ewald R. de Wit wrote:
> I'm running into a something unexpected for a new-style class
> that has both a class attribute and __slots__ defined. If the
> name of the class attribute also exists in __slots__, Python
> throws an AttributeError. Is this by design (if so, why)?
>
> class A( object ):
[EMAIL PROTECTED] wrote:
> If what you want is a reversed copy, you could just append list1
> elements to list2, and use the reverse function such as
> >>> ...
> >>> for i in list1:
> ... list2.append(i)
> ...
> >>> list2.reverse()
> >>> list1
> ['1', '2', '3', '4', '5', '6', '7', '8', '9']
> >>>
Here is an example of copying then reversing a list:
>>> l1 = [1,2,"C"]
>>> l2 = l1[:]
>>> l2.reverse()
>>> l2
['C', 2, 1]
--
http://mail.python.org/mailman/listinfo/python-list
mjakowlew wrote:
> I got the "IE Fix" working, here's the code:
>
>
> path = r'c:\here\there\files\file.ext'
>
> i=len(path)
> j=0
> size=len(path)
>
> while i:
> i=i-1
> if path[i]== '\\':
> j=i+1
> break
>
> filename = path[j:size]
> print "FILENAME:
Twill or Pamie looks good, if your looking for a solution using Python.
If you are looking for Cross- browser solution for testing there is
also selenium that does that.
The have some code for use in Python.
There is also WATIR in RUBY and SAMIE in PERL
It depends on your enviroment and needs.
Twill or Pamie looks good, if your looking for a solution using Python.
If you are looking for Cross- browser solution for testing there is
also selenium that does that.
The have some code for use in Python.
There is also WATIR in RUBY and SAMIE in PERL
It depends on your enviroment and needs.
Antoon Pardon <[EMAIL PROTECTED]> writes:
>> What would you expect to get if you wrote b.a = b.a + 2?
> I would expect a result consistent with the fact that both times
> b.a would refer to the same object.
Except they *don't*. This happens in any language that resolves
references at run time. Cha
> How to generate a random number in Python. Is there any build in
> function I can call?
>>> import random
>>> help(random)
also see:
http://docs.python.org/lib/module-random.html
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 255 matches
Mail list logo