On 03/23/2015 05:31 PM, Carsten Lechte wrote:
On 23/03/15 19:44, Dave Angel wrote:
I'll give you a worse version. Back in the day I had occasion to
write a simple program
in a language which had no add or subtract. It could only increment
and decrement
indices.
Oh yes, the olden days. I
On 03/23/2015 07:49 PM, Chris Angelico wrote:
On Tue, Mar 24, 2015 at 10:12 AM, Dave Angel da...@davea.name wrote:
On the other hand, my loop makes some non-obvious assumptions, like that
append is always the right place to put a new value.
Yes, I had to stop and think about that one a bit
On 03/23/2015 06:53 PM, Terry Reedy wrote:
On 3/23/2015 2:44 PM, Dave Angel wrote:
## Example 2: Using recursion with caching
cache = [0, 1]
def fib4(n):
if len(cache) = n:
value = fib4(n-2) + fib4(n-1)
cache.append(value)
return cache[n]
This one takes less than
On 03/23/2015 08:19 PM, Steven D'Aprano wrote:
On Tue, 24 Mar 2015 03:16 am, Chris Angelico wrote about the standard
recursive version of the Fibonacci series:
On Tue, Mar 24, 2015 at 3:01 AM, Ganesh Pal ganesh1...@gmail.com wrote:
def fib(n):
if n == 0:
return 0
elif n
Jason Heeris jason.hee...@gmail.com wrote:
In terms of toolkit bindings, (a) I prefer GTK, but (b) it's impossible to
tell what the greater proportion of people using one vs. the other is. Or
if they're wise to do so. Are there more Google hits/SO questions because
it's harder to use? Or because
In the past, I've used Visual-C++ for creating dialog-based interfaces for
controlling equipment and displaying data, and I'm looking for something
of similar ease-of-use in Python since that's now my preferred language.
A web-search told me that Glade seems to be most peoples choice (over
On 03/15/2015 03:09 PM, jonas.thornv...@gmail.com wrote:
Den söndag 15 mars 2015 kl. 20:01:36 UTC+1 skrev Paul Rubin:
jonas.thornv...@gmail.com writes:
I though it would be interesting doing comparissons in timing adding
massive digits in different bases. Especially in Python.
Python has
On 03/16/2015 03:36 AM, Chris Angelico wrote:
On Mon, Mar 16, 2015 at 6:32 PM, Dave Angel da...@davea.name wrote:
Assuming Python 3.x of course. if you're in Python 2, you'd use long
rather than int.
Not sure you need to bother. Even in Py2, you can use the int
constructor to get a long
Mark Lawrence breamore...@yahoo.co.uk wrote:
http://pyfound.blogspot.co.uk/2015/03/bbc-launches-microbit.html may be
of interest to some of you.
Python is one of the three languages that work with the device.
That's cool, and the article says that the Raspberry Pi Foundation is
involved in
On 03/14/2015 05:57 AM, Chris Angelico wrote:
On Sat, Mar 14, 2015 at 12:35 PM, Dave Angel da...@davea.name wrote:
Not if you don't take it to him. If you just call him on the phone, and say
Jimmy doesn't work he doesn't even know what make and model the vehicle
is. Or whether it's even a car
On 03/13/2015 09:24 PM, Steven D'Aprano wrote:
sohcahto...@gmail.com wrote:
We need more information than just It doesn't work. You wouldn't go to
a car mechanic and say It makes a funny noise, would you? No.
Actually, most likely yes.It's remarkably hard to describe noises, and often
On 03/14/2015 06:50 AM, Jason Heeris wrote:
I am trying to automate the use of some old, in-house terminal-based
programs that use screen redrawing for their interface. This includes
single line redrawing (eg. using '\r' and overwriting), complete screen
clearing, and fine-grained cursor
On 03/14/2015 12:51 PM, Chris Angelico wrote:
On Sun, Mar 15, 2015 at 3:33 AM, Rustom Mody rustompm...@gmail.com wrote:
As best as I can see python makes no distinction between such a foo and
the more usual function/methods that have no returns.
You can I can talk about these and distinguish
On 03/11/2015 10:41 AM, Wolfgang Maier wrote:
From the documentation of sys.executable:
A string giving the absolute path of the executable binary for the
Python interpreter, on systems where this makes sense. If Python is
unable to retrieve the real path to its executable, sys.executable
On 03/07/2015 02:15 PM, Markos wrote:
Hi,
I'm beginning to study the numpy.
When I open a terminal (Debian Squeeze) and run the python interpreter
the command import numpy as np run without errors.
But when I run the same command on idle3 the following error appears.
import numpy as np
On 03/09/2015 08:56 PM, Chris Angelico wrote:
On Tue, Mar 10, 2015 at 11:45 AM, Paulo da Silva
p_s_d_a_s_i_l_v_a...@netcabo.pt wrote:
Hi!
What is the best way to read a file that begins with some few text lines
and whose rest is a binary stream?
As an exmaple ... files .pnm.
Thanks for any
On 03/09/2015 08:45 PM, Paulo da Silva wrote:
Hi!
What is the best way to read a file that begins with some few text lines
and whose rest is a binary stream?
As an exmaple ... files .pnm.
Thanks for any comments/help on this.
In which version of Python? there's a huge difference between
On 03/06/2015 11:14 AM, Gene Heskett wrote:
On Friday 06 March 2015 06:22:34 Dave Angel wrote:
Sorry, but 50! is not even close to 50**50. The latter is 85 digits
as you say, but 50! is only 64.
30414093201713378043612608166064768844377641568960512L
What utility output
On 03/06/2015 05:32 AM, Gene Heskett wrote:
On Friday 06 March 2015 03:24:48 Abhiram R wrote:
A list of 100 elements has approximately 9.33 x 10**157
permutations. If you could somehow generate one permutation every
yoctosecond, exhausting them would still take more than a hundred
orders of
On 03/06/2015 01:44 AM, Abhiram R wrote:
Hi all,
Is there a way to generate permutations of large arrays of sizes say,in the
hundreds, faster than in the time itertools.permutations() can return?
When dealing with large loops like that (or even permutations of 50,
which is also gy-normous
Ben Finney ben+pyt...@benfinney.id.au wrote:
Chris Angelico ros...@gmail.com writes:
import base64; exec(…)
That's all I need to know. Code with ‘exec()’ calls, I consider unsafe
by default.
Indeed. replacing exec with print...
On 03/02/2015 02:09 PM, Ben Finney wrote:
Dave Angel da...@davea.name writes:
And D'oh right back at ya. Ironic isn't it that I make a second
mistake in the same message I correct yours?
URL:https://en.wikipedia.org/wiki/Muphry%27s_law
I guess that word is too small to qualify
On 03/02/2015 11:25 AM, Chris Angelico wrote:
On Tue, Mar 3, 2015 at 3:09 AM, alister
alister.nospam.w...@ntlworld.com wrote:
Sounds ominous. Is that better or worse than the final solution?
As in this program will inadvertantly self distruct in five seconds?
It's usually implied as being
On 03/02/2015 05:40 PM, alb wrote:
Hi Dave,
Dave Angel da...@davea.name wrote:
[]
or use a raw string:
i = r'\\ref{fig:abc}'
Actually that'd be:
i = r'\ref{fig:abc}'
Could you explain why I then see the following difference:
In [56]: inp = r'\\ref{fig:abc}'
print inp
and you
On 03/02/2015 08:51 AM, alb wrote:
Hi Steven,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
[]
Since \r is an escape character, that will give you carriage return followed
by ef{fig:abc.
The solution to that is to either escape the backslash:
i = '\\ref{fig:abc}'
or use a raw
On 03/02/2015 02:59 AM, alb wrote:
Hi everyone,
I'm writing a document in restructured text and I'd like to convert it
to latex for printing. To accomplish this I've used semi-successfully
pandoc and the wrapper pypandoc.
I don't see other responses yet, so I'll respond even though i don't
On 03/02/2015 01:00 AM, Sarvagya Pant wrote:
I have been writing a c++ program that is supposed to call the python
function. The code is a snippet from python.org itself.
#include Python.h
#include iostream
#include string
int main()
{
Py_SetProgramName(Learning);
Py_Initialize();
On 03/02/2015 07:38 AM, MRAB wrote:
On 2015-03-02 04:49, Dave Angel wrote:
On 03/01/2015 08:59 PM, MRAB wrote:
On 2015-03-02 01:37, Dennis Lee Bieber wrote
The 16 bit address bus permitted addressing of 64k words. On most
processors, that was 64k bytes, though I know one Harris had
On 03/02/2015 09:43 AM, Steven D'Aprano wrote:
Dave Angel wrote:
On 03/02/2015 08:51 AM, alb wrote:
Hi Steven,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
or use a raw string:
i = r'\\ref{fig:abc}'
Actually that'd be:
i = r'\ref{fig:abc}'
D'oh!
I mean, you
On 03/02/2015 01:38 PM, Charles Heizer wrote:
Sorry,
sortedlist = sorted(mylist , key=lambda elem: %s %s % (elem['name'],
LooseVersion(elem['version'])), reverse=True)
This is what I was trying but LooseVersion() was not sorting version numbers like I thought it
would. You will notice that
I INTENDED to send it to the list, but made the same mistake myself.
Forwarded Message
Subject: Re: Python27.dll could not be found
Date: Mon, 02 Mar 2015 08:51:07 -0500
From: Dave Angel da...@davea.name
To: Sarvagya Pant sarvagya.p...@gmail.com
Sarvaqya accidentally sent me
On 03/02/2015 02:22 PM, Gisle Vanem wrote:
Dave Angel wrote:
When I ran Windows, I had written a simple utility that searched the
PATH for a specified file.
I called it which.bat to match the Linux equivalent.
I've written a similar tool; envtool --path --python python27.dll
Matches
On 03/01/2015 08:59 PM, MRAB wrote:
On 2015-03-02 01:37, Dennis Lee Bieber wrote
You'd be able to run it on a TI99/4 (in which the BASIC interpreter,
itself, was run on an interpreter... nothing like taking the first
16-bit
home computer and shackling it with an interpreted language that
On 02/27/2015 06:54 AM, Steven D'Aprano wrote:
Dave Angel wrote:
On 02/27/2015 12:58 AM, Steven D'Aprano wrote:
Dave Angel wrote:
(Although I believe Seymour Cray was quoted as saying that virtual
memory is a crock, because you can't fake what you ain't got.)
If I recall correctly, disk
On 02/27/2015 09:22 AM, Chris Angelico wrote:
On Sat, Feb 28, 2015 at 1:02 AM, Dave Angel da...@davea.name wrote:
The term virtual memory is used for many aspects of the modern memory
architecture. But I presume you're using it in the sense of running in a
swapfile as opposed to running
On 02/27/2015 11:00 AM, alister wrote:
On Sat, 28 Feb 2015 01:22:15 +1100, Chris Angelico wrote:
If you're trying to use the pagefile/swapfile as if it's more memory (I
have 256MB of memory, but 10GB of swap space, so that's 10GB of
memory!), then yes, these performance considerations are
On 02/27/2015 04:21 PM, Travis Griggs wrote:
On Feb 25, 2015, at 12:45 PM, Mark Lawrence breamore...@yahoo.co.uk wrote:
http://www.slideshare.net/pydanny/python-worst-practices
Any that should be added to this list? Any that be removed as not that bad?
I read ‘em. I thought they were
On 02/27/2015 04:40 PM, Chris Angelico wrote:
On Sat, Feb 28, 2015 at 8:37 AM, Dave Angel da...@davea.name wrote:
Right. In C and C++, instead of being the first slide, it'd be the first 3
or 4. Between header file conflicts (especially good because the stdlib
itself has many multiply-defined
On 02/26/2015 10:53 PM, memilanuk wrote:
So... okay. I've got a bunch of PDFs of tournament reports that I want
to sift thru for information. Ended up using 'pdftotext -layout
file.pdf file.txt' to extract the text from the PDF. Still have a few
little glitches to iron out there, but I'm
On 02/27/2015 12:58 AM, Steven D'Aprano wrote:
Dave Angel wrote:
(Although I believe Seymour Cray was quoted as saying that virtual
memory is a crock, because you can't fake what you ain't got.)
If I recall correctly, disk access is about 1 times slower than RAM, so
virtual memory
On 02/26/2015 08:05 PM, Steven D'Aprano wrote:
Rustom Mody wrote:
eg consider the case of 32 vs 64 bit executables.
The 64 bit executable is generally larger than the 32 bit one
Now consider the case of a machine that has say 2GB RAM and a 64-bit
processor. You could -- I think -- make a
On 02/25/2015 08:44 PM, Mark Lawrence wrote:
On 25/02/2015 20:45, Mark Lawrence wrote:
http://www.slideshare.net/pydanny/python-worst-practices
Any that should be added to this list? Any that be removed as not that
bad?
Throwing in my own, how about built-in functions should not use object
Dave Sawyer added the comment:
I'd be interested in taking up the zip portion at Pycon 2015 this year. I
recently had need to delete file(s) from a zipfile.
To do it today with the existing API requires you to unpack the zip and repack
it. The unpack is slow and you need enough free disk
On 02/24/2015 02:57 PM, Laura Creighton wrote:
Dave Angel
are you another Native English speaker living in a world where ASCII
is enough?
I'm a native English speaker, and 7 bits is not nearly enough. Even if
I didn't currently care, I have some history:
No. CDC display code is enough
On 02/24/2015 05:49 AM, pierrick.brih...@gmail.com wrote:
Hello,
Working with pyshp, this is my code :
What version of Python, what version of pyshp, from where, and what OS?
These are the first information to supply in any query that goes
outside of the standard library.
For example,
On 02/24/2015 11:20 AM, Laura Creighton wrote:
In a message of Wed, 25 Feb 2015 02:33:30 +1100, Chris Angelico writes:
Also a reasonable baseline assumption; but the trouble is that if you
automatically assume that text is encoded in your favourite eight-bit
system, you're taking a huge risk.
On 02/24/2015 07:07 PM, Chris Angelico wrote:
On Wed, Feb 25, 2015 at 10:50 AM, Skip Montanaro
skip.montan...@gmail.com wrote:
Even if/when we get to the point where machines can hold an array of
2**49 elements, I suspect people won't be using straight Python to
wrangle them.
Looking just at
On 2015-02-22, Dave Farrance davefarra...@omitthisyahooandthis.co.uk wrote:
It's still quicker to do a re-write in the more cumbersome C
You should try Cython.
Dave
--
https://mail.python.org/mailman/listinfo/python-list
Dave Cook davec...@nowhere.net wrote:
On 2015-02-22, Dave Farrance davefarra...@omitthisyahooandthis.co.uk wrote:
It's still quicker to do a re-write in the more cumbersome C
You should try Cython.
I did try Cython when I was trying to figure out what to do about the slow
speed. My initial
On 02/23/2015 07:55 AM, ast wrote:
hi
a = 2; b = 5
Li = [a, b]
Li
[2, 5]
a=3
Li
[2, 5]
Ok, a change in a or b doesn't impact Li. This works as expected
Is there a way to define a container object able to store some variables
so that a change of a variable make a change in this object
Laura Creighton l...@openend.se wrote:
Good news -- it seems to be working fine with PyPy.
https://travis-ci.org/hugovk/Pillow/builds
for me, not extensively tested, it just seems to be working.
I have several pypy's floating around here, each within its own
virtualenv. If you aren't familiar
As an engineer, I can quickly knock together behavioural models of
electronic circuits, complete units, and control systems in Python, then
annoyingly in a few recent cases, have to re-write in C for speed.
I've tried PyPy, the just-in-time compiler for Python, and that is
impressively, hugely
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
I assume you're talking about drawing graphics rather than writing text. Can
you tell us which specific library or libraries won't run under PyPy?
Yes, mainly the graphics. I'm a hardware engineer, not a software
engineer, so I might
jkn jkn...@nicorp.f9.co.uk wrote:
I'm curious what ...behavioural... models you are creating quickly in
Python that then need rewriting in C for speed. SPICE? some other CAD?
Might be interesting to learn more about what and how you are actually
doing.
The convert-to-C cases were complex
Dave Farrance davefarra...@omitthisyahooandthis.co.uk wrote:
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
I assume you're talking about drawing graphics rather than writing text. Can
you tell us which specific library or libraries won't run under PyPy?
Yes, mainly the graphics
Laura Creighton l...@openend.se wrote:
I don't understand 'an interpreter rather than a JIT'. PyPy has a
JIT, that sort of is the whole point.
Yes. I meant that from my end-user, non-software-engineer perspective, it
looked as though CPython was proceeding with leaps and bounds and that
PyPy
On 02/22/2015 09:29 PM, Chris Angelico wrote:
In Python, unrecognized escape sequences are treated literally,
without (as far as I can tell) any sort of warning or anything. This
can mask bugs, especially when Windows path names are used:
'C:\sqlite\Beginner.db'
'C:\\sqlite\\Beginner.db'
On 02/22/2015 09:41 PM, Ben Finney wrote:
Chris Angelico ros...@gmail.com writes:
In Python, unrecognized escape sequences are treated literally,
without (as far as I can tell) any sort of warning or anything.
Right. Text strings literals are documented to work that way
On 02/22/2015 09:38 PM, Dave Angel wrote:
On 02/22/2015 08:13 PM, jkuplin...@gmail.com wrote:
OK (1) sorry about for/from
That's not what you should be sorry about. You should be sorry you
didn't use cutpaste.
(2) print() sounds nice, but fact is , no matter what I try, i always
get C
On 02/22/2015 08:13 PM, jkuplin...@gmail.com wrote:
OK (1) sorry about for/from
That's not what you should be sorry about. You should be sorry you
didn't use cutpaste.
(2) print() sounds nice, but fact is , no matter what I try, i always get
C:\\apps instead of c:\apps. So in this sense
On 02/21/2015 06:05 AM, Gisle Vanem wrote:
Dave Angel wrote:
Finally, when py.exe starts, it reads that first (shebang) line, and
decides which python interpreter to actually use.
py.exe? Do you mean python.exe?
Reread my post, or read Mark's reply to yours. The job of py.exe or
pyw.exe
On 02/21/2015 07:15 AM, pfranke...@gmail.com wrote:
Hello!
I have a best-practice question: Imagine I have several hardware devices that I
work with on the same I2C bus and I am using the python smbus module for that
purpose. The individual devices are sensors, ADC, DAC components. As I said,
On 02/21/2015 02:46 PM, TommyVee wrote:
Start off with sets of elements as follows:
1. A,B,E,F
2. G,H,L,P,Q
3. C,D,E,F
4. E,X,Z
5. L,M,R
6. O,M,Y
Note that sets 1, 3 and 4 all have the element 'E' in common, therefore
they are related and form the following superset:
A,B,C,D,E,F,X,Z
On 02/20/2015 12:51 AM, Jason Friedman wrote:
I'd still advise using my_list.sort() rather than sorted(), as you
don't need to retain the original.
Hmm.
Trying to figure out what that looks like.
If I understand correctly, list.sort() returns None.
What would I return to the caller?
On 02/20/2015 09:43 AM, loial wrote:
On Linux we use
#!/usr/bin/env python
At the start of scripts to ensure that the python executable used is the one
defined in the PATH variable, rather than hardcoding a path to the python
executable.
What is the equivalent functionality in Windows?
On 02/20/2015 07:20 PM, ms.isma...@gmail.com wrote:
On Saturday, February 21, 2015 at 8:17:06 AM UTC+8, ms.is...@gmail.com wrote:
On Saturday, February 21, 2015 at 8:14:43 AM UTC+8, ms.is...@gmail.com wrote:
On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote:
On 20/02/2015
On 02/19/2015 03:35 AM, ismaham...@gcuf.edu.pk wrote:
this is the error in the following python code, can any one help me
error{Traceback (most recent call last):
File C:\Python27\Scripts\BeOk\getBeOKExperts.py, line 6, in module
from BeautifulSoup import BeautifulSoup
ImportError: No
On 02/19/2015 10:45 AM, janhein.vanderb...@gmail.com wrote:
On Wednesday, February 18, 2015 at 11:20:12 PM UTC+1, Dave Angel wrote:
I'm not necessarily doubting it, just challenging you to provide a data
sample that actually shows it. And of course, I'm not claiming that
7bit is in any way
On 02/19/2015 01:32 PM, Ian Kelly wrote:
On Thu, Feb 19, 2015 at 11:24 AM, Dave Angel da...@davea.name wrote:
Here's a couple of ranges of output, showing that the 7bit scheme does
better for values between 384 and 16379.
382 2 80fe --- 2 7e82
383 2 80ff --- 2 7f82
384 3 81 --- 2 0083
384
On 02/19/2015 01:34 PM, Chris Angelico wrote:
On Fri, Feb 20, 2015 at 5:24 AM, Dave Angel da...@davea.name wrote:
In all my experimenting, I haven't found any values where the 7bit scheme
does worse. It seems likely that for extremely large integers, it will, but
if those
On 02/18/2015 02:55 PM, janhein.vanderb...@gmail.com wrote:
Op woensdag 18 februari 2015 17:47:49 UTC+1 schreef Dave Angel:
On 02/18/2015 03:59 AM, janhein.vanderb...@gmail.com wrote:
encoding individual integers optimally without any assumptions about their
values.
Contradiction
On 02/19/2015 12:10 AM, Chris Angelico wrote:
On Thu, Feb 19, 2015 at 3:44 PM, Jason Friedman jsf80...@gmail.com wrote:
I have need to search a directory and return the name of the most recent
file matching a given pattern. Given a directory with these files and
timestamps,
q.pattern1.abc Feb
On 02/18/2015 04:04 AM, janhein.vanderb...@gmail.com wrote:
On Tuesday, February 17, 2015 at 3:35:16 PM UTC+1, Chris Angelico wrote:
Oh, incidentally: If you want a decent binary format for
variable-sized integer, check out the MIDI spec.
I did some time ago, thanks, and it is indeed a decent
On 02/18/2015 03:59 AM, janhein.vanderb...@gmail.com wrote:
encoding individual integers optimally without any assumptions about their
values.
Contradiction in terms.
--
DaveA
--
https://mail.python.org/mailman/listinfo/python-list
On 02/17/2015 06:22 AM, janhein.vanderb...@gmail.com wrote:
In http://optarbvalintenc.blogspot.nl/ I propose a new way to encode
arbitrarily valued integers and the python code that can be used as a reference
for practical implementations of codecs.
The encoding algorithm itself is optimized
On 02/17/2015 09:34 AM, Chris Angelico wrote:
On Wed, Feb 18, 2015 at 1:12 AM, Dave Angel da...@davea.name wrote:
They had a field type called a compressed integer. It could vary between
one byte and I think about six. And the theory was that it took less space
than the equivalent format
On 02/17/2015 09:58 AM, Chris Angelico wrote:
On Wed, Feb 18, 2015 at 1:50 AM, Dave Angel da...@davea.name wrote:
But the first thing I'd expect to see would be a target estimate of the
anticipated distribution of number values/magnitudes. For example, if a
typical integer is 1500 bits, plus
On 02/16/2015 09:08 PM, ken.hes...@gmail.com wrote:
Would seem to be a simple problem. I just want to print to my printer instead
of the console using Python 2.7, Windows 7. Hours of looking through FAQ's and
Google haven't yielded a solution. Any suggestions appreciated --
It is a
On 02/16/2015 09:26 PM, Joel Goldstick wrote:
On Sun, Feb 15, 2015 at 2:14 PM, Peter Otten __pete...@web.de wrote:
Joel Goldstick wrote:
You can dispense with the slicing if you use the str.split() method. It
will put each item in a list.
Only if there are no whitespace chars in the
On 02/13/2015 03:33 PM, Grant Edwards wrote:
On 2015-02-13, Ian Kelly ian.g.ke...@gmail.com wrote:
Significant digits are within the precision of the calculation.
Writing 1.230 indicates that the fourth digit is known to be zero.
Writing 1.23 outside a context of exact calculation indicates
On 02/11/2015 08:27 AM, Victor L wrote:
Laura, thanks for the answer - it works. Is there some equivalent of
include to expose every function in that script?
Thanks again,
-V
Please don't top-post, and please use text email, not html. Thank you.
yes, as sohcahto...@gmail.com pointed out, you
On 02/10/2015 03:29 AM, OmPs wrote:
On 10 Feb 2015 13:12, Chris Angelico ros...@gmail.com wrote:
On Tue, Feb 10, 2015 at 6:30 PM, OmPs torque.in...@gmail.com wrote:
def _getPackgeVersion(xmlfile, p):
package = str(p)
if isinstance(fpmdict[application][package], list):
On 02/10/2015 09:33 AM, Chris Angelico wrote:
On Wed, Feb 11, 2015 at 1:28 AM, Dave Angel da...@davea.name wrote:
If you can show me a one tuple anywhere in the original code I'll
happily buy you a tipple of your choice.
print Menu[fav,RandomNum]
was in the original code
That's not a one
On 02/10/2015 01:48 PM, Chris Angelico wrote:
On Wed, Feb 11, 2015 at 2:51 AM, Dave Angel da...@davea.name wrote:
You're right of course. I didn't notice the meaning of one-tuple; I took
Mark's comment as if he had said:
If you can show me a ruboutrubout one tuple anywhere ...
Ah, yeah. I
On 02/10/2015 01:24 PM, Denis McMahon wrote:
On Tue, 10 Feb 2015 18:39:42 +1100, Chris Angelico wrote:
On Tue, Feb 10, 2015 at 6:30 PM, OmPs torque.in...@gmail.com wrote:
def _getPackgeVersion(xmlfile, p):
package = str(p)
if isinstance(fpmdict[application][package],
On 02/10/2015 04:05 PM, Skip Montanaro wrote:
I know this is way off-topic for this group, but I figured if anyone
in the online virtual communities I participate in would know the
answer, the Pythonistas would... Google has so far not been my friend
in this realm.
One of the things I really
On 02/10/2015 06:35 AM, Mark Lawrence wrote:
On 10/02/2015 00:05, Ryan Stuart wrote:
Hi,
If you can show me a one tuple anywhere in the original code I'll
happily buy you a tipple of your choice.
print Menu[fav,RandomNum]
was in the original code
--
DaveA
--
On 02/09/2015 07:02 PM, Ethan Furman wrote:
On 02/09/2015 03:52 PM, james8boo...@hotmail.com wrote:
import random
RandomNum = random.randint(0,7)
restraunt = raw_input(What's your favourite takeaway?Pizza, Chinease or
Indian?)
if restraunt == (Pizza):
fav = (1)
elif restraunt ==
On 02/09/2015 01:08 PM, John Ladasky wrote:
On Monday, February 9, 2015 at 9:44:16 AM UTC-8, chim...@gmail.com wrote:
Hello. Am trying to change the key words to my tribal language. Eg change
English language: print() to igbo language: de(). I have been stuck for months
I need a mentor or
On 02/09/2015 09:52 PM, Shiyao Ma wrote:
Hi.
My context is a little hard to reproduce.
WHY don't you try? Telling us about a class without showing how it's
defined leaves us all guessing.
Start by telling us Python version. And if it's 2.x, tell us whether
this class is an old style or
On 02/09/2015 10:05 PM, Dave Angel wrote:
On 02/09/2015 07:02 PM, Ethan Furman wrote:
On 02/09/2015 03:52 PM, james8boo...@hotmail.com wrote:
import random
RandomNum = random.randint(0,7)
restraunt = raw_input(What's your favourite takeaway?Pizza, Chinease
or Indian?)
if restraunt == (Pizza
On 02/07/2015 10:00 PM, Chris Angelico wrote:
On Sun, Feb 8, 2015 at 1:55 PM, Cameron Simpson c...@zip.com.au wrote:
Given that Dave Angel has a tool that displays the 'SEcP...' string using
mhr1224's input string, I'd say we're missing some context.
I don't think he does; that was simulated
On 02/06/2015 04:35 PM, Ben Finney wrote:
Rob Gaddi rgaddi@technologyhighland.invalid writes:
So I'm trying to wrap my head around packaging issues
Congratulations on tackling this. You will likely find the Python
Packaging User Guide URL:https://packaging.python.org/ helpful.
Also know
On 02/07/2015 12:14 AM, mhr1...@gmail.com wrote:
I use this code to create public and private keys:
import rsa
(pubkey, privkey) = rsa.newkeys(512)
And then convert it to PEM format:
exppub =pubkey.save_pkcs1(format='PEM')
exppriv =
On 02/06/2015 06:56 PM, Steven D'Aprano wrote:
Dave Angel wrote:
And don't name any source code __main__.py,
That's incorrect.
Starting from Python 2.6, __main__.py is reserved for the application main
script in packages. That is, if you design your application as a package
(not a single
On 01/28/2015 07:34 PM, Steven D'Aprano wrote:
Devin Jeanpierre wrote:
On Wed, Jan 28, 2015 at 1:40 PM, Chris Angelico ros...@gmail.com wrote:
On Thu, Jan 29, 2015 at 5:47 AM, Chris Kaynor ckay...@zindagigames.com
wrote:
I use Google Drive for it for all the stuff I do at home, and use SVN
On 01/25/2015 03:23 PM, Shalini Ravishankar wrote:
Hello Everyone,
I am trying to read(open) and write files in hdfs inside a python script. But
having error.
Please copy/paste the full error traceback.
Can someone tell me what is wrong here.
Code (full): sample.py
#!/usr/bin/python
On 01/24/2015 09:36 PM, Dan Stromberg wrote:
On Sat, Jan 24, 2015 at 6:24 PM, Chris Angelico ros...@gmail.com wrote:
On Sun, Jan 25, 2015 at 1:11 PM, Dan Stromberg drsali...@gmail.com wrote:
For simplicity, let's say I've been running the suite of performance
tests within a single interpreter
On 01/25/2015 08:45 PM, Chris Angelico wrote:
On Mon, Jan 26, 2015 at 12:31 PM, Marko Rauhamaa ma...@pacujo.net wrote:
Backtracking means the part of depth-first traversal where you retreat
to the parent node. If you implement your traversal with a recursive
function, backtracking means — more
New submission from Dave Notman:
# Python 3.3.1 (default, Sep 25 2013, 19:30:50)
# Linux 3.8.0-35-generic #50-Ubuntu SMP Tue Dec 3 01:25:33 UTC 2013 i686 i686
i686 GNU/Linux
import re
splitter = re.compile( r'(\s*[+/;,]\s*)|(\s+and\s+)' )
ll = splitter.split( 'Dave Sam, Jane and Zoe' )
print
301 - 400 of 4139 matches
Mail list logo