I am new to python,
Could someone explain (in English) how and when to use self?
I have been reading, and haven't found a good example/explanation
Bruce Tieche ([EMAIL PROTECTED])
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 02 Nov 2005 19:01:46 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote:
>"Paul McGuire" <[EMAIL PROTECTED]> writes:
>> "David Rasmussen" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>>> If I have a string that contains the name of a function, can I call it?
>>> As in:
>>>
>>> d
John W. Kennedy wrote:
> IBM was genuinely innovative, and did their best to provide value for
> money. Microsoft hasn't been able to produce anything but me-too
> products since the 80's. (Multiplan, Word for DOS, the QBASIC engine,
> early sponsorship of mouses, and the gutsy decision to morph MS
"Tieche Bruce A MSgt USMTM/AFD" <[EMAIL PROTECTED]> wrote:
> Could someone explain (in English) how and when to use self?
>
> I have been reading, and haven't found a good example/explanation
consider a class C:
>>> class C:
... def method(self):
... print self
...
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.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
-
ice wrote:
> I am a fresh here , and I have no idea of it.
> Do you have any comments?
>
Learn Python
Learn web programming
Write the specs for your blog system
Design the solution
Implement it
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '
I am also have _mysql.c that has to be compiled. I downloaded 1.2.0
from here
http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775
(the .tar.gz). Do you mean, that if I drop the import _mysql and from
_mysql import ... lines everything will work OK? I "private install"
would
David Blomstrom wrote:
> "Everytime someone compares MS's behavior with some
> less controversial criminal behavior, you act like
> they
> accused MS of holding people up at gunpoint."
>
> Screwing literally millions of consumers and taxpayers
> and holding entire schools hostage is far worse tha
ice enlightened us with:
> I am a fresh here , and I have no idea of it. Do you have any
> comments?
Look up "turbogears" and watch the "20 minute Wiki" video tutorial.
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don'
This has to do with class variables and instances variables.
Given the following:
class _class:
var = 0
#rest of the class
instance_b = _class()
_class.var=5
print instance_b.var # -> 5
print _class.var # -> 5
Initially this seems to make sense, note th
This has to do with class variables and instances variables.
Given the following:
class _class:
var = 0
#rest of the class
instance_b = _class()
_class.var=5
print instance_b.var # -> 5
print _class.var # -> 5
Initially this seems to make sense, note th
In the embedding Python manual at Python.org an example is presented
that uses the function:
PyDict_GetAttrString. Is it possible that this is a typo?
I have searched the source code and I can't find it, I have also used
google and I only get 4 hits.
In for example Programming Python another func
Graham wrote:
>
>
> class _class:
> var = 0
> #rest of the class
>
> instance_b = _class()
>
> _class.var=5
>
> print instance_b.var # -> 5
> print _class.var # -> 5
>
>
> [...]
>
>
> instance_b.var = 1000 # -> _class.var = 5
> _class.var = # -> _
I write a database application with Metakit. My script is like the
following:
...
vw = db.getas("t1[no:I,ch:S,code1:S,code2:S]")
...
*vw.append(no=i,ch=x,code1=y[0],code2=y[1])
...
But errors occured on "*" and it displayed "TypeError: not a Python
string".
x, y[0], y[1] are unicode strings. Doesn'
On Thu, 03 Nov 2005 01:43:32 -0800, Graham wrote:
[snip]
> print instance_b.var # -> 5
> print _class.var # -> 5
>
>
>
> Initially this seems to make sense, note the difference between to last
> two lines, one is refering to the class variable 'var' via the class
> while the other refe
"Graham" <[EMAIL PROTECTED]> writes:
> perhaps this was intended, i was just wondering if anyone else had
> noticed it, and if so what form would you consider to be 'proper'
> either referring to class variables via the class itself or via
> instances of that class. Any response would be greatly a
Hi,
are there a strtok equivalent in python ? str.split() only takes single
seperator.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote_
> In the embedding Python manual at Python.org an example is presented
> that uses the function:
> PyDict_GetAttrString. Is it possible that this is a typo?
according to this checkin message ("fix stupid typo"), the answer is yes:
http://mail.python.org/pipermail/pyt
[EMAIL PROTECTED] wrote:
> are there a strtok equivalent in python ? str.split() only takes single
> seperator.
use a regular expression split with a character group:
>>> s = "breakfast=spam+egg-bacon"
>>> import re
>>> re.split("[-+=]", s)
['breakfast', 'spam', 'egg', 'bacon']
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 presence of decorators is a
different issue
thanks.
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > are there a strtok equivalent in python ? str.split() only takes single
> > seperator.
>
> use a regular expression split with a character group:
>
> >>> s = "breakfast=spam+egg-bacon"
> >>> import re
> >>> re.split("[-+=]",
Hi. I've wrapped a C++ class with Boost.Python and that works great. But, I
am now packaging my application so that it can be distributed. The structure
is basically this:
.../bin/foo.py
.../lib/foo.so
.../lib/bar.py
In foo.py I do the following:
sys.path.append(os.path.dirname(sys.path[0])
Hi there,
I am writing an application that requires a client-server interaction.
Looking up on the internet and working on it I came up with something
like this:
a class ADFSServer that takes inbound connections and dispatches them
to ADFSReceiver.
The connection is always initialized by ADFSSender
I want to create a reparse point on NTFS (any).
Here
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/reparse_points.asp)
I read: "reparse points are used to implement NTFS file system links".
Here
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fi
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 experience of the most junior member. Such a
>
>
> I li
Dear All,
My python application is small. It reads data from a file.
My code is:
fileName = '900128.DAT'
dataFile = open(fileName, 'r').readlines()
I have to run 100 input files .DAT. Each time I run application, I have
to change code fileName to a new one. For example, fileName
= 'NewFile
Op 2005-11-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
>> There are two possible fixes, either by prohibiting instance variables
>> with the same name as class variables, which would allow any reference
>> to an instance of the class assign/read the value of the variable. Or
>> to only allow
"hungbichvo" <[EMAIL PROTECTED]> writes:
> Dear All,
>
> My python application is small. It reads data from a file.
> My code is:
>fileName = '900128.DAT'
>dataFile = open(fileName, 'r').readlines()
> I have to run 100 input files .DAT. Each time I run application, I have
> to change cod
Antoon Pardon <[EMAIL PROTECTED]> writes:
> Op 2005-11-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
>
> >> There are two possible fixes, either by prohibiting instance variables
> >> with the same name as class variables, which would allow any reference
> >> to an instance of the class assign
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 advice on how to respond / if they had been in a similar po
Stuart Turner <[EMAIL PROTECTED]> writes:
> 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 advi
I'm already using it for a ton of things - I want to try and get broader
acceptance in the organisation for it to be made and 'officially supported
product'.
Stefan Arentz wrote:
> Stuart Turner <[EMAIL PROTECTED]> writes:
>
>> Hi Everyone,
>>
>> I'm working hard trying to get Python 'accepted
Antoon Pardon wrote:
> Op 2005-11-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
>
>
>>>There are two possible fixes, either by prohibiting instance variables
>>>with the same name as class variables, which would allow any reference
>>>to an instance of the class assign/read the value of the va
Stuart Turner <[EMAIL PROTECTED]> writes:
> I'm already using it for a ton of things - I want to try and get broader
> acceptance in the organisation for it to be made and 'officially supported
> product'.
IMO that is what you need to communicate: 'already using it for a ton of
things' and probab
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?
Fair enough.
> B) Rhetoric is not
Steven D'Aprano wrote:
> Jaywalking is a crime. So is littering. So is merely belonging to certain
> organisations, such as the German Nazi party or any number of allegedly
> terrorist groups. Walking around naked in public is a crime, and in many
> places in the world, including the USA, you then
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 prohibiting instance variables
>> >> with the same name as class variables, which
Steve Holden <[EMAIL PROTECTED]> writes:
> > class A:
> > a = 1
> > b = A()
> > b.a += 2
> > print b.a
> > print A.a
> > Which results in
> > 3
> > 1
> >
> I don't suppose you'd care to enlighten us on what you'd regard as the
> superior outcome?
class A:
a = []
b = A()
b.appen
On Thu, 03 Nov 2005 11:55:06 +, Antoon Pardon wrote:
> No matter wat the OO model is, I don't think the following code
> exhibits sane behaviour:
>
> class A:
> a = 1
>
> b = A()
> b.a += 2
> print b.a
> print A.a
>
> Which results in
>
> 3
> 1
Seems perfectly sane to me.
What would y
I have installed wxGlade on a MS XP machine. It executed on completion
of the install. However, when I try to double click on the wxGlade
icon to start nothing happens. I searched the NG and found that this
had been report before but no solution was posted. I am running the
following versions;
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()
> >> b.a += 2
> >> print b.a
> >> print A.a
> >>
> >> Which results in
> >>
> >> 3
> >> 1
> >
> >
pypy-0.8.0: Translatable compiler/parser and some more speed
==
The PyPy development team has been busy working and we've now packaged
our latest improvements, completed work and new experiments as
version 0.8.0, our third public release.
Thanks for all your comments.
What I wanted is a chance to practise my programming talents with
Python.
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
> Steve Holden <[EMAIL PROTECTED]> writes:
>
>>>class A:
>>> a = 1
>>>b = A()
>>>b.a += 2
>>>print b.a
>>>print A.a
>>>Which results in
>>>3
>>>1
>>>
>>
>>I don't suppose you'd care to enlighten us on what you'd regard as the
>>superior outcome?
>
>
> class A:
> a =
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()
>> >> b.a += 2
>> >> print b.
Thanks guys. The os.path method works, but this is for a script for a
website upload program on a zope webserver. For some reason even admin
access won't let me run the script through the server.
The main issue with my script is that Firefox has no problem with the
program the way it is, but IE so
Robert Kern wrote:
> Steve Holden wrote:
>
>>Sorry about this almost off-topic post, but I am guessing there must be
>>other readers of this group who use Thunderbird (in my case 1.0.2) to
>>access it as gmane.comp.general.python.
>>
>>I'm currently showing 344,548 articles in the group due to t
Op 2005-11-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
> On Thu, 03 Nov 2005 11:55:06 +, Antoon Pardon wrote:
>
>> No matter wat the OO model is, I don't think the following code
>> exhibits sane behaviour:
>>
>> class A:
>> a = 1
>>
>> b = A()
>> b.a += 2
>> print b.a
>> print A.a
>>
Roman Suzi wrote:
>
> On Thu, 2 Nov 2005 [EMAIL PROTECTED] wrote:
> > Is there a better way?
>
> What about parsing the input into XML first? Is there any point in including
> unescaped code into XML document unless it is XML itself?
Indeed. My approach would be to parse the user's input using the
Stefan Arentz wrote:
> Stuart Turner <[EMAIL PROTECTED]> writes:
>
> > I'm already using it for a ton of things - I want to try and get broader
> > acceptance in the organisation for it to be made and 'officially supported
> > product'.
>
> IMO that is what you need to communicate: 'already using
I just want to clarify that the above mentioned web site
(www.ironpython.com) is no longer maintained.
If you want to get updated information on IronPython, you should visit
this site:
www.gotdotnet.com/Workspaces/Workspace.
aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742
Or the mailing list here:
ht
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 advice on how to respond /
Op 2005-11-03, Steve Holden schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>> Op 2005-11-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
>>
>>
There are two possible fixes, either by prohibiting instance variables
with the same name as class variables, which would allow any referenc
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 ):
__slots__ = ( 'value', )
Antoon Pardon enlightened us with:
> I would expect a result consistent with the fact that both times b.a
> would refer to the same object.
"b.a" is just a name, not a pointer to a spot in memory. Getting the
value associated with that name is something different from assigning
a new value to that
How about, Google use python extensively ? This I believe is a very
strong argument for any concern about python.
However, policy in organisations can be very funny and many of them may
be set long time ago which even though may no longer be relavent are
still "policy".
I would suggest focus on w
You see,
The seen behavior is due to the result of python's name
binding,scoping scheme.
Let me give you an example,
class A:
i=0
def t(self):
print self.i
self.i=4
then
a=A()
a.i is 0
a.t()
then,
A.i is 0
a.i is 4
In the function, it first searches fo
John Salerno wrote:
> Hi all. I'm currently learning C#, and I'm also interested in learning
> Python
In a similar position to yourself - learning both languages - I can
definitely recommend Python ( though C# 's curly brackets might annoy
you more than they did before!!)
> so it seems like a de
Op 2005-11-03, venk schreef <[EMAIL PROTECTED]>:
> You see,
> The seen behavior is due to the result of python's name
> binding,scoping scheme.
I know what causes the behaviour. But I still think it is
not sane behaviour.
> ...
>
> the same thing happens in the case of b.a = b.a + 2 se
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 built with version 7.1 of V
Op 2005-11-03, Sybren Stuvel schreef <[EMAIL PROTECTED]>:
> Antoon Pardon enlightened us with:
>> I would expect a result consistent with the fact that both times b.a
>> would refer to the same object.
>
> "b.a" is just a name, not a pointer to a spot in memory. Getting the
> value associated with
Hi,
Though out of the streamline, I find your post to be one of the most
reasonable and well-formed arguments I have read in a long time. Keep
it up. Great work.
Steven D'Aprano wrote:
Real standards, like TCP/IP which is the backbone of the Internet,
aren't
controlled by any one company. Anyone
Antoon Pardon <[EMAIL PROTECTED]> writes:
> Op 2005-11-03, venk schreef <[EMAIL PROTECTED]>:
> > You see,
> > The seen behavior is due to the result of python's name
> > binding,scoping scheme.
>
> I know what causes the behaviour. But I still think it is
> not sane behaviour.
>
>
> > ...
On 3 Nov 2005, at 05:03, Alex Martelli wrote:
> Brandon K <[EMAIL PROTECTED]> wrote [inverting his topposting!]:
>
>
>>> Six megabytes is pretty much nothing on a modern computer.
>>>
>
>
>> BTW, it'd be 6 megabits or 750kb ;)
>>
>
> ...but Mike was proposing using one digit per bit, hence, 6 meg
hey,
did u read my reply fully? i too feel that this matter of raising
unbound local error in one case and not raising it in the other must be
analysed...
quoting from the documentation
"If a name binding operation occurs anywhere within a code block, all
uses of the name within the block are tr
Stuart Turner <[EMAIL PROTECTED]> wrote:
> "Python is a scripting language like Perl, awk, tcl, Java etc...
It is difficult to say whether Python is a scripting language or not until
you define what you mean by "scripting language". People throw the term
"scripting language" around with wild a
Stefan Arentz wrote:
> It is really simple. When you say b.a then the instance variable 'a'
> is looked up first. If it does not exist then a class variable lookup
> is done.
This mixing of class and instance variable might be the cause of
confusion...
I think of it as follows:
1 When the class
hi,
I am trying to build a small gui program in python using boa
constructor. i have a few problems. i would be grateful if anyone can
help me in this regard.
1. i have four static text controls positioned one below the other.
what i want to do is when i change the content of the upper static text
Aquarius <[EMAIL PROTECTED]> wrote:
>I want to know if there is a way to interface a MySQL database without
>Python-MySQL or without installing anything that has C files that need
>to be compiled. The reason for this, is that I want to develop a
>certain web application, but my hosting provider ([E
Stuart Turner wrote:
> "Python is a scripting language like Perl, awk, tcl, Java etc... it
> is
> not quite a fully developed OO language, but does support some OO that
> Perl
> doesn't. To be clear, these scripting languages have their place in
> our
> environment, but they are not full repl
Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>:
> Antoon Pardon <[EMAIL PROTECTED]> writes:
>
>> Op 2005-11-03, venk schreef <[EMAIL PROTECTED]>:
>> > You see,
>> > The seen behavior is due to the result of python's name
>> > binding,scoping scheme.
>>
>> I know what causes the beha
Stefan Arentz wrote:
>
> Hi. I've wrapped a C++ class with Boost.Python and that works great. But,
> I am now packaging my application so that it can be distributed. The
> structure is basically this:
>
> .../bin/foo.py
> .../lib/foo.so
> .../lib/bar.py
>
> In foo.py I do the following:
>
>
Again (blink) quoting from the docs "
For targets which are attribute references, the initial value is
retrieved with a getattr() and the result is assigned with a setattr().
Notice that the two methods do not necessarily refer to the same
variable. When getattr() refers to a class variable, setatt
Clans Of Intrigue wrote:
> Thanks, that did the trick perfectly :)
>
> also got rid of the self._log member so the class is now just:
>
> class LogControl:
> """ Simple helper to redirect stdout to a panel in the GUI """
> def __init__( self, textCtrl ):
> self._ctrl = textCtrl
>
Brandon K wrote:
> what is .tk? Turkmenistan? or is it just some arbitrary suffix.
Nope that's tm. Tokelau has tk. I'm sure you can learn more from
Wikipedia etc. See e.g. http://en.wikipedia.org/wiki/ISO_3166-1
>
>> www.javaholics.tk
>
>
>
>
> == Posted via Newsgroups.com - Usenet Acc
On Wednesday 02 November 2005 14:10, 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 s
Antoon Pardon <[EMAIL PROTECTED]> writes:
...
> 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 now?
Because it really is executed as:
b.a = b.a + 2
1. get 't'b.a and sto
Stefan Arentz <[EMAIL PROTECTED]> writes:
> Antoon Pardon <[EMAIL PROTECTED]> writes:
>
> ...
>
> > 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 now?
>
> Because
Op 2005-11-03, venk schreef <[EMAIL PROTECTED]>:
> hey,
> did u read my reply fully? i too feel that this matter of raising
> unbound local error in one case and not raising it in the other must be
> analysed...
Yes, it seems I didn't respond to your satisfaction, but since you
don't provide det
On 11/2/05, Zlatko Matić <[EMAIL PROTECTED]> wrote:
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
On Thu, 03 Nov 2005 04:30:09 -0800, Paul Rubin wrote:
> Steve Holden <[EMAIL PROTECTED]> writes:
>> > class A:
>> > a = 1
>> > b = A()
>> > b.a += 2
>> > print b.a
>> > print A.a
>> > Which results in
>> > 3
>> > 1
>> >
>> I don't suppose you'd care to enlighten us on what you'd regard as the
>>
After my last post, I thought of another question as a result of the
following:
--
Mike Meyer wrote:
> John Salerno <[EMAIL PROTECTED]> writes:
> [Wants to learn C# and Python simultaneously.]
>
>>So my question is, is this feasible?
>
>
> Should be. It might be
Op 2005-11-03, venk schreef <[EMAIL PROTECTED]>:
> Again (blink) quoting from the docs "
> For targets which are attribute references, the initial value is
> retrieved with a getattr() and the result is assigned with a setattr().
> Notice that the two methods do not necessarily refer to the same
>
Alex Martelli wrote:
> Michael Schneider <[EMAIL PROTECTED]> wrote:
>
>
>>I would like to use weak refs in an observer pattern implementation.
>>The problme that I have seems to be that weakrefs can't manage functions.
>
>
> They can manage just fine functions written in *Python*, just not
> "b
Thanks Lasse, that was really helpful
--
http://mail.python.org/mailman/listinfo/python-list
Am Thu, 03 Nov 2005 14:47:52 + schrieb John Salerno:
> After my last post, I thought of another question as a result of the
> following:
>
> --
> Mike Meyer wrote:
> > John Salerno <[EMAIL PROTECTED]> writes:
> > [Wants to learn C# and Python simultaneously.]
>
On Thu, 03 Nov 2005 12:50:51 +, Antoon Pardon wrote:
>>> I don't care what should be different. But a line with only one
>>> referent to an object in it, shouldn't be referring to two different
>>> objects.
>>
>> It doesn't.
>
> Yes it does. If the b.a refers to the instance variable, then an
Thanks!
Mike Meyer wrote:
> John Salerno <[EMAIL PROTECTED]> writes:
> [Wants to learn C# and Python simultaneously.]
>
>>So my question is, is this feasible?
>
>
> Should be. It might be faster to do them sequentually.
>
>
>>Or does learning Python require (or entail) learning all the detail
On Thu, 03 Nov 2005 12:53:37 +, Antoon Pardon wrote:
>> I don't suppose you'd care to enlighten us on what you'd regard as the
>> superior outcome?
>
> No. I don't think a superior outcome is necessary to see that this is
> not sane behaviour. I don't care that much on how it gets fixed.
It
Steve Holden wrote:
> Volunteers don't always behave as perfect bureaucrats :-)
Neither do typical bureaucrats!
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> So how would I go about have 5 strings, and running a program that will
> randomly pick one of those to print?
>>> import random
>>> text = "Perhaps reading the manual is a good idea?".split()
>>> random.choice(text)
'is'
>>> random.choice(text)
'reading'
>>> random
Antoon Pardon wrote:
> Op 2005-11-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
>
>
>>>There are two possible fixes, either by prohibiting instance variables
>>>with the same name as class variables, which would allow any reference
>>>to an instance of the class assign/read the value of the va
Antoon Pardon wrote:
> There is no instance variable at that point. How can it add 2, to
> something that doesn't exist at the moment.
Because 'a += 1' is only a shorthand for 'a = a + 1' if a is an
immutable object? Anyway, the behaviour is well documented.
http://docs.python.org/ref/augassign.h
Alex Stapleton <[EMAIL PROTECTED]> wrote:
...
> >>> Six megabytes is pretty much nothing on a modern computer.
> >
> >> BTW, it'd be 6 megabits or 750kb ;)
> >
> > ...but Mike was proposing using one digit per bit, hence, 6 megabytes.
> > That makes it easy to search for bitpatterns with re or
Python has spoiled me. I used to periodically try out new languages
just for fun, but since learning Python, it's become a lot less
interesting. I find myself preferring to just try new ideas or
techniques in Python rather than searching for new languages to dabble
in. The last few I've download
I have done the same thing in my organisation.
Show them concrete examples of when they can benefit from Python to
Convince them.
My colleagues and bosses has been conviced and therefore my current
work task is to integrate the interpreter in a VxWorks environment so
"everyone" at the company can
I would like to package my main script and all the
modules it imports into a single script that will
run just as the collection would. It should not
need to package standard Python lib modules -- just
my local modules. This is not the same question
that would be answered with py2exe or py2app. I
do
"Steve Holden" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thomas Bartkus wrote:
> > "Steve Holden" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> >>I have a _mysql.c as a part of my distrbution of MySQLdb. Don't you?
> >>
> >
> >
> > You made me give that l
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! :)
infidel wrote:
> Python has spoiled me. I used to periodically try out new languages
> just for fun, but since learning Python,
Stanislaw Findeisen wrote:
> (2) Does anybody have any idea (sample code?) on how to create a reparse
> point (the simpler, the better) using Python?
>
The only sample code I've seen for creating reparse points is in c or c++
and its quite a messy operation. See
http://www.sysinternals.com/Ut
1 - 100 of 255 matches
Mail list logo