On Sat, Jun 18, 2011 at 2:17 PM, John Salerno wrote:
> 1)
> class Character:
>
> def __init__(self, name, base_health=50, base_resource=10):
> self.name = name
> self.health = base_health
> self.resource = base_resource
If you expect to override the health/resource, I'd us
On Sat, Jun 18, 2011 at 2:49 PM, Steven D'Aprano
wrote:
> Not quite. In my config language, "ignored" means ignored. There was no
> way of accessing the rest of the file, short of guessing the file name,
> opening it and reading it as text.
>
> In Perl, the __END__ and __DATA__ keywords mark the e
s, but if you
want it to be a good game, sometimes you need to go back on decisions
like that.
And that's where mailing lists like this are awesome. I've learned so
much from the wisdom here... there is an amazing amount of expertise
being offered freely!
Chris Angelico
--
http://mail.
art from
requiring about three times as much data from /dev/random, it wasn't
materially different from a simple SSL cert check...
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
dler(filehandler)
del logging.Logger.manager.loggerDict[self.logger.name]
del self.logger # optional
I am curious as to why you create a new logger for each thread.
The logging module has thread synchronization in it, so that you
can share one log (or several logs) amongst all threads
On Sun, Jun 19, 2011 at 6:40 AM, Michael Hrivnak wrote:
> On Sat, Jun 18, 2011 at 1:26 PM, Chris Angelico wrote:
>> SSL certificates are good, but they can be stolen (very easily if the
>> client is open source). Anything algorithmic suffers from the same
>> issue.
>
&g
unction. I commented on my program as to what it should do, but
> nothing is printing. I know I am off, but not sure where. Please
> help:(
Netiquette comment: Please avoid SHOUTING and including unnecessary
entreaties in your subject lines in the future.
Cheers,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
ths, not the
actual words themselves, as keys.
Corrected version (there are several ways to do this):
length = len(word)
freq[length] = freq.get(length, 0) + 1 # See dict.get() docs for details
> for word in freq.items():
Items returns a collection of key-value pairs, not a collection of
keys. If you just want the keys, omit the `.items()`.
Also, this seems to be indented wrong. You're running the output loop
once per line rather than once per file.
Finally, the dictionary yields its keys/items in no particular order;
based on the sample output, you'll need to sort the word lengths if
you want to output the table's rows in ascending order.
Cheers,
Chris
--
http://rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Jun 19, 2011 at 10:38 AM, Gregory Ewing
wrote:
> And that only if the attacker isn't a Python programmer.
> If he is, he's probably writing his attack program in
> Python anyway. :-)
>
I was thinking you'd have it call on various functions defined
elsewhere in the program, forcing him to
ight also want to take a look at PEP 302:
http://www.python.org/dev/peps/pep-0302/
If you use "subprocess" to run program B, it cannot affect program
A in any way that program A does not allow. This gives you a lot
more control, with the price you pay being that you need to open
some
he mailinglist digest, or at
the very least please trim off the irrelevant quoted posts in your
reply.
> #print ("Length \t" + "Count\n")#print header for all numbers.
> for word, count in freq.items():
> print(len(word), count)
>
> fileProcess()
Cheers,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Jun 19, 2011 at 10:56 PM, Ethan Furman wrote:
> Lie Ryan wrote:
>> def cdr(L):
>> return L[1]
>
> IANAL (I am not a Lisper), but shouldn't that be 'return L[1:]' ?
In LISP, a list is a series of two-item units (conses).
>> L = (a, (b, (c, (d, None
This represents the LISP equival
raw_input()
"Ha ha! 'Tis mine!", he said.
>>> print repr(x)
'"Ha ha! \'Tis mine!", he said.'
In this instance, repr chose to use single quotes, but the same applies.
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Jun 20, 2011 at 1:39 AM, Laurent Claessens wrote:
> My problem is that when FileToCopyTask raises an error, the program does not
> stop.
> In fact when the error is Disk Full, I want to stop the whole program
> because I know that the next task will fail too.
If you're starting a thread f
.It'll keep some and not others, and then
you can make use of just the ones you get back.
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
d's run() method one by one,
which should propagate any exceptions in the same way that function
calls usually do.
Can you share the code for one of the tasks, and show what happens
when it raises an exception?
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 18, 2011, at 9:26, John Salerno wrote:
> Whew, thanks for all the responses! I will think about it carefully
> and decide on a way. I was leaning toward simply assigning the health,
> resource, etc. variables in the __init__ method, like this:
>
> def __init__(self, name):
>self.name
#x27;ve already
hit on the two broad types (import the code, or use stdout/rc).
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
to make ~-paths work:
http://docs.python.org/library/os.path.html#os.path.expanduser
Cheers,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
declaring variables.
In my opinion it's better to declare them, except in interactive code
(eg IDLE or just typing "python"). But Python isn't that.
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
efore, you can subscript the return value to get either
element:
>>> divmod(99.6,30.1)[0]
3.0
Thus, you can call bool() on the subscripted value to convert
this to True-if-not-zero False-if-zero:
>>> bool(divmod(99.6,30.1)[0])
True
--
In-Real-Life: Chris Torek,
On Tue, Jun 21, 2011 at 10:39 AM, Ben Finney wrote:
> gervaz writes:
> Python doesn't have variables the way C or many other languages have
> them.
>
> Instead, Python has objects, and references to those objects so you can
> get at them. The Python documentation, much to my frustration, calls
>
n classes that are only defined in
user-provided code -- but to raise them, those functions have to
include whatever code defines them, so I think this all just works.)
The key thing needed to make this work, though, is the base cases
for system-provided code written in C, which pylint by definitio
On Tue, Jun 21, 2011 at 11:43 AM, Chris Torek wrote:
> It can be pretty obvious. For instance, the os.* modules raise
> OSError on errors. The examples here are slightly silly until
> I reach the "real" code at the bottom, but perhaps one will get
> the point
On Tue, Jun 21, 2011 at 12:38 PM, Ben Finney wrote:
> The *binding* is scoped.
>
And the binding follows the exact same rules as anything else would.
It has scope and visibility. In terms of the OP, the binding IS like a
variable.
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
In article
Chris Angelico wrote:
>Interesting concept of pulling out all possible exceptions. Would be
>theoretically possible to build a table that keeps track of them, but
>automated tools may have problems:
>
>a=5; b=7; c=12
>d=1/(a+b-c) # This could throw ZeroDivisionError
d so on) has a class attribute called
> "f", and if it does, calls f(x, *args)?
See the first paragraph under the "Classes" entry on
http://docs.python.org/reference/datamodel.html#objects-values-and-types
for perfect accuracy.
Cheers,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
ggest submitting to the Python Job Board:
http://www.python.org/community/jobs/howto/
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
http://mail.python.org/mailman/listinfo/python-list
came from, but note that on
Unix, the "os" module also provides os.WIFSIGNALED, os.WTERMSIG,
os.WIFEXITED, and os.WEXITSTATUS for dissecting the "status"
integer returned from the various os.wait* calls.
Again, if you use the subprocess module, you are insulated from
this sort of det
>On Tue, 21 Jun 2011 01:43:39 +0000, Chris Torek wrote:
>> But how can I know a priori
>> that os.kill() could raise OverflowError in the first place?
In article <[email protected]>
Steven D'Aprano wrote:
>You can't. Even i
On Wed, Jun 22, 2011 at 7:48 AM, John Salerno wrote:
> Thanks for the all the advice everyone. Now I'm on to problem #4, and
> I'm stumped again, but that's what's fun! :)
So now that you've solved it, I'd like to see some fast one-liners to
do the job. (Since Python cares about whitespace, it mi
Oops, realized after posting that there's a bug in my code - it
returns 1 for a perfect square. Need another check in the 'while'
loop, thus:
On Wed, Jun 22, 2011 at 8:59 AM, Chris Angelico wrote:
> exec 600851475143; for (int i=2;ii) ret/=i
>
> while not ret%i and ret
pythontest.com:8000/
Find a bug, get noted as a contributor! :)
Thanks!
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Jun 22, 2011 at 12:02 PM, Paul Rubin wrote:
> Chris Angelico writes:
>> users to supply scripts which will then run on our servers...
>> The environment is Python 3.3a0 embedded in C++, running on Linux.
>
> This doesn't sound like a bright idea, given the
nline for another shot once
things are sorted out!
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
and how much dev time it's going to take me to
change languages...
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
, so it may as well iterate over the generator instead.
But I don't really understand what codePoints() does. Is it expecting
the parameter to be a string of bytes or of Unicode characters?
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
#x27;t technical, then you should have a top-level
try...except around almost the entire program that displays a simple
error message in the event of an unhandled exception, preferably with
an option to display the gory details (i.e. exception & stack trace).
Cheers,
Chris
--
http://rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Jun 22, 2011 at 1:50 PM, Saul Spatz wrote:
> This is the third time I've tried to post this reply. If you see multiple
> answers from me, that's why.
>
All three came through on the mailing list, but out of order - this
one came in second.
Chris Angelico
--
htt
while r == 0:
yield p
if q == 1:
return
num = q
q, r = divmod(num, p)
if __name__ == '__main__':
for arg in (sys.argv[1:] if len(sys.argv) > 1 else ['600851475143']):
try:
arg = int(arg)
ex
On Wed, Jun 22, 2011 at 10:01 PM, Anny Mous wrote:
> prime = table[i]
> del table[i]
>
I don't fully understand your algorithm, but I think these two lines
can be rewritten as:
prime=table.pop(i)
Interesting algo. A recursive generator, not sure I've seen one of those befor
` instead.
Based on this, I'd say that nfold.py was written for Python 2.x rather
than Python 3.x; so you'll either need to port it to Python 3.x, or
install Python 2.x and run it under that.
Cheers,
Chris
--
http://rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list
)
lastValue = iterator.next()
while True:
print lastValue
try:
lastValue = iterator.send(lastValue + 1)
except StopIteration:
break
print data
>>> execute()
0
1
2
3
4
5
6
7
8
9
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Chris
On Wed, Jun 22, 2011 at 4:10 PM, Ne
On Wed, Jun 22, 2011 at 11:50 PM, kkiranmca wrote:
> Hi i am new for this version and could please help me .
You didn't pose an actual question...
Cheers,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Jun 23, 2011 at 9:58 PM, Waldek M. wrote:
> Of course, it is just my personal opinion. It might be not pythonic,
> I may be wrong, yet - concept of constants is not something new and
> if other languages, like C/C++/Java/Perl/ (bash even) have them,
> I can't see the reason not to have the
== '__main__':
d = {'one': 1, 'two': 2, 'three': 3}
l = [9, 8, 7]
print 'modify dict %r' % d
for i in IndirectIter(d):
i.set(-i.get())
print 'result: %r' % d
print
print 'modify list %r' % l
On Fri, Jun 24, 2011 at 2:58 AM, Eric Snow wrote:
> So, which are the other pieces of Python that really need the heavy
> optimization and which are those that don't? Thanks.
>
Things that are executed once (imports, class/func definitions) and
things that primarily wait for user input don't nee
In article <[email protected]>,
Gregory Ewing wrote:
>Chris Torek wrote:
>
>> Oops! It turns out that os.kill() can raise OverflowError (at
>> least in this version of Python, not sure what Python 3.x does).
>
>Seems to me that if this happens it ind
2011/6/24 Waldek M. :
> Dnia Fri, 24 Jun 2011 01:29:38 +1000, Chris Angelico napisał(a):
>> You can have them in Python. Just run your code through cpp (the C
>> preprocessor) first. Voila!
>>
>> It's handy for other things too. Don't like Python's lac
the
above into an iterator, and handling container classes that have
an __iter__ callable that produces an iterator that defines an
appropriate index-and-value-getter, is left as an exercise. :-) )
--
In-Real-Life: Chris Torek, Wind River Systems
Intel require I note that my opinions are not those of W
On Fri, Jun 24, 2011 at 10:07 AM, Steven D'Aprano
wrote:
> On Fri, 24 Jun 2011 04:00:17 +1000, Chris Angelico wrote:
>
>> On Fri, Jun 24, 2011 at 2:58 AM, Eric Snow
>> wrote:
>>> So, which are the other pieces of Python that really need the heavy
>>> op
On Fri, Jun 24, 2011 at 2:32 PM, Chetan Harjani
wrote:
> x=y="some string"
> And we know that python interprets from left to right. so why it doesnt
> raise a name error here saying name 'y' is not defined?
In most languages, the answer is that the = operator associates right
to left, even though
On Fri, Jun 24, 2011 at 5:14 PM, Ethan Furman wrote:
> --> x = x['huh'] = {}
> --> x
> {'huh': {...}}
>
I would have to call that dodgy practice... unless you have a lot of
places where you need a dictionary with itself as an element, I would
avoid assignments that depend on each other.
Perhaps
>Chris Torek wrote:
>> I can then check the now-valid
>> pid via os.kill(). However, it turns out that one form of "trash"
>> is a pid that does not fit within sys.maxint. This was a surprise
>> that turned up only in testing, and even then, only because I
&g
On Sat, Jun 25, 2011 at 7:02 AM, Terry Reedy wrote:
> If I have ever used this sort of multiple assignment, it has been for simple
> unambiguous things like "a = b = 0".
For which it's extremely useful. Initialize a whole bunch of variables
to zero... or to a couple of values:
minfoo=minbar=minq
" would be FooException +
Y.__exceptions__ + Z.__exceptions__. It won't be perfect, but it'd be
something that could go into an autodoc-style facility. Obviously you
can fiddle with things, but in _ordinary usage_ this is what it's
_most likely_ to produce.
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
2011/6/25 Waldek M. :
> Dnia Fri, 24 Jun 2011 08:00:06 +1000, Chris Angelico napisał(a):
>>> Yup, got the sarcasm, that's for sure.
>>> But your point was...?
>>
>> That if you want something, there's usually a way to get it.
>> Sometimes, giving so
On Sun, Jun 26, 2011 at 12:28 AM, wrote:
> Chris Angelico wrote:
>
>> Sure it can. And KeyboardInterrupt could be raised at any time, too.
>> But this is a TOOL, not a deity. If Function X is known to call
>> Function Y and built-in method Z,
>
> Known by whom? Yo
ent (not expression) has the form:
and the evaluation order is, in effect and using pseudo-Python:
1. -- the (single) RHS
tmp = eval()
2. for in : # left-to-right
= tmp
When there is only one item in the (i.e., just one
"x =" part in the whole stateme
al
for x in (
'1',
'1.00',
'1.23400e-8',
'0.003'
):
print 'sigdig(%s): %d' % (x, sigdig(D(x)))
--
In-Real-Life: Chris Torek, Wind River Systems
Intel require I note that my opinions are not those of WRS or Intel
Salt Lake City,
On Mon, Jun 27, 2011 at 1:28 AM, rzed wrote:
> As to 2to3, I have to say that:
>
> -def a(b, (c,d)):
> +def a(b, xxx_todo_changeme):
> + (c,d) = xxx_todo_changeme
>
> ... is not terribly revealing if one is unaware of what about it
> needs changing. I know, I know: RTFM
Sure, but you don't
rrently you're printing out one word and one length from
each line, which isn't terribly useful. Try this:
for wordlen, wordfreq in freq.enumerate():
print(wordlen+"\t"+wordfreq);
This should be outside the 'for line in' loop.
There's a few other improvements po
On Tue, Jun 28, 2011 at 3:00 AM, Cathy James wrote:
> for word in line.lower().split( ):#split lines into words and make lower
> case
By the way, side point: There's not much point lower-casing the line
when all you care about is the lengths of words :)
ChrisA
--
http://mail.python.org/mailman/
On Tue, Jun 28, 2011 at 12:56 PM, Steven D'Aprano
wrote:
> Zero sig figure: 0
>
Is 0.0 one sig fig or two? (Just vaguely curious. Also curious as to
whether a zero sig figures value is ever useful.)
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
the bright side, I think in part due to this /exact/
misunderstanding, in bleeding-edge Python v3.3 you can now write:
>>> subprocess.call(["ls"], stdout=subprocess.DEVNULL)
http://docs.python.org/dev/library/subprocess.html#subprocess.DEVNULL
Cheers,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jun 28, 2011 at 9:47 PM, Mel wrote:
>
> By convention, nobody ever talks about 1 x 9.97^6 .
Unless you're a British politician of indeterminate party
allegiance famous line, quoted as #6 in here:
http://www.telegraph.co.uk/culture/tvandradio/7309332/The-ten-funniest-ever-Yes-Minister-
, same as the
prefix.
This is completely untested, but it should be a start. (Replace the
calls to the imaginary "emit" function with whatever you do to emit
results - for the intermediate passes, that's probably appending to a
list.)
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Jun 29, 2011 at 8:56 AM, Chris Angelico wrote:
> else emit(lastprefix+tails)
> else emit(lastprefix+tails)
Typo in the above code. The else needs a colon after it, both times.
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
be useful to those trying to
help you.
Cheers,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
your own mkstemp() (this can be a bit of a challenge!).
Finally, as I implied above in talking about the os.link()-then-
os.rename() sequence, if the original file has multiple links to
it, note that this "breaks the links". If this is not what you
want, the problem has no fully general solut
l
Full package details including mailing list, irc and bug tracker details
can be found here:
http://www.simplistix.co.uk/software/python/mortar_rdb
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
htt
On Fri, Jul 1, 2011 at 3:18 AM, MRAB wrote:
> Looks like it hasn't changed even in WinXP, Python 3.2.
>
> Is IOError what you'd expect, anyway?
>
> What should it do in Python 3.2? Exception or max(seconds, 0)?
The obvious thing for it to do is to go back in time and resume
executing that many se
m willing to provide
>> assistance, see also my suggestion in
>> <news:[email protected]>.
>
> Hi,
>
> Who is responsible?
I would assume those named in the footer of
http://mail.python.org/mailman/listinfo/python-list , for whom
python-list-ow...@py
regular urlopen(), get the headers using the .info()
method of the resulting object, and do the file writing manually.
Cheers,
Chris
--
http://rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list
s waiting for the OS pipe buffer to accept more data. ***Use
communicate() to avoid that.***" [emphasis added]
Cheers,
Chris
--
http://rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list
th an actual file object.
Cheers,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Jul 1, 2011 at 8:33 PM, TP wrote:
> Not sure if this is relevant. I use mail.google.com to follow mailing
> lists and a large proportion of python-list traffic ends up in my
> gmail spam folder for some reason?
Set a filter (you can "Filter messages like this") that says "Never
spam". Tha
ithout using import" but all you have to
do is arrange for python to import this module before running
any of your own code, e.g., with $PYTHONHOME and a modified
site file.
--
In-Real-Life: Chris Torek, Wind River Systems
Intel require I note that my opinions are not those of WRS or Intel
Sa
ange(1,10))
def clearSet(self):
# ...rest same as before...
Cheers,
Chris
--
http://rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list
def __init__(self):
>> self.mySet = sets.Set(range(1,10))
>>
>> def clearSet(self):
>> # ...rest same as before...
>
>
> Thanks Chris. That was certainly very helpful!!
>
> So just out of curiosity, why does it work as I had expected when the
>
mand that other people write your glue for you,
because chances are they won't do as good a job as an expert in the
language.
C or C++ bindings will cover most languages.
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Jul 3, 2011 at 10:21 AM, rantingrick wrote:
> No. Aspell should offer bindings for THE "Unity API" and the
> respective "abstraction communities" are then responsible for
> maintaining a plugin for their "abstraction" into THE Unity API.
>
Your proposed "Unity API" (which I assume has not
'Test'])
But:
>>> c=['Foobar']
>>> c,d
(['Foobar'], ['Test'])
When you do a=2 or c=['Foobar'], you're rebinding the name to a new
object. But c.append() changes that object, so it changes it
regardless of which name you look for it by.
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Jul 2, 2011 at 5:46 PM, Chris Angelico wrote:
> On Sun, Jul 3, 2011 at 8:23 AM, Saqib Ali wrote:
>> So just out of curiosity, why does it work as I had expected when the
>> member contains an integer, but not when the member contains a set?
>
> It's no
On Sun, Jul 3, 2011 at 10:58 AM, rantingrick wrote:
>
> Take Pidgin[1] as an example. Pidgin is a universal chat client. It's
> a glue between the many chat clients that exist... It's a monkey patch
> for chat multiplicity but you get the idea. However the Unity API
> cannot be a monkey patch. It
On Sun, Jul 3, 2011 at 11:07 AM, Chris Rebert wrote:
>>>>> c,d
>> ({}, [])
>
> Nasty typo in your pseudo-interpreter-session there...
Whoops! This is what I get for trying to be too smart!
>>> c,d
([], [])
Thanks for catching that, Chris. :)
(another) Chri
learning. It means you can transfer
knowledge from one language to another. It doesn't make either
useless.
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
invoke some COM API that does window
positioning+resizing. I am unable to give more details as I'm on a
Mac.
Sidenote: Have you tried Firefox's "Bookmark All Tabs" feature?
Cheers,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
mend change. Use try/except to
catch exceptional situations, not normalities. If your code is going
through the except block most of the time, there's probably something
wrong. Note I don't say there IS something wrong; it's an example of
code smell, and can be correct.
Your code has much in its favour. I've been wordy in suggestions but
that doesn't mean you have bad code! :)
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
> On Sat, Jul 2, 2011 at 7:10 PM, Chris Rebert wrote:
>> On Sat, Jul 2, 2011 at 6:21 PM, Dustin Cheung wrote:
>> > Hey guys,
>> > I am new to python. I want to make a shortcut that opens my websites
>> > and re-sizes them to
>> > point to to the ri
("wait wha? This programmer's defined + and *
in opposite precedence to usual!"). But hey, there's only one language
that you need to learn!
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Jul 3, 2011 at 1:41 PM, John Salerno wrote:
> Yeah, I considered that, but I just hate the way it looks when the
> line wraps around to the left margin. I wanted to line it all up under
> the opening quotation mark. The wrapping may not be as much of an
> issue when assigning a variable li
A new
user should learn from day one that variables need to be stored
somewhere, so Python should stop coddling its newbies and actually get
them to do things right:
var(0x14205359) x # Don't forget to provide an address where the
object will be located
x=42
After all, everyone's gotta l
acters. If you divide the contents of the file on
the "\n" character, and then try to work with the end of each line,
you may find that the string has a "\r" character at the end.
3) What Irmen de Jong said. :)
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
> windows should have equal status.
I don't know Tkinter, but from the look of the example code, he's
creating a Label that's not attached to a window, and then packing it
into nothing. The toolkit kindly creates him a window. Is that the
"root GUI window" that he means? A basic top-level window?
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jul 5, 2011 at 1:19 AM, rantingrick wrote:
> But let's dig a little deeper here. Your comment suggests that you
> "personally" need to create multiple windows for your applications. Is
> this correct? If so i pity any users of such application as they would
> be thoroughly confused. Most a
On Tue, Jul 5, 2011 at 1:46 AM, rantingrick wrote:
> On Jul 4, 10:40 am, Chris Angelico wrote:
>
>> Uhh, sorry. No. There are plenty of good reasons for one application
>> to make multiple top-level windows, and if I ever find myself using a
>> toolkit that makes this d
Has anyone ever used a very-high-level language (like Python or Ruby
or Lua) to write, say, a video driver? There is a place for the
languages that take most of the work away from the programmer, and a
place for languages that basically give you the hardware and say "have
fun". There will never be a universal language that does both jobs
perfectly. *returns the crystal ball*
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jul 5, 2011 at 2:37 AM, OKB (not okblacke)
wrote:
> Well, what I'm saying is I use an editor that lets me make the
> lines as long as I want, and it still wraps them right, so I never
> explicitly hit enter to break a line except at the end of a string (or
> paragraph).
In this ins
On Tue, Jul 5, 2011 at 3:09 AM, rantingrick wrote:
> On Jul 4, 11:01 am, Chris Angelico wrote:
>> This is not
>> a modal dialog; it's not even a modeless dialog - it's a completely
>> stand-alone window that can be moved around the Z order independently
>> of
2801 - 2900 of 20008 matches
Mail list logo