So holiday is pretty much over. I've learnt the merest basics of
Python and done two tools, on the way to webify one of them using
Bottle. Which also is confusing. Oh well.
I'm back to work so will go more into lurking mode. Just wanted to say
thanks to all who have replied to my basic and sometim
On 23/07/2014 10:27 AM, Terry Reedy wrote:
When you call a function, Python binds function parameter names to
argument objects in the function's local namespace, the same as in name
assignments. Given
def f(a, b): pass
a call f(1, 'x') starts by executing
a, b = 1, 'x'
in the local namespace.
==
Announcing bcolz 0.7.0
==
What's new
==
In this release, support for Python 3 has been added, Pandas and
HDF5/PyTables conversion, support for different compressors via latest
release of Blosc, and a new `iterblocks()` iterator.
Also, intensive
On Thu, 24 Jul 2014 22:44:51 -0400, Dave Angel wrote:
> fl Wrote in message:
>
>
>> I am puzzled about the last part of your code and want to learn
>> from it (" * " " + "*" ").
>>
>>
> 6 * " " + "x"
>
> will produce a string of 6 blanks followed by an x.
Dave is correct, but if you w
fl Wrote in message:
>
> I am puzzled about the last part of your code and want to learn
> from it (" * " " + "*" ").
>
6 * " " + "x"
will produce a string of 6 blanks followed by an x.
--
DaveA
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Jul 24, 2014 at 7:29 PM, fl wrote:
> On Thursday, July 24, 2014 10:25:52 AM UTC-4, Marko Rauhamaa wrote:
>> #!/usr/bin/env python3
>>
>> import math
>>
>> for x in range(0, 361, 15):
>>
>> print(int((math.sin(x / 180 * math.pi) + 1) * 30 + 0.5) * " " + "*")
>>
>> ==
On Thursday, July 24, 2014 10:25:52 AM UTC-4, Marko Rauhamaa wrote:
> #!/usr/bin/env python3
>
> import math
>
> for x in range(0, 361, 15):
>
> print(int((math.sin(x / 180 * math.pi) + 1) * 30 + 0.5) * " " + "*")
>
>
On 7/24/2014 1:04 PM, Chris “Kwpolska” Warrick wrote:
And it might be better to stay with Python 2, there are still
things that don't work with Py3k that you might find crucial.
It is true that there are 3rd-party modules that do not work with 3.x,
including a few that one might want to use i
On 7/24/2014 3:11 PM, Glenn Linderman wrote:
Not knowing any of these GUI platforms (although I've read some about
Tk), I have some questions.
* Which of them use UTF-8 as their native Unicode interface?
tk uses UCS-2 internally for the BMP subset. It does not display astral
chars. tkinter i
Chris Angelico wrote:
The Windows default UI changed
significantly from W2K -> XP -> Win8, and each time, it's possible to
revert to the old styling;
Well, sort of. I find that using the classic theme with
Win7 is a less-than-satisfying experience, because it
still lays things out the same way
> You could:
>
>- have a single point of entry that can check and, if necessary, revalidate
>
>- create a helper that checks and, if necessary, revalidate, which is then
> called where ever needed
>
>- create a decorator that does the above for each function that needs it
Hi Et
Herion, Ketamine,Actavis promethazine codeine 16oz and 32oz available Ketamine
Oxycontine Hydrocodone xanax and medicated marijuana US- free shipping and
other related products for sell at competitive prices.We do world wide shipping
to any clear address.Delivery is 100% safe due to our discree
On 07/24/2014 10:46 AM, Chris Angelico wrote:
> On Fri, Jul 25, 2014 at 2:29 AM, Noble Bell wrote:
>> I was leaning toward Python 3 and Tkinter. I suppose the best way to do the
>> GUI with Tkinter is to just roll-up my sleeves and do it via code rather
>> than with the aid of a GUI editor.
>
>
On 07/24/2014 01:32 PM, Ian Kelly wrote:
> On Thu, Jul 24, 2014 at 1:02 PM, Chris “Kwpolska” Warrick
> wrote:
>> AFAIK, Qt follows the system style properly, and it looks quite native
>> on every Windows OS. No idea about ttk though.
>
> My understanding is that Qt merely emulates the native LAF
On 07/24/2014 12:51 PM, Chris Angelico wrote:
> On Fri, Jul 25, 2014 at 4:33 AM, Zachary Ware
> wrote:
>>> On other platforms, it also is not 100%
>>> native.
>>
>> On Windows, at least, ttk comes very very close to it.
>
> What exactly does that mean? The Windows default UI changed
> significant
On 2014-07-24, Chris “Kwpolska” Warrick wrote:
> On Thu, Jul 24, 2014 at 8:33 PM, Zachary Ware
> wrote:
>> On Thu, Jul 24, 2014 at 12:04 PM, Chris “Kwpolska” Warrick
>> wrote:
>>> Tk is neither sane
>>
>> How so? Like any other facet of programming, using Tk(inter) has it's
>> frustrations, but
On 07/24/2014 01:11 PM, Glenn Linderman wrote:
> Not knowing any of these GUI platforms (although I've read some about
> Tk), I have some questions.
>
> * Which of them use UTF-8 as their native Unicode interface?
>
> * Which makes it easiest to discover and adjust font metrics such as
> kernin
On 2014-07-24, Zachary Ware wrote:
> On Thu, Jul 24, 2014 at 12:04 PM, Chris “Kwpolska” Warrick
> wrote:
>> Tk is neither sane
>
> How so? Like any other facet of programming, using Tk(inter) has it's
> frustrations, but for the most part it has always worked as expected
> for me. Granted, I hav
On Thu, 24 Jul 2014 13:10:03 -0700 (PDT)
Noble Bell wrote:
>
> If I were to us wxPython then I would be limited to Python 2.x at present. If
> I were to use PyQt I would have to pay, as I understand the licenses, for it
> to use in commercial programs and/or programs that I ask for donations. I
On Thu, Jul 24, 2014 at 2:25 PM, fl wrote:
> Hi,
>
> I have seen several kinds of module import examples, but most of the programs
> are
> small and less content. They only have one or two module import.
>
> I'll use the following modules in a small project. I would like to know
> whether
> it i
Hi,
I have seen several kinds of module import examples, but most of the programs
are
small and less content. They only have one or two module import.
I'll use the following modules in a small project. I would like to know whether
it is appropriate to put all of them at the file header, like thi
On Thursday, July 24, 2014 2:32:04 PM UTC-5, Ian wrote:
> On Thu, Jul 24, 2014 at 1:02 PM, Chris "Kwpolska" Warrick
>
> wrote:
>
> > AFAIK, Qt follows the system style properly, and it looks quite native
>
> > on every Windows OS. No idea about ttk though.
>
>
>
> My understanding is that Q
On Thu, Jul 24, 2014 at 2:02 PM, Chris “Kwpolska” Warrick
wrote:
> Pretty much everyone in the world hates Tcl and Tk. Ask your favorite
> search engine for some results.
Whee, I'm an alien! ;)
I'm not saying Tk is the best thing since sliced bread, I just don't
see what so many people seem to
On Thu, Jul 24, 2014 at 1:02 PM, Chris “Kwpolska” Warrick
wrote:
> AFAIK, Qt follows the system style properly, and it looks quite native
> on every Windows OS. No idea about ttk though.
My understanding is that Qt merely emulates the native LAF, although
it does a good job of it. wxPython on th
On 7/24/2014 11:15 AM, Chris Angelico wrote:
On Fri, Jul 25, 2014 at 4:04 AM, Mark Lawrence wrote:
On 24/07/2014 17:18, Chris Angelico wrote:
The first one is certainly possible. Pick any of the well-known
toolkits (Tkinter, wxwidgets, GTK, etc), and see how it feels. All of
them are portable
On Thu, Jul 24, 2014 at 1:51 PM, Chris Angelico wrote:
> On Fri, Jul 25, 2014 at 4:33 AM, Zachary Ware
> wrote:
>> On Windows, at least, ttk comes very very close to [a 100% native look].
>
> What exactly does that mean? The Windows default UI changed
> significantly from W2K -> XP -> Win8, and e
On Thu, Jul 24, 2014 at 8:33 PM, Zachary Ware
wrote:
> On Thu, Jul 24, 2014 at 12:04 PM, Chris “Kwpolska” Warrick
> wrote:
>> Tk is neither sane
>
> How so? Like any other facet of programming, using Tk(inter) has it's
> frustrations, but for the most part it has always worked as expected
> for
On Fri, Jul 25, 2014 at 4:33 AM, Zachary Ware
wrote:
>> On other platforms, it also is not 100%
>> native.
>
> On Windows, at least, ttk comes very very close to it.
What exactly does that mean? The Windows default UI changed
significantly from W2K -> XP -> Win8, and each time, it's possible to
r
On Thu, Jul 24, 2014 at 12:04 PM, Chris “Kwpolska” Warrick
wrote:
> Tk is neither sane
How so? Like any other facet of programming, using Tk(inter) has it's
frustrations, but for the most part it has always worked as expected
for me. Granted, I haven't done anything terribly fancy.
> nor nativ
On 07/23/2014 01:14 PM, Joseph L. Casale wrote:
I am doing some scripting with pyVmomi under 2.6.8 so the code may
run directly on a vmware esxi server.
As the code is long running, it surpasses the authentication timeout. For
anyone familiar with this code and/or this style of programming, doe
On Fri, Jul 25, 2014 at 4:17 AM, Terry Reedy wrote:
>> That's a function decorator. You can look them up on the web now that
>> you know what they're called. :)
>
>
> The Symbol index page was added to make knowing names unnecessary.
And I clock this up on my "learn something every day" list. Was
On Thursday, July 24, 2014 1:58:45 PM UTC-4, Chris Angelico wrote:
> On Fri, Jul 25, 2014 at 3:54 AM, fl wrote:
> > @with_setup(my_setup_function, my_teardown_function)
> > def test_numbers_3_4():
> > print 'test_numbers_3_4 < actual test code'
> > assert multi
On Thu, Jul 24, 2014 at 11:37 AM, Grant Edwards wrote:
> On 2014-07-24, Zachary Ware wrote:
>> The Python standard library includes the tkinter package, which is an
>> interface to Tcl/Tk.
>
> That's not always true for Linux systems. AFAIK, all Linux installs
> include Python (of some version o
On 7/24/2014 1:58 PM, Chris Angelico wrote:
On Fri, Jul 25, 2014 at 3:54 AM, fl wrote:
It is also a question about the symbol '@' on that link.
I don't find an explanation about '@' yet. Could you tell me?
The Python docs have an index. I STRONGLY recommend that everyone learn
to use it. Th
On Fri, Jul 25, 2014 at 4:04 AM, Mark Lawrence wrote:
> On 24/07/2014 17:18, Chris Angelico wrote:
>> The first one is certainly possible. Pick any of the well-known
>> toolkits (Tkinter, wxwidgets, GTK, etc), and see how it feels. All of
>> them are portable across the three platforms you name, s
On 24/07/2014 17:18, Chris Angelico wrote:
On Fri, Jul 25, 2014 at 1:57 AM, Noble Bell wrote:
I am exploring the idea of creating my next desktop GUI project in Python and
would like a little advice from you folks about a couple of requirements.
My requirements will be:
1. Needs to be portabl
On Fri, Jul 25, 2014 at 3:54 AM, fl wrote:
> It is also a question about the symbol '@' on that link.
>
> I don't find an explanation about '@' yet. Could you tell me?
>
> Thanks,
>
>
>
> @with_setup(my_setup_function, my_teardown_function)
> def test_numbers_3_4():
> print 'test_numbers_3_4
On Thursday, July 24, 2014 1:48:02 PM UTC-4, fl wrote:
> On Thursday, July 24, 2014 1:37:49 PM UTC-4, Chris Angelico wrote:
>
> > On Fri, Jul 25, 2014 at 3:33 AM, fl wrote:
>
> Thanks. The source of that snippet is from this link:
>
>
> http://pythontesting.net/framework/nose/nose-introduction
On Thursday, July 24, 2014 1:37:49 PM UTC-4, Chris Angelico wrote:
> On Fri, Jul 25, 2014 at 3:33 AM, fl wrote:
> > Hi,
> > I want to write some test code. Some on-line tutorials have such codes:
> >
> >
> > from unnecessary_math import multiply
> Which tutorials? That's where you'll find the answ
On Thu, Jul 24, 2014 at 11:33 AM, fl wrote:
> Hi,
> I want to write some test code. Some on-line tutorials have such codes:
>
>
> from unnecessary_math import multiply
>
> When it runs, it has errors:
>
from unnecessary_math import multiply
> Traceback (most recent call last):
> File "", li
On Fri, Jul 25, 2014 at 3:33 AM, fl wrote:
> Hi,
> I want to write some test code. Some on-line tutorials have such codes:
>
>
> from unnecessary_math import multiply
Which tutorials? That's where you'll find the answer to your question.
ChrisA
--
https://mail.python.org/mailman/listinfo/python
Hi,
I want to write some test code. Some on-line tutorials have such codes:
from unnecessary_math import multiply
When it runs, it has errors:
>>> from unnecessary_math import multiply
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named unnecessary_math
I hav
Ian Kelly :
> Callbacks can easily schedule coroutines, but they can't wait on them,
> because that would require suspending their execution, dropping back
> to the event loop, and resuming later -- in other words, the callback
> would need to be a coroutine also.
I guess the key is, can a callba
On Fri, Jul 25, 2014 at 3:04 AM, Chris “Kwpolska” Warrick
wrote:
> I personally recommend PyQt4/PySide. wxPython is also worth checking out.
> And it might be better to stay with Python 2, there are still things that
> don't work with Py3k that you might find crucial.
Can you be more specific? Py
On Jul 24, 2014 6:28 PM, "Zachary Ware"
wrote:
>
> On Thu, Jul 24, 2014 at 10:57 AM, Noble Bell wrote:
> > I am exploring the idea of creating my next desktop GUI project in
Python and would like a little advice from you folks about a couple of
requirements.
> >
> > My requirements will be:
> > 1
On Jul 24, 2014 1:26 AM, "Marko Rauhamaa" wrote:
>
> Terry Reedy :
>
> > 18.5.3. Tasks and coroutines, seems to be devoid of event wait
> > examples. However, there is a 'yield from' network example in 18.5.5
> > Streams using socket functions wrapped with coroutines. These should
> > definitely b
On Fri, Jul 25, 2014 at 2:29 AM, Noble Bell wrote:
> I was leaning toward Python 3 and Tkinter. I suppose the best way to do the
> GUI with Tkinter is to just roll-up my sleeves and do it via code rather than
> with the aid of a GUI editor.
Yep. In fact, I recommend that for all GUI toolkits; i
On 2014-07-24, Zachary Ware wrote:
> On Thu, Jul 24, 2014 at 10:57 AM, Noble Bell wrote:
>> I am exploring the idea of creating my next desktop GUI project in Python
>> and would like a little advice from you folks about a couple of requirements.
>>
>> My requirements will be:
>> 1. Needs to be
On Thursday, July 24, 2014 10:57:22 AM UTC-5, Noble Bell wrote:
> I am exploring the idea of creating my next desktop GUI project in Python and
> would like a little advice from you folks about a couple of requirements.
>
>
>
> My requirements will be:
>
> 1. Needs to be portable across platfo
On Fri, Jul 25, 2014 at 1:57 AM, Noble Bell wrote:
> I am exploring the idea of creating my next desktop GUI project in Python and
> would like a little advice from you folks about a couple of requirements.
>
> My requirements will be:
> 1. Needs to be portable across platforms with native LAF (W
On Thu, Jul 24, 2014 at 10:57 AM, Noble Bell wrote:
> I am exploring the idea of creating my next desktop GUI project in Python and
> would like a little advice from you folks about a couple of requirements.
>
> My requirements will be:
> 1. Needs to be portable across platforms with native LAF (
1. PyQt (or PySide)
2. Python 2 will be legacy soon. Use Python 3 for new project.
wxPython is also good option but doesn't support Python 3 for now.
I don't know when wxPhenix (next wxPython supporting Python 3) will be released.
On Fri, Jul 25, 2014 at 12:57 AM, Noble Bell wrote:
> I am explor
I am exploring the idea of creating my next desktop GUI project in Python and
would like a little advice from you folks about a couple of requirements.
My requirements will be:
1. Needs to be portable across platforms with native LAF (Windows,Linux,OSX)
2. Python 2 or 3? Which will serve me bette
fl :
> I have read a lot about Python, but it still has a problem now on a
> simple exercise. For example, I want to generate a sine curve.
Here you go:
#!/usr/bin/env python3
import math
for x in range(0, 361, 15):
p
On Thu, 24 Jul 2014 05:53:12 -0700, fl wrote:
> Hi,
> I have read a lot about Python, but it still has a problem now on a
> simple exercise. For example, I want to generate a sine curve. First, I
> get a time sequence:
>
> index=range(100)
>
> I import math module, try to calculate sine with
>
2014-07-24 14:53 GMT+02:00 fl :
> Hi,
> I have read a lot about Python, but it still has a problem now on a simple
> exercise. For example, I want to generate a sine curve. First, I get a time
> sequence:
>
> index=range(100)
>
> I import math module, try to calculate sine with
>
> math.sin(index*m
You can use `list(math.sin(x * math.pi / 2) for x in index)` or use `numpy`,
which supports array math.
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
I have read a lot about Python, but it still has a problem now on a simple
exercise. For example, I want to generate a sine curve. First, I get a time
sequence:
index=range(100)
I import math module, try to calculate sine with
math.sin(index*math.pi/2)
but it fails.
It is possible to use
On Wednesday, July 23, 2014 4:43:11 AM UTC-4, Leo jay wrote:
> But if you use windows and you happen to use multiprocessing,
> please be aware of this bug I encountered several years ago.
> https://mail.python.org/pipermail/python-dev/2011-December/115071.html
It looks like this was fixed for 3.2
On Thu, Jul 24, 2014 at 8:12 PM, Steven D'Aprano wrote:
>> Would it be possible to snapshot all critical globals with a closure, to
>> force them to be held? Something like:
>
> Probably. Or even as default argument parameters. But I'd like to know if
> that's actually fixing it or just perturbing
Sturla Molden wrote:
> Monte Milanuk wrote:
> > Aaaannnd here we have a good example of why it would be really nice to
> > be able to filter/score based on the message *body*, not just the
> > headers. 8(
>
> Actually, here we have the reason why Usenet died.
>
... and the alternatives have the
On Thu, 24 Jul 2014 11:50:47 +1000, Chris Angelico wrote:
> On Thu, Jul 24, 2014 at 11:30 AM, Steven D'Aprano
> wrote:
>> However, I think I have a glimmer of an idea for how the global
>> variable might be set to None. When the Python interpreter shuts down,
>> it sets global variables to None i
Martin S writes:
> I have functions A B and C. If data generated in A is useable in both
> B and C how do I ensure this data is passed as needed? Or is it a
> symptom of bad code?
This is very vague; an accurate answer is “it depends”.
You seem to be asking about how to design your data structu
On Thu, 24 Jul 2014 09:27:10 +0200, Martin S wrote:
> Function A collects data and then calls function B with some, but also
> has data that should be passed to function C.
It might help if you give a bit more information. How does it collect
data, how does it decide which bits of information sh
On Thu, Jul 24, 2014 at 5:27 PM, Martin S wrote:
> Function A collects data and then calls function B with some, but also has
> data that should be passed to function C.
>
> But ofc if nested functions are allowed then that might solve the issue. I
> don't think I've seen nested functions mentione
Function A collects data and then calls function B with some, but also has data
that should be passed to function C.
But ofc if nested functions are allowed then that might solve the issue. I
don't think I've seen nested functions mentioned in a tutorial I've been
looking at.
/martin s
On 2
Terry Reedy :
> 18.5.3. Tasks and coroutines, seems to be devoid of event wait
> examples. However, there is a 'yield from' network example in 18.5.5
> Streams using socket functions wrapped with coroutines. These should
> definitely be used instead of sleep. In fact, for cross-platform
> network
On Thu, Jul 24, 2014 at 4:36 PM, Martin S wrote:
> How do you pass data from one function to many?
>
> I have functions A B and C. If data generated in A is useable in both
> B and C how do I ensure this data is passed as needed? Or is it a
> symptom of bad code?
This is a little vague. Is there
My coding is slowly (*) progress at the moment. Looking at my more or
less horrible efforts so far one (well that's understatement)
questions pops up. How do you pass data from one function to many?
I have functions A B and C. If data generated in A is useable in both
B and C how do I ensure this
On 7/24/2014 1:15 AM, Saimadhav Heblikar wrote:
On 24 July 2014 05:54, Terry Reedy wrote:
On 7/23/2014 6:43 AM, Saimadhav Heblikar wrote:
Hi,
The example in question is
https://docs.python.org/3/library/asyncio-task.html#example-hello-world-coroutine.
I'd like to learn the purpose of the st
70 matches
Mail list logo