as Dan suggested, find the source tar.gz (or zip, or
whatever) file for the last version that supported python 2.6 on the
corresponding project's website or on PyPI and install the packages (and
all their dependencies) using the setup.py scripts. If you're on
Windows, you'll probably nee
You also could try getting the modules (of suitable versions) you need from
their homepage, possibly github, and then use the setup.py to install your
packages. pypi usually has a link to a project's homepage.
On Wed, Feb 24, 2021 at 6:08 AM Dan Stromberg wrote:
>
> I don't think pip supports 2
I don't think pip supports 2.x anymore.
You might be able to:
1) Look up what versions of your desired modules support Python 2.x on
pypi's website
2) Install them on another system that has Python 3.x using pip
3) Copy them to the moribund system
4) Test
On Wed, Feb 24, 2021 at 5:15 AM Antoon P
I need to do some development on this legacy system. It only runs
python2.6 and there is little hope of installing an other version. How
can I best proceed to install modules for working with mysql and ldap?
--
Antoon.
--
https://mail.python.org/mailman/listinfo/python-list
release
> notes and it slipped through the cracks. In the NEWS I said:
>
>> This is the last Twisted release where Python 2.6 is supported, on any
>> platform.
>
> However, I meant that this is the first Twisted release to drop 2.6 support
> wholesale, preventi
Hi everyone!
It's been brought to my attention that I misworded something in the release
notes and it slipped through the cracks. In the NEWS I said:
> This is the last Twisted release where Python 2.6 is supported, on any
> platform.
However, I meant that this is the first Twisted
On 25/02/2014 18:28, Robert Schmidt wrote:
I am trying to install Python 2.6 because Pygame will only run on 2.6.
The configure gives only warnings.
make frameworkinstall
gcc -c -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -IInclude -I
I am trying to install Python 2.6 because Pygame will only run on 2.6.
The configure gives only warnings.
make frameworkinstall
gcc -c -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE
-DSVNVERSION=\"`LC_
On Thu, 28 Nov 2013 14:22:01 -0800, mefistofelis wrote:
> I have the following script however when the clipboard contents are
> greek letters it fails to print them right. I have used all posible
> encoding for greek letters including utf8 but to no avail so i just stay
> with latin1.
>
> Can you
On 11/28/2013 5:48 PM, Chris Angelico wrote:
On Fri, Nov 29, 2013 at 9:22 AM, wrote:
I have the following script however when the clipboard contents are
greek letters it fails to print them right. I have used all posible
encoding for greek letters including utf8 but to no avail so i just
stay
On Fri, Nov 29, 2013 at 9:22 AM, wrote:
> I have the following script however when the clipboard contents are greek
> letters it fails to print them right.
> I have used all posible encoding for greek letters including utf8 but to no
> avail so i just stay with latin1.
You need to know what en
I have the following script however when the clipboard contents are greek
letters it fails to print them right.
I have used all posible encoding for greek letters including utf8 but to no
avail so i just stay with latin1.
Can you suggest a solution?
Here is the script:
import win32clipboard
wi
On Wednesday, November 27, 2013 9:09:32 PM UTC+1, Ned Batchelder wrote:
> I hope you aren't trying to prevent malice this way: you cannot examine
> a piece of Python code to prove that it's safe to execute.
No worry. Whoever has access to modifying those configuration files
can cause a mess in a
On Wed, 27 Nov 2013 11:40:52 -0800, magnus.ly...@gmail.com wrote:
> What I'm really after, is to check that python expressions embedded in
> text files are: - well behaved (no syntax errors etc) - don't
> accidentally access anything it shouldn't - I serve them with the values
> they need on execu
On 11/27/13 3:44 PM, Chris Kaynor wrote:
On Wed, Nov 27, 2013 at 12:09 PM, Ned Batchelder mailto:n...@nedbatchelder.com>> wrote:
* Is there perhaps a better way to achieve what I'm trying to do?
What I'm really after, is to check that python expressions
embedded in text
On Wed, Nov 27, 2013 at 12:09 PM, Ned Batchelder wrote:
> * Is there perhaps a better way to achieve what I'm trying to do?
>>
>> What I'm really after, is to check that python expressions embedded in
>> text files are:
>> - well behaved (no syntax errors etc)
>> - don't accidentally access anythi
Find names not starting with ".", i.e a & b in "a.c + b"
>> abbr_expr = re.sub(r"\.\w+", "", expr)
>> names = compile(abbr_expr, '', 'eval').co_names
>> # Python 2.6 returns '_[1]' in co_names
xample, see: Eval Really Is Dangerous:
http://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html
In your environment it looks like you have a whitelist of identifiers,
so you're probably ok.
So, in the case of "a.b + x" I'm really just interested in a and x, not
x27;t accidentally access anything it shouldn't
- I serve them with the values they need on execution
So, in the case of "a.b + x" I'm really just interested in a and x, not b. So
the (almost) whole story is that I do:
# Find names not starting with ".", i
;: None}
$ python2.6 optparse_mutually_exclusive.py --list-optionsets --show-options
Usage: optparse_mutually_exclusive.py [options]
optparse_mutually_exclusive.py: error: --show-options option requires an
argument
$ python2.6 optparse_mutually_exclusive.py --show-options foo
{'li
x27; , nargs=2)
File "/usr/lib64/python2.6/optparse.py", line 1012, in add_option
option = self.option_class(*args, **kwargs)
File "/usr/lib64/python2.6/optparse.py", line 577, in __init__
checker(self)
File "/usr/lib64/python2.6/optparse.py", line 706, in _c
Andy Kannberg wrote:
> Hi python-guru's,
>
> I am new to Python, coming from a long history of Unix/linux shell
> programming.
> I am creating a Python script (In Python 2.6) which should be able to
> read command line options and arguments.
> So far, I figured out ho
Hi python-guru's,
I am new to Python, coming from a long history of Unix/linux shell
programming.
I am creating a Python script (In Python 2.6) which should be able to read
command line options and arguments.
So far, I figured out how to do that with optparse. I can add options (and
argu
On Sat, 20 Jul 2013 14:30:14 -0700, Paul McGuire wrote:
> Thanks for your continued support and interest in pyparsing!
And thank you for pyparsing!
Paul, I thought I would mention that over the last week or so on the
Python-Dev mailing list, there has been some discussion about adding a
parser
In my releasing of Pyparsing 1.5.7/2.0.0 last November, I started to split
supported Python versions: 2.x to the Pyparsing 1.5.x track, and 3.x to the
Pyparsing 2.x track. Unfortunately, this caused a fair bit of pain for many
current users of Python 2.6 and 2.7 (especially those using libs
I'am just tryign to print the date with proper greek letters as it uses to work
with Python v2.6
date gets calculated here:
date = ( datetime.utcnow() + timedelta(hours=2) ).strftime( '%y-%m-%d %H:%M:%S'
)
I'am not sure but i believe that the decode must be taken out in python 3.x
because
Τη Πέμπτη, 28 Μαρτίου 2013 4:28:04 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> On Thu, Mar 28, 2013 at 1:16 PM, Νίκος Γκρ33κ wrote:
>
> > Τη Πέμπτη, 28 Μαρτίου 2013 12:55:11 π.μ. UTC+2, ο χρήστης Chris Angelico
> > έγραψε:
>
> >> On Thu, Mar 28, 2013 at 7:18 AM, Νίκος Γκρ33κ
> >> wrote:
>
On Thu, Mar 28, 2013 at 1:16 PM, Νίκος Γκρ33κ wrote:
> Τη Πέμπτη, 28 Μαρτίου 2013 12:55:11 π.μ. UTC+2, ο χρήστης Chris Angelico
> έγραψε:
>> On Thu, Mar 28, 2013 at 7:18 AM, Νίκος Γκρ33κ wrote:
>>
>> > date = date.strftime('%A, %e %b %Y').decode('cp1253').encode('utf8')
>>
>>
>>
>> For a start,
Τη Πέμπτη, 28 Μαρτίου 2013 12:55:11 π.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> On Thu, Mar 28, 2013 at 7:18 AM, Νίκος Γκρ33κ wrote:
>
> > date = date.strftime('%A, %e %b %Y').decode('cp1253').encode('utf8')
>
>
>
> For a start, figure out what you're trying to do. I'm trying to get my
>
>
On Thu, Mar 28, 2013 at 7:18 AM, Νίκος Γκρ33κ wrote:
> date = date.strftime('%A, %e %b %Y').decode('cp1253').encode('utf8')
For a start, figure out what you're trying to do. I'm trying to get my
head around this line and I'm not getting anywhere. Is 'date' an
instance of datetime.date()? And what
Hello folks,
With what do i need to replace:
---
print ( "Query Error: ", sys.exc_info()[1].excepinfo()[2] )
-
and
--
date = date.strftime('%A, %e %b %Y').decode('cp1253').encode('utf8')
--
in Python3? because in 2.6 used to work but they dont in Pytho 3
thank yo
On 01/30/2013 03:05 PM, Sells, Fred wrote:
This is simple, but I just cannot find it after quite a bit of searching
I have this basic design
class A:
def __init__(self):
print 'I am an instance of ', self.__class__.name
class B(A):
pass
X = B
I would like thi
On 30 January 2013 20:05, Sells, Fred wrote:
> This is simple, but I just cannot find it after quite a bit of searching
>
> I have this basic design
>
> class A:
> def __init__(self):
> print 'I am an instance of ', self.__class__.name
Did you mean to use __name__ instead
This is simple, but I just cannot find it after quite a bit of searching
I have this basic design
class A:
def __init__(self):
print 'I am an instance of ', self.__class__.name
class B(A):
pass
X = B
I would like this to print "I am an instance of B" but I kee
On Friday, 25 September 2009 04:36:28 UTC-7, Marco Nawijn wrote:
> On Sep 25, 1:08 pm, Chris Withers wrote:
> > Hi All,
> >
> > I'm trying to build Python 2.6 as a shared library, so I did:
> >
> > ./configure --enable-shared
> > make
> &
On 10/30/2012 10:47 AM, andrew.macke...@3ds.com wrote:
> When formatting a float using the exponential format, the rounding is
> different in Python-2.6 and Python-2.7. See example below.
> Is this intentional?
>
> Is there any way of forcing the Python-2.6 behavior (for compatibi
andrew.macke...@3ds.com wrote:
> When formatting a float using the exponential format, the rounding is
> different in Python-2.6 and Python-2.7. See example below. Is this
> intentional?
>
> Is there any way of forcing the Python-2.6 behavior (for compatibility
> reasons whe
When formatting a float using the exponential format, the rounding is different
in Python-2.6 and Python-2.7. See example below.
Is this intentional?
Is there any way of forcing the Python-2.6 behavior (for compatibility reasons
when testing)?
>c:\python26\python
r:\asiData\abaObjects\li
On 2012-09-13 16:04, garyr wrote:
Is there a version for SciPy/numpy available for Python 2.6? I could only
find a version for 2.7 on the SciPy site. A search on the Scipy mailing list
archive did not turn up anything. The link to the Scipy-user list signup
appeared to be broken.
There's
Is there a version for SciPy/numpy available for Python 2.6? I could only
find a version for 2.7 on the SciPy site. A search on the Scipy mailing list
archive did not turn up anything. The link to the Scipy-user list signup
appeared to be broken.
--
http://mail.python.org/mailman/listinfo
Try incrementing the variable cursor.arraysize a lot.
Pedro.
On Tue, Aug 28, 2012 at 11:20 PM, Dennis Lee Bieber
wrote:
> On Tue, 28 Aug 2012 10:25:35 -0700 (PDT), bruceg113...@gmail.com
> declaimed the following in gmane.comp.python.general:
>
>>
>> Doesn't the last paragraph imply that SQLite
On Tuesday, August 28, 2012 4:27:48 AM UTC-4, Cameron Simpson wrote:
> On 27Aug2012 13:41, bruceg113...@gmail.com wrote:
>
> | When using the database on my C Drive, Sqlite performance is great! (<1S)
>
> | When using the database on a network, Sqlite performance is terrible! (17S)
>
>
>
>
On 27Aug2012 13:41, bruceg113...@gmail.com wrote:
| When using the database on my C Drive, Sqlite performance is great! (<1S)
| When using the database on a network, Sqlite performance is terrible! (17S)
Let me first echo everyone saying not to use SQLite on a network file.
| I like your idea
bruceg113 wrote:
> Thank you for your reply.
> Are you saying having a sqlite database file on a
> shared LOCAL network drive is problematic?
Yes, mostly, I think I am saying that.
A "LOCAL network drive" is network drive, and is not a
local drive, local as the network may be. We read and
write s
>From the sqlite documentation he quoted, it appears that ANY network
filesystem, local or otherwise, should be avoided.
On Aug 27, 2012 8:13 PM, wrote:
> On Monday, August 27, 2012 10:32:47 PM UTC-4, Bryan wrote:
> > bruceg113 wrote:
> >
> > > I selected sqlite for the following reasons:
> >
> >
On Monday, August 27, 2012 10:32:47 PM UTC-4, Bryan wrote:
> bruceg113 wrote:
>
> > I selected sqlite for the following reasons:
>
> >
>
> > 1) Ships with Python.
>
> > 2) Familiar with Python.
>
> > 3) The Sqlite description athttp://www.sqlite.org/whentouse.htmlappears to
> > meet my requir
bruceg113 wrote:
> I selected sqlite for the following reasons:
>
> 1) Ships with Python.
> 2) Familiar with Python.
> 3) The Sqlite description athttp://www.sqlite.org/whentouse.htmlappears to
> meet my requirements:
> Very low volume and concurrency, small datasets, simple to use.
All good
Demian,
I am not a database expert!
I selected sqlite for the following reasons:
1) Ships with Python.
2) Familiar with Python.
3) The Sqlite description at http://www.sqlite.org/whentouse.html appears to
meet my requirements:
Very low volume and concurrency, small datasets, simple to use.
Is there a reason that you're using SQLite in a network environment rather than
a database server?
--
http://mail.python.org/mailman/listinfo/python-list
ata
display data (via wxPython)
Thanks,
Bruce
On Monday, August 27, 2012 11:50:15 AM UTC-4, Ulrich Eckhardt wrote:
> Am 27.08.2012 03:23, schrieb bruceg113...@gmail.com:
>
> > My program uses Python 2.6 and Sqlite3 and connects to a network
>
> > database 100 mil
On Monday, August 27, 2012 8:50:15 AM UTC-7, Ulrich Eckhardt wrote:
> Am 27.08.2012 03:23, schrieb bruceg113...@gmail.com:
>
> > My program uses Python 2.6 and Sqlite3 and connects to a network
>
> > database 100 miles away.
>
>
>
> Wait, isn't SQLi
Am 27.08.2012 03:23, schrieb bruceg113...@gmail.com:
My program uses Python 2.6 and Sqlite3 and connects to a network
database 100 miles away.
Wait, isn't SQLite completely file-based? In that case, SQLite accesses
a file, which in turn is stored on a remote filesystem. This means that
My program uses Python 2.6 and Sqlite3 and connects to a network database 100
miles away.
My program reads approx 60 records (4000 bytes) from a Sqlite database in less
than a second.
Each time the user requests data, my program can continuously read 60 records
in less than a second
On Wednesday, July 25, 2012 11:02:01 AM UTC+2, Walter Dörwald wrote:
> On 25.07.12 08:09, Ulrich Eckhardt wrote:
>
> > Am 24.07.2012 17:01, schrieb cpppw...@gmail.com:
> >> reader = codecs.getreader(encoding)
> >> lines = []
> >> with open(filename, 'rb') as f:
> >> lines
On 25.07.12 08:09, Ulrich Eckhardt wrote:
Am 24.07.2012 17:01, schrieb cpppw...@gmail.com:
reader = codecs.getreader(encoding)
lines = []
with open(filename, 'rb') as f:
lines = reader(f, 'strict').readlines(keepends=False)
where encoding == 'utf-16-be'
Everything wo
Am 24.07.2012 17:01, schrieb cpppw...@gmail.com:
reader = codecs.getreader(encoding)
lines = []
with open(filename, 'rb') as f:
lines = reader(f, 'strict').readlines(keepends=False)
where encoding == 'utf-16-be'
Everything works fine, except that lines[0] is equal to c
Hi,
I have a simple question, I'm using something like the following lines in
python 2.6.2
reader = codecs.getreader(encoding)
lines = []
with open(filename, 'rb') as f:
lines = reader(f, 'strict').readlines(keepends=False)
where encoding == 'utf-16-be'
Everything works f
In article <5005927a$0$6949$e4fe5...@news2.news.xs4all.nl>,
Hans Mulder wrote:
> On 17/07/12 15:47:05, Naser Nikandish wrote:
> > I am trying to install Python 2.6 on Mac OS Lion. Here is what I did:
> >
> > 1- Download Mac Installer disk image (2.6) (sig) from
&
On 17/07/12 15:47:05, Naser Nikandish wrote:
> Hi,
>
> I am trying to install Python 2.6 on Mac OS Lion. Here is what I did:
>
> 1- Download Mac Installer disk image (2.6) (sig) from
>http://www.python.org/getit/releases/2.6/
>
> 2- Install it
>
> 3- Ru
Hi,
I am trying to install Python 2.6 on Mac OS Lion. Here is what I did:
1- Download Mac Installer disk image (2.6) (sig) from
http://www.python.org/getit/releases/2.6/
2- Install it
3- Run Python Luncher, go to Python Luncher preferences, and change the
interpreter to Library
On 09/07/2012 10:37, Mark Devine wrote:
Hi
I have a large code base that was written in python 2.4. I want to migrate
to python 2.6. Are there any tools that will aid me in this migration?
Thanks
A
Check the what's new for python 2.6. If, and I doubt that there are,
any compata
Hi
I have a large code base that was written in python 2.4. I want to migrate
to python 2.6. Are there any tools that will aid me in this migration?
Thanks
A
--
http://mail.python.org/mailman/listinfo/python-list
On 26/06/2012 23:24, KACVINSKY Tom wrote:
> I have need for a distutils that supports msvc10, and which can be
> back-fitted into Python 2.6. Is there such a beast?
One trick I found was to define an environment variable *VS90COMNTOOLS*
that points to the actual VS2010 lo
Hi,
I have need for a distutils that supports msvc10, and which can be back-fitted
into Python 2.6. Is there such a beast?
Thanks in advance,
Tom
This email and any attachments are intended solely for the use of the
individual or entity to whom it is addressed and may be confidential and/or
For reasons beyond my control, I have a need to build Python 2.6 with
MSVC 2010 (for x64). Does anyone have any hints as to how I can
accomplish this? I see there are instructions for building Python 2.7
with MSVC 2010, but those are using the Python 2.7 source as the base
for patching, so they
Am 23.05.2012 11:30, schrieb 20_feet_tall:
> I have a problem with the visualization of korean fonts on Python.
> When I try to type in the characters only squares come out.
> I have tried to install the CJK codec, the hangul 1.0 codec but still
> no result.
What exactly do you mean with "visualiz
I have a problem with the visualization of korean fonts on Python.
When I try to type in the characters only squares come out.
I have tried to install the CJK codec, the hangul 1.0 codec but still
no result.
Hoep someone can help me out.
--
http://mail.python.org/mailman/listinfo/python-list
On 23/05/2012 21:45, Andrew Berg wrote:
On 5/23/2012 3:25 PM, Gelonida N wrote:
So I just install 2.7 and uncheck this box and I'll keep 2.6 right?
Different versions are installed in different locations by default, and
if you uncheck that box, the installer will leave file associations alone.
On 5/23/2012 3:25 PM, Gelonida N wrote:
> So I just install 2.7 and uncheck this box and I'll keep 2.6 right?
Different versions are installed in different locations by default, and
if you uncheck that box, the installer will leave file associations alone.
--
CPython 3.3.0a3 | Windows NT 6.1.7601
Am 23.05.2012 09:40, schrieb Christian Heimes:
> You recall correctly. That's the recommended and correct way to install
> Python 2.6 on a recent machine, with one exception. You must compile it
> with the option MACHDEP=linux2, otherwise sys.platform will contain the
> string
/python so it won't clobber the
> system python.
You recall correctly. That's the recommended and correct way to install
Python 2.6 on a recent machine, with one exception. You must compile it
with the option MACHDEP=linux2, otherwise sys.platform will contain the
string "linux3&q
On Wed, May 23, 2012 at 1:47 AM, Gelonida N wrote:
> What would be the recommended way to install (compile) 2.6 on 12.04?
Hi,
I manage my own Python interpreters with Pythonbrew (I don't use the
global Python):
http://pypi.python.org/pypi/pythonbrew/
--
Sebastien Douche
Twitter: @sdouche / G
On Tue, May 22, 2012 at 8:09 PM, Dan Stromberg wrote:
>
> If the pythons you require are in synaptic (sudo to root and run synaptic),
> you probably can just use them.
>
> If not, then you, for each release, need to:
> 1) download a tarball using a browser or whatever
> 2) extract the tarball: tar
On 5/22/2012 6:44 PM, Gelonida N wrote:
> I'd like to install python 2.6 and 2.7 on Windows?
>
>
> In fact I have already 2.6 installed and would like to additionally
> install 2.7
>
>
>
> When clicking on .py file I'd like to execute it with python 2.6
ild so
that I'd get all 7 built automatically with cython and pylint in them.
On Tue, May 22, 2012 at 4:47 PM, Gelonida N wrote:
> Hi,
>
> On Ubuntu 12.04 python 2.7 is the default version
>
> I'd like to install python 2.6 parallel to 2.7 and create a virtualenv for
>
Hi,
On Ubuntu 12.04 python 2.7 is the default version
I'd like to install python 2.6 parallel to 2.7 and create a virtualenv
for it.
The reason is, that I have to write some code, that will be executed
under 2.6 and I want to be sure, that I don't accidentally write code,
tha
I'd like to install python 2.6 and 2.7 on Windows?
In fact I have already 2.6 installed and would like to additionally
install 2.7
When clicking on .py file I'd like to execute it with python 2.6
If I really wanted to run 2.7 I'd call the code with
%SystemDrive%\
i think this is so hilarious and just such a stunning achievement by
the wine team that i had to share it with people.
the writeup's here:
http://appdb.winehq.org/objectManager.php?sClass=version&iId=25765
but, to summarise:
* python2.6 runs under wine (the win32 emulator)
* so does python-comty
On 3/18/2012 4:55 PM, Andrea Crotti wrote:
On 03/18/2012 03:46 PM, Terry Reedy wrote:
1. If the difference between unittest and unittest2 is strictly a
matter of deletions and addition, replace unittest with the union of
the two.
2. Put the try/except dance in a compat file. Then everywhere els
On 03/18/2012 03:46 PM, Terry Reedy wrote:
1. If the difference between unittest and unittest2 is strictly a
matter of deletions and addition, replace unittest with the union of
the two.
2. Put the try/except dance in a compat file. Then everywhere else
'from compat import unittest'. This ide
On 3/18/2012 9:31 AM, Andrea Crotti wrote:
Suppose we want to use the unittest from Python 2.7, but also want to
support Python 2.6,
what is the best way to do it?
The solution used now is to have in setup.py
if sys.version < '2.7':
tests_require.append('unittest2')
Suppose we want to use the unittest from Python 2.7, but also want to
support Python 2.6,
what is the best way to do it?
The solution used now is to have in setup.py
if sys.version < '2.7':
tests_require.append('unittest2')
and then in every test file
try:
Am 06.02.2012 09:45, schrieb Matej Cepl:
Also, how could I write a re-implementation of random.choice which would
work same on python 2.6 and python 3.2? It is not only matter of unit
tests, but I would really welcome if the results on both versions
produce the same results.
Two approaches
07.02.12 00:06, Matej Cepl написав(ла):
> return seq[int(random.random() * len(seq))]
>
> doesn't seem like something so terrible (and maintenance intense). :)
_choice('abc') returns 'a' with probability P('a') =
1501199875790165/4503599627370496 = 1/3 - 1/13510798882111488 and 'b' with
probabi
On 6.2.2012 20:26, Tim Chase wrote:
In an ideal world, the code wouldn't have broken backwards compat.
However, given the conditions, if Matej is willing to forgo bug-fixes,
it's a reasonable solution. The alternate might be to try moving the
recent/fixed version into the old project and updating
On 02/06/12 12:48, Aaron France wrote:
On 02/06/2012 09:57 AM, Matej Cepl wrote:
Silly, of course, the solution is obvious ... I have just
embedded random.choice from 2.6 to my code.
Matěj
Is the above actually a good idea though?
What I understand you're doing is embedding the source from
th
On 02/06/2012 09:57 AM, Matej Cepl wrote:
On 6.2.2012 09:45, Matej Cepl wrote:
Also, how could I write a re-implementation of random.choice which would
work same on python 2.6 and python 3.2? It is not only matter of unit
tests, but I would really welcome if the results on both versions
produce
Steven D'Aprano wrote:
> A more explicit note will help, but the basic problem applies: how do you
> write deterministic tests given that the random.methods (apart from
> random.random itself) can be changed without warning?
Biting the bullet would mean supplying your own PRNG, under your control
On 6.2.2012 09:45, Matej Cepl wrote:
Also, how could I write a re-implementation of random.choice which would
work same on python 2.6 and python 3.2? It is not only matter of unit
tests, but I would really welcome if the results on both versions
produce the same results.
Silly, of course, the
on of random.choice which would
work same on python 2.6 and python 3.2? It is not only matter of unit
tests, but I would really welcome if the results on both versions
produce the same results.
Could we get some hint in the release notes?
Thanks for the help,
Matěj
--
http://mail.python.org/ma
On Mon, 06 Feb 2012 02:27:14 -0500, Terry Reedy wrote:
[...]
>> and should be treated as a bug. Raymond made a strong case arguing for
>> repeatability, and then approved a bug fix that broke repeatability. I
>> doubt that was deliberate.
>
> It was deliberate that randrange was changed to an eve
On 2/6/2012 12:56 AM, Steven D'Aprano wrote:
On Mon, 06 Feb 2012 00:07:04 -0500, Terry Reedy wrote:
On 2/5/2012 11:01 PM, Steven D'Aprano wrote:
Reading the docs, I would expect that when using an int as seed, you
should get identical results.
That is similar to expecting hash to be consist
On Mon, 06 Feb 2012 00:07:04 -0500, Terry Reedy wrote:
> On 2/5/2012 11:01 PM, Steven D'Aprano wrote:
>
>> Reading the docs, I would expect that when using an int as seed, you
>> should get identical results.
>
> That is similar to expecting hash to be consistent from version to
> version.
No.
On 2/5/2012 11:01 PM, Steven D'Aprano wrote:
Reading the docs, I would expect that when using an int as seed, you
should get identical results.
That is similar to expecting hash to be consistent from version to version.
There is no mention that the PRNG has changed between 2.6 and 3.2;
The
On Mon, 06 Feb 2012 02:27:38 +0100, Matej Cepl wrote:
> Strange thing is that this unit tests correctly with python3, but fails
> with python2. The problem is that apparently python3 random.choice picks
> different element of self[k] than the one python2 (at least, both of
> them are constant in t
Hi,
I have this working function:
def as_xml(self):
out = etree.Element("or")
for k in sorted(self.keys()):
out.append(etree.Element("hostname",
attrib={'op': '=', 'value': random.choice(self[k])}))
# ... return somehow string representing
On 31/12/2011 22:13, OlyDLG wrote:
> Hi! I'm working on a script utilizing os.makedirs to make directories
> to which I'm then trying to write files created by exe's spawned w/
> subprocess.call; I'm developing in Stani's Python Editor, debugging
> using Winpdb. I've gotten to the point where
>
Hi! I'm working on a script utilizing os.makedirs to make directories
to which I'm then trying to write files created by exe's spawned w/
subprocess.call; I'm developing in Stani's Python Editor, debugging
using Winpdb. I've gotten to the point where
subprocess.Popen._execute_child is raising a W
> them would not even open. Want to guess? Yup, the config tools are (some
> of them) written in python 2.6-- and they don't run in 2.7.1 nor 3.2 . :(
Just a note, Ubuntu 11.04 has 2.7 preinstalled.
Geremy Condra
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jun 14, 2011 at 9:08 AM, SigmundV wrote:
> To the OP I'd say: learn Python through 3.2. It's the best way
> forward, for the sake of yourself and others. The only way more
> modules can become 3k compatible is if more people use 3k.
I skipped 3.2 and went straight to 3.3a0 from hg, but th
1 - 100 of 840 matches
Mail list logo