On 10/20/2016 2:02 AM, Paul Rubin wrote:
pozz writes:
What can I do and what *can't* I do with Tkinter?
I look at the very carefully tuned and sometimes animated UI's in fancy
desktop applications like Gimp and don't see a way to do similar things
in Tkinter.
Since I have not seen Gimp, I
On Wednesday, October 19, 2016 at 7:18:28 PM UTC+1, Demosthenes Koptsis wrote:
> I thought PyQt was supported by Qt company...
>
> There is also an official book by Prentice Hall:
>
> Rapid GUI Programming with Python and Qt (Prentice Hall Open Source
> Software Development)
>
> https://www.ama
On Thursday 20 October 2016 04:57, Chris Angelico wrote:
> Short-circuiting depends only on what's known *prior* to that
> evaluation. Dead code elimination removes the notion of time:
Surely not. I understand "dead code" to mean the same as *unreachable* code:
code which cannot be reached by an
pozz wrote:
> I have a dictionary where the keys are numbers:
>
> mydict = { 1: 1000, 2: 1500, 3: 100 }
>
> I would like to convert keys from number to string representation:
>
> mydict = { "apples": 1000, "nuts": 1500, "tables": 100 }
>
> Of course, somewhere I have the association between ke
Peter Otten <__pete...@web.de> writes:
> assert len(keydict) == len(mydict)
assert set(keydict) == set(mydict)
--
https://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
> Peter Otten <__pete...@web.de> writes:
>> assert len(keydict) == len(mydict)
>
> assert set(keydict) == set(mydict)
The weaker check is O(1), and, combined with the succeeding for loop,
implies the above.
--
https://mail.python.org/mailman/listinfo/python-list
Peter Otten wrote:
> Paul Rubin wrote:
>
>> Peter Otten <__pete...@web.de> writes:
>>> assert len(keydict) == len(mydict)
>>
>> assert set(keydict) == set(mydict)
>
> The weaker check is O(1), and, combined with the succeeding for loop,
> implies the above.
Sorry, I have to take that back:
Py
W dniu 18.10.2016 o 16:42, Ethan Furman pisze:
On 10/17/2016 11:44 PM, Mr. Wrobel wrote:
Ok,so in general, we could say that using Metclasses is ok for
manipulating __new__ but not that what is setting by __init__. Am I
right?
No and yes.
In this code (python 2 syntax):
#untested
class Wond
For a long time, under Python 2.7, I have been using htmltmpl to
generate htmjl pages programmatically from Python.
However, htmltmpl is not available for python3, and doesn't look as if
it ever will be. Can anyone recommend a suitable replacement (preferably
compatible with htmltmpl)?
Cheers, To
Tony van der Hoff writes:
> However, htmltmpl is not available for python3, and doesn't look as if
> it ever will be. Can anyone recommend a suitable replacement (preferably
> compatible with htmltmpl)?
I don't know about compatibility with that tool (I've never heard of
it).
There are many goo
Chris Angelico wrote:
Okay. Now let's suppose that, instead of "73" in the first step, you
have "ask the user for an integer". Are you allowed to eliminate this
prompt, since the result of it cannot possibly affect anything?
That's an excellent question. The answer is no, you're
not allowed to
Marko Rauhamaa wrote:
def main():
try:
guard_it()
except ValueError:
# I'm having none of it!
resume "CarryOn!"
The problem is, how can the file f unclose itself when work resumes?
The same thing could happen in Scheme, though. Re-enteri
[This announcement is in German since it targets a local user group
meeting in Düsseldorf, Germany]
ANKÜNDIGUNG
Python Meeting Düsseldorf
http://pyddf.de/
Ein Tref
Gregory Ewing :
> Marko Rauhamaa wrote:
>
>> def main():
>> try:
>> guard_it()
>> except ValueError:
>> # I'm having none of it!
>> resume "CarryOn!"
>>
>> The problem is, how can the file f unclose itself when work resumes?
>
> The same thin
在 2016年10月20日星期四 UTC+8下午1:32:18,Frank Millman写道:
> wrote in message
> news:5506e4d8-bd1d-4e56-8d1b-f71fa8293...@googlegroups.com...
>
> 在 2016年10月19日星期三 UTC+8下午3:17:18,Peter Otten写道:
> > chenyong20...@gmail.com wrote:
> >
> > > 在 2016年10月19日星期三 UTC+8上午11:46:28,MRAB写道:
> > >> On 2016-10-19 03:15,
wrote in message
news:01cfd810-0561-40b1-a834-95a73dad6...@googlegroups.com...
在 2016年10月20日星期四 UTC+8下午1:32:18,Frank Millman写道:
wrote in message
news:5506e4d8-bd1d-4e56-8d1b-f71fa8293...@googlegroups.com...
> Let's see if I can explain. I am using 't' and 'r' instead of 'tree' and
> 'root', bu
The following script works fine:
#!/bin/python
import socket
str = raw_input("Enter a domain name: ");
print "Your domain is ", str
print socket.gethostbyname(str)
You provide it a hostname, it provides an IP. That works fine. But I need a
way to handle errors. For example:
[root@bart /]#
In <8500044a-c8d1-43ad-91d9-e836d52bd...@googlegroups.com> SS
writes:
> I would like to be able to handle that error a bit better. Any ideas?
Wrap the socket.gethostbyname() call in a try/except block.
--
John Gordon A is for Amy, who fell down the stairs
gor...@panix.com
(Sorry for the late reply)
On Wed, Oct 05, 2016 at 01:56:59PM -0400, Malcolm Greene wrote:
> Looking for a quick way to calculate lines of code/comments in a
> collection of Python scripts. This isn't a LOC per day per developer
> type analysis - I'm looking for a metric to quickly judge the compl
On Thu, 20 Oct 2016 11:34:36 +0200, Tony van der Hoff wrote:
> Can anyone recommend a suitable replacement (preferably
> compatible with htmltmpl)?
I don't think anything is going to be compatible with htmltmpl, but Jinja2
is a very widely-used, well-supported and easy-to-learn templating engine
> [root@bart /]# ./dataman.py
>Enter a domain name: aslfhafja
>Your domain is aslfhafja
>Traceback (most recent call last):
> File "./dataman.py", line 7, in
> print socket.gethostbyname(str)
>socket.gaierror: [Errno -2] Name or service not known
>[root@bart /]#
>I would like to be able to h
On Wednesday, October 5, 2016 at 12:57:14 PM UTC-5, Malcolm Greene wrote:
> Looking for a quick way to calculate lines of code/comments in a
> collection of Python scripts. This isn't a LOC per day per developer
> type analysis - I'm looking for a metric to quickly judge the complexity
> of a set o
On Fri, 21 Oct 2016 06:48 am, SS wrote:
> The following script works fine:
>
> #!/bin/python
>
> import socket
>
> str = raw_input("Enter a domain name: ");
> print "Your domain is ", str
> print socket.gethostbyname(str)
>
> You provide it a hostname, it provides an IP. That works fine. But
On Thu, 20 Oct 2016 12:48:28 -0700, SS wrote:
> The following script works fine:
>
> #!/bin/python
>
> import socket
>
> str = raw_input("Enter a domain name: ");
> print "Your domain is ", str
> print socket.gethostbyname(str)
>
> You provide it a hostname, it provides an IP. That works fine
On Thu, 20 Oct 2016 12:48:28 -0700, SS wrote:
> The following script works fine:
>
> #!/bin/python
I meant to include this with my other post but I forgot it.
Using a direct path to the Python interpreter can cause problems
on some systems because it is not always installed to the same
director
On 2016-10-20 08:03 PM, Wildman via Python-list wrote:
Using a direct path to the Python interpreter can cause problems
on some systems because it is not always installed to the same
directory. On my Debian-based system Python is installed in
/usr/bin. So your code as written will not run on my
On Thursday, August 28, 2008 at 1:12:04 AM UTC-5, Michele Simionato wrote:
> On Aug 28, 6:21 am, ssecorp wrote:
> > Is there a way to view all the modules I have available for import
> > from within Python?
> > Like writing in the interpreter:
>
> Try:
>
> >>> help()
> help> modules
> Please wai
On Fri, 21 Oct 2016 11:03 am, Wildman wrote:
> On Thu, 20 Oct 2016 12:48:28 -0700, SS wrote:
>
>> The following script works fine:
>>
>> #!/bin/python
>
> I meant to include this with my other post but I forgot it.
>
> Using a direct path to the Python interpreter can cause problems
> on some
28 matches
Mail list logo