PDF Converter for Mac is a fantastic and easyto-use instrument for converting
PDF documents on Macos. Macintosh PDF Converter can pdf to excel converter
to Word, Shine, PowerPoint, EPUB, Text format for Mac. With PDF Converter
Mac, the PDF documents, select certain websites of the PDF files etc tha
On Tuesday, March 24, 2015 at 6:54:20 AM UTC+8, 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)
Chris Angelico wrote:
Commenting is like dieting. You can always start tomorrow.
I've been meaning to become a procrastinator, but
I think I'll start tomorrow.
In the meantime, since we seem to be having a
fibbing competition, here's my contribution, that
uses neither recursion nor (explicit)
ANNOUNCING
eGenix.com pyOpenSSL Distribution
Version 0.13.8
An easy-to-install and easy-to-use distribution
of the pyOpenSSL Python interface for OpenSS
Reading PEP 257 and 258 I got the impression that I could document
module attributes and these would be available in the __doc__
attribute of the object.
So things like the one below are something I got used to do, but that
don't work after all, as I learned today:
value_factory = lambda _, r
On Tue, Mar 24, 2015 at 7:55 PM, Mario Figueiredo wrote:
> So things like the one below are something I got used to do, but that
> don't work after all, as I learned today:
>
> value_factory = lambda _, row: row[0]
> """Row factory. To be used with single-column queries."""
>
> There are o
On Tue, 24 Mar 2015 07:55 pm, Mario Figueiredo wrote:
> Reading PEP 257 and 258 I got the impression that I could document
> module attributes and these would be available in the __doc__
> attribute of the object.
PEP 258 is rejected, so you can't take that as definitive.
PEP 257 has this defini
This question is about python 2.7 on Windows 7
I am trying to use multiprocessing with freeze. It appears there is some bug
when using multiprocessing on freezed python code on windows platforms. There
is this patch which made its way to python 3.2, and works in 2.7:
http://bugs.python.org/file
On Tue, Mar 24, 2015 at 10:50 PM, wrote:
> I am trying to use multiprocessing with freeze. It appears there is some bug
> when using multiprocessing on freezed python code on windows platforms. There
> is this patch which made its way to python 3.2, and works in 2.7:
>
> http://bugs.python.org/
On Tue, 24 Mar 2015 00:05:46 -0700, jeffreyciross wrote:
> PDF Converter for Mac is a fantastic and easyto-use instrument for
> converting PDF documents on Macos. Macintosh PDF Converter can pdf to
> excel converter to Word, Shine, PowerPoint, EPUB, Text format for Mac.
> With PDF Converter Mac, t
Le mardi 24 mars 2015 13:11:33 UTC+1, Chris Angelico a écrit :
> On Tue, Mar 24, 2015 at 10:50 PM, wrote:
> > I am trying to use multiprocessing with freeze. It appears there is some
> > bug when using multiprocessing on freezed python code on windows platforms.
> > There is this patch which ma
On Tue, Mar 24, 2015 at 5:41 AM, Steven D'Aprano
wrote:
> Python does not automatically print all return statements. If you want it to
> print the intermediate values produced, you will need to add print before
> each return:
>
>
> py> def fib(n):
> ... if n == 0:
> ... result = 0
> .
On 03/24/2015 01:05 AM, jeffreyciross wrote:
> probable spam
I'm wondering whether this is appropriate use of sourceforge. Hosting a
proprietary program on SF's web site for free, doesn't seem honest to
me. Should I report this to SF as inappropriate content?
--
https://mail.python.org/mailman
On Tue, Mar 24, 2015 at 12:20 AM, Rustom Mody wrote:
> On Tuesday, March 24, 2015 at 10:51:11 AM UTC+5:30, Ian wrote:
>> Iteration in log space. On my desktop, this calculates fib(1000) in
>> about 9 us, fib(10) in about 5 ms, and fib(1000) in about 7
>> seconds.
>>
>> def fib(n):
>> a
On 24/03/2015 14:23, Michael Torrie wrote:
On 03/24/2015 01:05 AM, jeffreyciross wrote:
probable spam
I'm wondering whether this is appropriate use of sourceforge. Hosting a
proprietary program on SF's web site for free, doesn't seem honest to
me. Should I report this to SF as inappropriate
On 03/24/2015 08:27 AM, Mark Lawrence wrote:
> On 24/03/2015 14:23, Michael Torrie wrote:
>> Should I report this to SF as inappropriate content?
>
> Yes.
Done.
And yes I agree with alister, Calibre is an amazing program and it's all
100% python! And a large-scale app at that. GPLv3. Putting a
On Tuesday, March 24, 2015 at 10:24:59 PM UTC+8, Ian wrote:
> On Tue, Mar 24, 2015 at 12:20 AM, Rustom Mody wrote:
> > On Tuesday, March 24, 2015 at 10:51:11 AM UTC+5:30, Ian wrote:
> >> Iteration in log space. On my desktop, this calculates fib(1000) in
> >> about 9 us, fib(10) in about 5 ms,
I am creating a tool to search a filesystem for one simple string.
I cannot get the syntax correct.
Thank you in advance for your help.
import sys
import re
import os
path='/'
viewfiles=os.listdir(path)
for allfiles in viewfiles:
file= os.path.join(path, allfiles)
text=open(file, "r")
for line
On Tue, Mar 24, 2015 at 1:13 PM, wrote:
> SyntaxError: Missing parentheses in call to 'print'
It appears you are attempting to use a Python 2.x print statement with
Python 3.x Try changing the last line to
print(line.rstrip())
Skip
--
https://mail.python.org/mailman/listinfo/python-list
On 03/24/2015 11:13 AM, gdot...@gmail.com wrote:
I am creating a tool to search a filesystem for one simple string.
I cannot get the syntax correct.
Thank you in advance for your help.
import sys
import re
import os
path='/'
viewfiles=os.listdir(path)
for allfiles in viewfiles:
file= os.pat
The docs for the subprocess.Popen() say:
Use communicate() rather than .stdin.write, .stdout.read
or .stderr.read to avoid deadlocks due to any of the other
OS pipe buffers filling up and blocking the child process
But if I want to send a string to stdin, how can I do tha
Thank you Gary, that got rid of the error, but now there is no tree walk, it
runs and immediatley finishes. I just need to grep each file. I have this
working with the windows "for /r %a and redirecting that to Python, but want to
use Python only. I do have dummy files with the regex string.
Th
Thank you! But
The print error is gone, but now the script quickly finishes and doesnt walk
the OS tree or search.
Gregg
On Tuesday, March 24, 2015 at 2:14:32 PM UTC-4, Gregg Dotoli wrote:
> I am creating a tool to search a filesystem for one simple string.
> I cannot get the syntax correct.
On 3/24/2015 4:55 AM, Mario Figueiredo wrote:
Reading PEP 257 and 258 I got the impression that I could document
module attributes and these would be available in the __doc__
attribute of the object.
So things like the one below are something I got used to do, but that
don't work after all, as I
Le 24/03/2015 20:38, Vincent Vande Vyvre a écrit :
Le 24/03/2015 20:22, Gregg Dotoli a écrit :
Thank you! But
The print error is gone, but now the script quickly finishes and
doesnt walk
the OS tree or search.
Gregg
On Tuesday, March 24, 2015 at 2:14:32 PM UTC-4, Gregg Dotoli wrote:
I am
On Tue, Mar 24, 2015 at 2:22 PM, Gregg Dotoli wrote:
> The print error is gone, but now the script quickly finishes and doesnt
> walk
> the OS tree or search.
>
You need to walk the directory tree recursively. Take a look at os.walk().
Skip
--
https://mail.python.org/mailman/listinfo/python-li
On Tue, 24 Mar 2015 12:10:24 -0700, Gregg Dotoli wrote:
>
> Thank you Gary, that got rid of the error, but now there is no tree
> walk, it runs and immediatley finishes. I just need to grep each file. I
> have this working with the windows "for /r %a and redirecting that to
> Python, but want to u
This works fine , but I have to pipe the filename to the script python stool
I am creating a tool to search a filesystem for one simple string.
> I cannot get the syntax correct.
> Thank you in advance for your help.
>
> import sys
> import re
> import os
> path='/'
> viewfiles=os.listdir(path)
Le 24/03/2015 20:22, Gregg Dotoli a écrit :
Thank you! But
The print error is gone, but now the script quickly finishes and doesnt walk
the OS tree or search.
Gregg
On Tuesday, March 24, 2015 at 2:14:32 PM UTC-4, Gregg Dotoli wrote:
I am creating a tool to search a filesystem for one simple
On Tue, Mar 24, 2015 at 12:08 PM, Tobiah wrote:
> The docs for the subprocess.Popen() say:
>
> Use communicate() rather than .stdin.write, .stdout.read
> or .stderr.read to avoid deadlocks due to any of the other
> OS pipe buffers filling up and blocking the child process
>
On 3/24/2015 2:13 PM, gdot...@gmail.com wrote:
I am creating a tool to search a filesystem for one simple string.
I cannot get the syntax correct.
Thank you in advance for your help.
import sys
import re
import os
path='/'
viewfiles=os.listdir(path)
listdir is not recursive, so this code will
On Tue, 24 Mar 2015 12:43:38 -0700, Gregg Dotoli wrote:
> [context snipped due to top posting]
>
> All I need is a loop, should I bag Python and use a simple shell for
loop?
Honestly, yes. You're not even using a regular expression, just a fixed
string you're trying to search for. You can do
Judging from the message archive, the image-sig list is (just about) dead?
Disclaimer: Am a newbie - so anything is possible
using 'RGB' works fine
img = Image.new('RGB', (inktile[0], inktile[1]), bgcolor)
using '1' or 'L' does not (see trace below)
img = Image.new('L', (inktile[0]
On Tue, Mar 24, 2015 at 1:52 PM, wrote:
> Judging from the message archive, the image-sig list is (just about) dead?
>
> Disclaimer: Am a newbie - so anything is possible
>
>
> using 'RGB' works fine
>
> img = Image.new('RGB', (inktile[0], inktile[1]), bgcolor)
>
> using '1' or 'L' does not (
On 3/24/2015 3:52 PM, kai.pet...@gmail.com wrote:
Judging from the message archive, the image-sig list is (just about) dead?
PIL and/or pillow should have their own lists.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, 24 March 2015 13:15:42 UTC-7, Ian wrote:
> On Tue, Mar 24, 2015 at 1:52 PM, Kai wrote:
> > Judging from the message archive, the image-sig list is (just about) dead?
> >
> > Disclaimer: Am a newbie - so anything is possible
> >
> >
> > using 'RGB' works fine
> >
> > img = Image.ne
Here you go. Windows shell was easier!!!
for /f %a in (c:\gonow) do echo %a | c:\Python34\python c:\python34\unopy.py %a
Now I can use any regex pattern, I need.
On Tuesday, March 24, 2015 at 3:54:25 PM UTC-4, Rob Gaddi wrote:
> On Tue, 24 Mar 2015 12:43:38 -0700, Gregg Dotoli wrote:
>
> > [c
Is there a way of "adding" 4 hours and getting a jump of 5 hours on
March 8th, 2015 (due to Daylight Savings Time), without hardcoding
when to spring forward and when to fall back? I'd love it if there's
some library that'll do this for me.
#!/usr/bin/python
import pytz
import datetime
def main
On 03/24/2015 03:24 PM, Dan Stromberg wrote:
Is there a way of "adding" 4 hours and getting a jump of 5 hours on
March 8th, 2015 (due to Daylight Savings Time), without hardcoding
when to spring forward and when to fall back? I'd love it if there's
some library that'll do this for me.
#!/usr/bi
On Wed, Mar 25, 2015 at 9:24 AM, Dan Stromberg wrote:
> Is there a way of "adding" 4 hours and getting a jump of 5 hours on
> March 8th, 2015 (due to Daylight Savings Time), without hardcoding
> when to spring forward and when to fall back? I'd love it if there's
> some library that'll do this fo
On Tue, 24 Mar 2015 12:08:24 -0700, Tobiah wrote:
> But if I want to send a string to stdin, how can I do that without
> stdin.write()?
p.communicate(string)
> This seems to work:
Only because the amounts of data involved are small enough to avoid
deadlock.
If both sides write more dat
I was looking on the Internet regarding the use of OpenID in Python apps
but I only found Flask/web related stuff.
Is there any module that provides OpenID implementation for desktop level?
I currently have a Python desktop script that needs to authenticate in a
OpenID server, but I don't know ho
This appears to do what I wanted:
#!/usr/bin/python
from __future__ import print_function
import pytz
import datetime
# Is there a good way of jumping ahead 5 hours instead of 4 on 2015-03-08?
def main():
# On 2015-03-08, 2:00 AM to 2:59AM Pacific time does not exist -
the clock jumps forw
On Tue, 24 Mar 2015 11:32 pm, alister wrote:
> On Tue, 24 Mar 2015 00:05:46 -0700, jeffreyciross wrote:
[off-topic spam]
>
> Calibre does a very god job as well.
Please don't reply to spam. Unless the product is a Python library, or is
given in direct reply to an explicit request for an applicat
On Mon, Mar 23, 2015 at 8:38 PM, Emile van Sebille wrote:
> On 3/23/2015 5:52 AM, Steven D'Aprano wrote:
>
> Are there any other, possibly better, ways to calculate the fractional
>> part
>> of a number?
>>
>
> float (("%6.3f" % x)[-4:])
In general you lose a lot of precision this way...
--
On Wed, 25 Mar 2015 05:13 am, gdot...@gmail.com wrote:
> The error is:
>
> SyntaxError: Missing parentheses in call to 'print'
I cannot imagine how the message could be more explicit: the call to print
is missing parentheses. If you're not going to read the error messages you
are given, you are
body {color:black;}
h1 {text-align:center;color:maroon;font-size:30px;font-style:normal;}
td {font-size:12;font-style:monospace;}
}
{% block title %}{% endblock %}
IPDB Data Input Window
Address:{{ form.address }}
On Wed, Mar 25, 2015 at 1:47 PM, Tiglath Suriol wrote:
> {% block title %}{% endblock %}
Looks to me like you're playing around with a templating system like
Jinja, but may I suggest that you send tests to yourself rather than
to an entire mailing list/newsgroup? :)
ChrisA
--
https://mail.pytho
# Django settings for ipdb project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_em...@example.com'),
('jol', 'tegijjjlath.net'),
('totis', 't...@oint.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE':'django.db.backends.postgresq
I have a list containing 9600 integer elements - each integer is either 0 or 1.
Starting at the front of the list, I need to combine 8 list elements into 1 by
treating them as if they were bits of one byte with 1 and 0 denoting bit on/off
(the 8th element would be the rightmost bit of the first
On Wed, Mar 25, 2015 at 2:11 PM, Tiglath Suriol wrote:
> # Make this unique, and don't share it with anybody.
> SECRET_KEY = '42=kv!a-il*!4j&7v+0(@a@vq_3j-+ysatta@l6-h63odj2)75'
This right here is a reason to send your test messages someplace other
than a huge, high-traffic mailing list!
ChrisA
On Wed, Mar 25, 2015 at 2:13 PM, wrote:
> I have a list containing 9600 integer elements - each integer is either 0 or
> 1.
>
> Starting at the front of the list, I need to combine 8 list elements into 1
> by treating them as if they were bits of one byte with 1 and 0 denoting bit
> on/off (th
On Tuesday, March 24, 2015 at 8:29:24 PM UTC-7, Chris Angelico wrote:
> On Wed, Mar 25, 2015 at 2:13 PM, wrote:
> > I have a list containing 9600 integer elements - each integer is either 0
> > or 1.
> >
> > Starting at the front of the list, I need to combine 8 list elements into 1
> > by trea
otaksoftspamt...@gmail.com writes:
> I have a list containing 9600 integer elements - each integer is
> either 0 or 1.
Is that a homework problem? This works for me in Python 2.7 but I think
Python 3 gratuitously broke tuple unpacking so it won't work there:
=
On Wed, Mar 25, 2015 at 3:04 PM, Paul Rubin wrote:
> This works for me in Python 2.7 but I think
> Python 3 gratuitously broke tuple unpacking so it won't work there:
>
>
>
> from itertools import count, groupby
> old = [0, 0, 0, 1,
On Tuesday, 24 March 2015 21:04:37 UTC-7, Paul Rubin wrote:
> nobody writes:
> > I have a list containing 9600 integer elements - each integer is
> > either 0 or 1.
>
> Is that a homework problem? This works for me in Python 2.7 but I think
> Python 3 gratuitously broke tuple unpacking so it won
On Tuesday, 24 March 2015 21:20:11 UTC-7, Chris Angelico wrote:
> On Wed, Mar 25, 2015 at 3:04 PM, Paul Rubin wrote:
> > This works for me in Python 2.7 but I think
> > Python 3 gratuitously broke tuple unpacking so it won't work there:
> >
> >
On Wed, Mar 25, 2015 at 1:11 PM, Tiglath Suriol
wrote:
> # Make this unique, and don't share it with anybody.
>
...
> SECRET_KEY = '42=kv!a-il*!4j&7v+0(@a@vq_3j-+ysatta@l6-h63odj2)75'
>
> # List of callables that know how to import templates from various sources.
> TEMPLATE_LOADERS = (
>
On Wednesday 25 March 2015 14:11, Tiglath Suriol wrote:
> # Make this unique, and don't share it with anybody.
> SECRET_KEY = '42=kv!a-il*!4j&7v+0(@a@vq_3j-+ysatta@l6-h63odj2)75'
You'll need to change the comment to say
"don't share it with anybody unless they have an internet connection."
--
On Wed, Mar 25, 2015 at 3:46 PM, wrote:
> Now I have just read the latest spec and speed/memory may become issues:
>
> 1 bit images of a size of 1024 x 1280 need to be processed this way, so
> 1310720 list elements. Also needs to be 2.7 only.
>
> Any recommendations?
2.7 only? Then my solution w
Chris Angelico writes:
> Of course, this does mean installing numpy. It is crushing the nut
> with the triphammer - an absurd extravagance of energy, but the nut is
> effectively crushed all the same.
It also has the advantage that it hopefully won't be acceptable for a
homework assignment.
Whe
On Wednesday 25 March 2015 14:13, otaksoftspamt...@gmail.com wrote:
> I have a list containing 9600 integer elements - each integer is either 0
> or 1.
>
> Starting at the front of the list, I need to combine 8 list elements into
> 1 by treating them as if they were bits of one byte with 1 and 0
kai.pet...@gmail.com writes:
> 1 bit images of a size of 1024 x 1280 need to be processed this way,
> so 1310720 list elements. Also needs to be 2.7 only.
Where are these lists going to come from? Files? Process the file
differently, probably. Use generators instead of lists, maybe. Or
process
otaksoftspamt...@gmail.com wrote:
>I have a list containing 9600 integer elements - each integer is either 0 or 1.
>Starting at the front of the list, I need to combine 8 list elements into 1 by
>treating them as if they were bits of one byte with 1 and 0 denoting bit
>on/off (the 8th element wo
On Wednesday, March 25, 2015 at 11:23:08 AM UTC+5:30, Paul Rubin wrote:
> kai.peters writes
> > 1 bit images of a size of 1024 x 1280 need to be processed this way,
> > so 1310720 list elements. Also needs to be 2.7 only.
>
> Where are these lists going to come from? Files? Process the file
> d
65 matches
Mail list logo