I am building a python work environment where
- i build python from sources
- install pip with the wheel bundled with python
- then install things with pip, like Jupyter
That environment is then deployed on various machines, at various
installation folders.
One issue I encounter, is the path t
Partly answering myself:
For some reason, right after mystdout has been created, i now have to
do mystdout.seek(0) and this solves the issue.
No idea why though..
Le jeu. 11 avr. 2024 à 14:42, Olivier B.
a écrit :
>
> I am trying to use StringIO to capture stdout, in code that looks lik
I am trying to use StringIO to capture stdout, in code that looks like this:
import sys
from io import StringIO
old_stdout = sys.stdout
sys.stdout = mystdout = StringIO()
print( "patate")
mystdout.seek(0)
sys.stdout = old_stdout
print(mystdout.read())
Well, it is not exactly like this, since this
libpython.so, which could be pointing to any
version. I'll try that next
Le ven. 29 mars 2024 à 10:10, Barry a écrit :
>
>
>
> > On 28 Mar 2024, at 16:13, Olivier B. via Python-list
> > wrote:
> >
> > But on Linux, it seems that linking to libpython3.so instead of
I have a python module that includes some C++ code that links with the
Python C API
I have now modified the c++ code so that it only uses the Limited API,
and linked with python3.lib instead of python311.lib.
I can now use that python module with different python versions on Windows
But on Linux
Am 05.03.23 um 15:35 schrieb aapost:
I have run in to this a few times and finally reproduced it. Whether it
is as expected I am not sure since it is slightly on the user, but I can
think of scenarios where this would be undesirable behavior.. This
occurs on 3.11.1 and 3.11.2 using debian 12 te
Hi,I am in the process of trying to make my code (an c++ executable
and swig modules using the Python C API) lose the dependency to python
3.7, to be compatible with all Python 3.2+
I tried linking to python.lib instead of python37.lib. As i am still
using a few things that are not in the limited
Hello i have a byte file, that fill a vb6 type like:
Type prog_real
codice As String * 12'hsg
denom As String * 24'oo
codprof As String * 12 'ljio
note As String * 100
programmer As String * 11
Out As Integer
b_out As Byte'TRUE = Se
I am new to python and wish to update 3.9 to3.10.8 which I have downloaded. How
do I replace 3.9 with the 3.10.8 I downloaded.
Kind regards
JohnGee
--
https://mail.python.org/mailman/listinfo/python-list
We are searching for someone that can develop a python program for use
servomotor for automotive.
--
https://mail.python.org/mailman/listinfo/python-list
do to fix this? Error sent back is "'python' is not recognized as an internal
or external command, operable program or batch file." Thank you.
John B. (Jack) Stevenson
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
I have already posted a message some time ago for this app. Since then, I
didn't code in python or made any changes. I think before getting further with
functionnalities a few things or the whole thing need to be changed.
For exemple, it would need a button to pick folders and maybe ask if
Hi,
I would like to know if for a small app for instance that requires a connection
to a remote server database if php is more suitable than Python mainly
regarding security.
Php requires one port for http and one port for the connection to the database
open. If using Python with a tkinter gui,
hi,
i am thinking about using RxPy to solve the following problem, and not yet sure
if its the right tool for the job.
I am working on a calculation engine, that takes a dataset (or multiple sets)
and calculates new columns.
so in pandas terms, it starts as DataFrame, and then i run it thro
First i must say i use Bottle, but the same may also be the case in Flask too.
I ask here and not in sub Bottle because there are only a few people there and
i receive no responses.
Actualy since i started here let me say what i have found.
Iam just trying to post html form data to the followin
First i must say i use Bottle, but the same may also be the case in Flask too.
I ask here and not in sub Bottle because there are only a few people there and
i receive no responses.
Actualy since i started here let me say what i have found.
Iam just trying to post html form data to the followin
On Monday, November 20, 2017 at 3:17:49 PM UTC-5, Chris Angelico wrote:
> Neither is perfect. You have to take your pick between them.
Right on, thanks for weighing in, Chris. Your responses have been very helpful.
I wouldn't feel comfortable claiming the authority to make this call alone. But
f
On Monday, November 20, 2017 at 2:31:40 PM UTC-5, MRAB wrote:
> What if there are duplicate elements?
>
> Should that be MyColl(some_elements) == MyOrderedColl(other_elements)
> iff len(some_elements) == len(other_elements) and set(some_elements) ==
> set(other_elements)?
Yes, that's what I mea
On Monday, November 20, 2017 at 1:55:26 PM UTC-5, Chris Angelico wrote:
> But what you have is the strangeness of non-transitive equality, which
> is likely to cause problems.
But this is exactly how Python's built-in dict and OrderedDict behave:
>>> od = OrderedDict([(1, 0), (2, 0), (3, 0)])
>>>
Suppose we're implementing an immutable collection type that comes in unordered
and ordered flavors. Let's call them MyColl and MyOrderedColl.
We implement __eq__ such that MyColl(some_elements) ==
MyOrderedColl(other_elements) iff set(some_elements) == set(other_elements).
But MyOrderedColl(so
On 2017-09-10 12:21 PM, Leam Hall wrote:
y'all,
My god-kids and their proginators lost most everything because of
Harvey. I spent much of yesterday worrying about a friend who had gone
quiet as he evacuated his family ahead of Irma.
Please keep Python in perspective. Whether we use 1.5 or 4r
On 2017/03/21 1:46 PM, Steve D'Aprano wrote:
On Tue, 21 Mar 2017 08:39 pm, Tristan B. Kildaire wrote:
On 2017/03/21 11:07 AM, Ivo Bellin Salarin wrote:
IronPython?
Le mar. 21 mars 2017 08:52, Tristan B. Kildaire a
écrit :
Is Python.NET a version of Python that compiles Python source
On 2017/03/21 11:07 AM, Ivo Bellin Salarin wrote:
IronPython?
Le mar. 21 mars 2017 08:52, Tristan B. Kildaire a
écrit :
Is Python.NET a version of Python that compiles Python source code to
Microsoft's IR for running by a MS runtime?
--
https://mail.python.org/mailman/listinfo/python-li
Is Python.NET a version of Python that compiles Python source code to
Microsoft's IR for running by a MS runtime?
--
https://mail.python.org/mailman/listinfo/python-list
Is Python.NET a version of Python that compiles Python source code to
Microsoft's IR for running by a MS runtime?
--
https://mail.python.org/mailman/listinfo/python-list
Is Guido active on this newsgroup. Sorry for the off-topic ness.
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 15 Nov 2016 22:16:07 +, Erik wrote:
> On 15/11/16 14:43, Michael Torrie wrote:
>> As you've been told several times, if you "import deen" then you can
>> place a new object into the deen namespace using something like:
>>
>> deen.foo=bar
>>
>> Importing everything from an imported modu
Foor ages, I have been trying to summon up courage learn how to program. I
chose o start with Python. I found that when the “black” screen comes on, I am
unable to read/see any characters even if I turn up the brightness of the
screen. So, I give up. I tried version 3.5.1. I shall be grateful fo
My package, available at https://github.com/jab/bidict, is currently laid out
like this:
bidict/
├── __init__.py
├── _bidict.py
├── _common.py
├── _frozen.py
├── _loose.py
├── _named.py
├── _ordered.py
├── compat.py
├── util.py
I'd like to get some more feedback on a question about this layout
Hello Folks,
Please go through below job description and send me updated resume to
amr...@uniteditinc.com
Job Title: OBIEE Developer and Administrator
Location: Seattle WA
Duration: 12+months
Experience: 10+ years only
Job Description:
* maintain the Oracle Business Intelligence Enterp
On Friday, December 5, 2014 2:41:54 AM UTC-5, dieter wrote:
> suyash@gmail.com writes:
>
> > Hello All,
> >
> > I have installed pyxnat on my mac. With pyxnat i am trying to access XNAT
> > server in our university. As mentioned on the tutorial i tried both ways,
> > neither is working. Foll
Hello All,
I have installed pyxnat on my mac. With pyxnat i am trying to access XNAT
server in our university. As mentioned on the tutorial i tried both ways,
neither is working. Following error is displayed:
>>> central=Interface(server='http://hd-hni-xnat.cac.cornell.edu:8443/xnat')
User: sdb
Ok; thanks for the underscore and clarification. Just need to adjust my
thinking a bit.
--
https://mail.python.org/mailman/listinfo/python-list
Ok; this is a bit esoteric.
So finally is executed regardless of whether an exception occurs, so states the
docs.
But, I thought, if I from my function first, that should take
precedence.
au contraire
Turns out that if you do this:
try:
failingthing()
except FailException:
return 0
fina
MRAB your solution is good thank you I will use it.
Terry Eddy I saw my mistake about for example 2 <= 2, I think it's easier to
use break in this case thank you!
--
https://mail.python.org/mailman/listinfo/python-list
Hi! I hope you can help me.
I'm writting a simple piece of code.
I need to keep asking for a number until it has all this specifications:
- It is a number
- It's lenght is 3
- The hundred's digit differs from the one's digit by at least two
My problem is that I enter a valid number like: 123, 32
Hi, I'm doing Python exercises and I need to write a function to flat nested
lists
as this one:
[[1,2,3],4,5,[6,[7,8]]]
To the result:
[1,2,3,4,5,6,7,8]
So I searched for example code and I found this one that uses recursion (that I
don't understand):
def flatten(l):
ret = []
for i
Hello, I'm making Python mini-projects and now I'm making a Latin Square
(Latin Square: http://en.wikipedia.org/wiki/Latin_square)
So, I started watching example code and I found this question on Stackoverflow:
http://stackoverflow.com/questions/5313900/generating-cyclic-permutations-reduced-la
Hi,
I got a chance to build an university website, within very short period of time.
I know web2py, little bit of Django, so please suggest me the best to build
rapidly.
Thanks in advance
Raghu
--
http://mail.python.org/mailman/listinfo/python-list
I'm making this exercise: (Python 3.3)
Write a function translate() that will translate a text into "rövarspråket"
(Swedish for "robber's language"). That is, double every consonant and place an
occurrence of "o" in between. For example, translate("this is fun") should
return the string "tothoh
Fixed, the problem was in
HANGMANPICS
I didn't open the brackets.
Thank you guys :)
--
http://mail.python.org/mailman/listinfo/python-list
Sorry, I'm new in here
So, if you want to see the complete code I've fixed it:
http://www.smipple.net/snippet/a7xrturo/Hangman%21%20%3A%29
And here is the part of code that doesn't work:
#The error is marked in the whitespace between letter and in
def displayBoard(HANGMANPICS, missedLetters,
Mmmm
Ok guys, thank you
I'm really sure that isn't a weird character, it is a space.
My Python version is 3.3.2, I've runed this code in Python 2.7.5, but it stills
the same.
I've done what you said but it doesn't work.
Please Check it again here is better explained:
http://snipplr.com/v
Hi All
I'm new to python (4 days J) and was wondering if anyone out there can help
me
I am trying to get the time zones for latitude and longitude coordinates
but am having a few problems
The mistakes are probably very basic
I have a table in a database with around 600 rows. Each row
i want to kno how to link two applications using python for eg:notepad
txt file and some docx file. like i wat to kno how to take path of
those to files and run them simultaneously.like if i type something in
notepad it has to come in wordpad whenever i run that code.
--
http://mail.python.org/mai
ohlfsen writes:
> Hello.
>
> Hoping that someone can shed some light on a tiny challenge of mine.
>
> Through ctypes I'm calling a c DLL which requires me to implement a callback
> in Python/ctypes.
>
> The signature of the callback is something like
>
> void foo(int NoOfElements, char Elements[
Qi writes:
> Hi guys,
>
> Is there any known memory leak problems, when embed Python 2.7.3
> in C++?
> I Googled but only found some old posts.
>
> I tried to only call Py_Initialize() and Py_Finalize(), nothing else
> between those functions, Valgrind still reports memory leaks
> on Ubuntu?
>
>
Andrea Crotti writes:
> On 03/19/2012 12:59 PM, Andrea Crotti wrote:
>> I seemed to remember that type validation and type conversion worked
>> out of the box, but now
>> I can't get it working anymore.
>>
>> Shouldn't this simple example actually fail the parsing (instead it
>> parses perfectly
Andrea Crotti writes:
> When I publish something on Pypi, is there a way to make it fetch the
> list of dependencies needed by my project automatically?
>
> It would be nice to have it in the Pypi page, without having to look
> at the actual code..
> Any other possible solution?
I don't understa
John Nagle writes:
> I think that somewhere in "suds", they subclass the "unicode" type.
> That's almost too cute.
>
> The proper test is
>
> isinstance(s,unicode)
Woot, you finally discovered polymorphism - congratulations!
Diez
--
http://mail.python.org/mailman/listinfo/python-list
online data entry jobs
http://venuonlinejobs.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 22, 5:41 pm, Stephen Hansen wrote:
> > 3) object's type is type : object.__class__ is type
> > 4) type parent object is object : type.__bases__ == (object,)
>
> Saying "type" and "parent" and the like for new-style classes is
> something of a misnomer. For "type" and "object", these things
On Aug 22, 1:57 pm, Steven D'Aprano wrote:
> The relationship between type and object is somewhat special, and needs to
> be bootstrapped by the CPython virtual machine.
Since you are talking about CPython, I'm wondering how it is
bootstraped since you can easly reference PyType in PyObject tha
ct.__class__ is type
4) type parent object is object : type.__bases__ == (object,)
B) type vs metaclass
1) type is the first metaclass ?
2) type is its own metaclass : type(type) is type ?
3) object's metaclass is type ?
4) other metaclasses *MUST* inherit type ?
5) type(any
Experienced Python/SQL contract developer
* 3+ years experience writing clean, concise Python
* 3+ years experience tracing, debugging, and maintaining existing code
* Experience working closely with a team in a fluid environment with
evolving requirements
* Strong CS fundamentals (algorithms & da
Back9 writes:
> Hi,
> I'm trying to set up a http server to handle a single POST request.
> That POST request is to upload a huge file and the server is supposed
> to handle it with the just POST request.
> With my python sample code, multiple post requests are working well,
> but that is not my
gervaz writes:
> On 3 Gen, 22:17, Adam Skutt wrote:
>> On Jan 3, 4:06 pm, Jean-Paul Calderone
>> wrote:
>>
>>
>>
>> > > Multiple processes, ok, but then regarding processes' interruption
>> > > there will be the same problems pointed out by using threads?
>>
>> > No. Processes can be terminate
Gerry Reno writes:
> On 01/03/2011 03:13 PM, Diez B. Roggisch wrote:
>>
>> A fun hack. Have you bothered to compare it to the PyPy javascript
>> backend - perfomance-wise, that is?
>>
>> Diez
>>
>
> I don't think that exists anymore. Didn
azakai writes:
> Hello, I hope this will be interesting to people here: CPython running
> on the web,
>
> http://syntensity.com/static/python.html
>
> That isn't a new implementation of Python, but rather CPython 2.7.1,
> compiled from C to JavaScript using Emscripten and LLVM. For more
> details
gervaz writes:
> On 31 Dic 2010, 23:25, Alice Bevan–McGregor
> wrote:
>> On 2010-12-31 10:28:26 -0800, John Nagle said:
>>
>> > Even worse, sending control-C to a multi-thread program
>> > is unreliable in CPython. See "http://blip.tv/file/2232410";
>> > for why. It's painful.
>>
>> AFIK, that
crow writes:
> Hi, I'm writing a test tool to simulate Web browser. Is there anyway
> to run JavaScript in python? Thanks in advance.
Not really. Yes, you can invoke spidermonkey. But the crucial point
about running JS is not executing JS, it's about having the *DOM* of the
browser available. Wh
erikj writes:
> If my understanding is correct, the sys.prefix variable holds the root
> directory python uses to find related files, and eg its site-packages.
>
> the value of sys.prefix is specified at compile time.
>
> it seems that on windows, when I build/install python at one location,
> an
> >
> > if __name__ == "__main__":
> > main()
What does this mean?
/Mikael
--
http://mail.python.org/mailman/listinfo/python-list
Adrian Casey writes:
> I have a PyQt4 multi-threaded application which accesses many hosts
> concurrently via ssh. I would like each thread to have access to a
> database so that it can look up details about the particular system it
> is connected to.
>
> The easy way is to have each thread crea
Meddelandetext
Am 20.11.2010 06:53, schrieb Mikael B:
Hi.
I'm learning python. python 2.6.6 on ubuntu 10.10 I'm swedish so I
try to use
unicode to get swedish characters. I've checked wikipedia.
utf-8 is said t
Date: Sat, 20 Nov 2010 08:47:18 +0100
From: stefan.sonnenb...@pythonmeister.com
To: mba...@live.se
CC: python-list@python.org
Subject: Re: try to use unicode
Meddelandetext
Am 20.11.2010 06:53, schrieb Mikael B:
Hi.
I'm learning p
Hi.
I'm learning python. python 2.6.6 on ubuntu 10.10 I'm swedish so I try to use
unicode to get swedish characters. I've checked wikipedia.
utf-8 is said to be an unicode encoding..
this is the test program:
# -*- coding: utf-8 -*-
import readline
s=raw_input(u'Månadslön:')
and this is the
Eric Frederich writes:
> I have a proprietary software PropSoft that I need to extend.
> They support extensions written in C that can link against PropLib to
> interact with the system.
>
> I have a Python C module that wraps a couple PropLib functions that I
> call PyProp.
>>From an interactive
Grigory Petrov writes:
> Hello.
>
> I have a DLL that allocates memory and returns it. Function in DLL is like
> this:
>
> void Foo( unsigned char** ppMem, int* pSize )
> {
> * pSize = 4;
> * ppMem = malloc( * pSize );
> for( int i = 0; i < * pSize; i ++ ) (* pMem)[ i ] = i;
> }
>
> Also,
Martin Caum writes:
> I am attempting to open a window on mouse activity which works, but
> the window fails to stay open.
> I set it to terminate when the escape key is pressed even when the
> program is not currently selected. This works fine. Originally I had
> it create the window only with a
> From: edream...@gmail.com
> Subject: Leo 4.8 rc1 released
> Date: Mon, 15 Nov 2010 09:06:01 -0800
> To: python-list@python.org
>
> Leo 4.8 release candidate 1 is now available at:
> http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106
>
> Leo is a text editor, data org
Artur Siekielski writes:
> On Nov 15, 1:03 am, de...@web.de (Diez B. Roggisch) wrote:
>> You don't say what data you share, and if all of it is needed for each
>> child. So it's hard to suggest optimizations.
>
> Here is an example of such a problem I'm de
Artur Siekielski writes:
> Hi.
> I'm using CPython 2.7 and Linux. In order to make parallel
> computations on a large list of objects I want to use multiple
> processes (by using multiprocessing module). In the first step I fill
> the list with objects and then I fork() my worker processes that d
Zeynel writes:
> It's about a week now I've been trying to convert a datetime object to
> seconds since epoch; the object is set to current time by class Rep()
> in Google App Engine:
>
> class Rep(db.Model):
> ...
> mCOUNT = db.IntegerProperty()
> mDATE0 = db.DateTimeProperty(auto_no
Beliavsky writes:
> After installing numpy, scipy, and matplotlib for python 2.6 and
> running the code from http://www.scipy.org/Cookbook/OptimizationDemo1
> (stored as xoptimize.py) in a directory with other python codes, I got
> the error messages
>
> C:\python\code\mycode>python xoptimize.py
alex23 writes:
> Tracubik wrote:
>> why the integer value doesn't change while the list value do?
>
> http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm
Not the issue here.
The reason the OP sees a difference that there is only one way to pass
parameters in python. Ther
macm writes:
> Hi Folks
>
> How find all childrens values of a nested dictionary, fast!
There is no faster than O(n) here.
>
>>>> a = {'a' : {'b' :{'/' :[1,2,3,4], 'ba' :{'/' :[41,42,44]} ,'bc
Steven D'Aprano writes:
> On Tue, 02 Nov 2010 03:42:22 -0700, jk wrote:
>> The former is difficult to find (try searching for 'open' in the search
>> box and see what you get).
>
> A fair point -- the built-in open comes up as hit #30, whereas searching
> for open in the PHP page brings up fopen a
hackingKK writes:
> On Sunday 31 October 2010 01:58 PM, Lawrence D'Oliveiro wrote:
>> In message, hackingKK
>> wrote:
>>
>>
>>> I want to know if there is a way to have the ElementTree module write to
>>> an xml file with line breaks?
>>>
>> Why does it matter? The XML files you generat
alain walter writes:
> Hello,
> I have many difficulties to manipulate xml routines. I'm working with
> python 2.4.4 and I cannot change to a more recent one, then I use dom
> package, why not.
> In the following code, I'm trying unsuccessfully to remove a
> particular node. It seems to me that i
>
> That's from the functional programming crowd.
>
> Python isn't a functional language.
A noob question: what is a functional language? What does it meen?
--
http://mail.python.org/mailman/listinfo/python-list
Nikola Skoric writes:
> Hi everybody,
>
> I need to downcast an object, and I've read repeatedly that if you
> need to downcast, you did something wrong in the design phase. So,
> instead of asking how do you downcast in python, let me explain my
> situation.
>
> I have a 2-pass parser. 1st pass
amfr...@web.de writes:
> Hi,
>
> i have a program that have to execute linux commands. I do it like this:
>
> retcode = Popen(["xterm", "-e", command],stdin=PIPE, stdout=PIPE,
> stderr=PIPE)
>
> I have to use xterm because some commands need further input from the
> user after they are executed.
>
nakisa writes:
> hello , I have started python last week,so maybe my question is a bit
> stupid.
> I got this error in my simple python code while trying to load data
> into the code. I have added this libaraies
> from pylab import *
> from scipy import *
> import matplotlib.mlab as mlab
> from n
alex23 writes:
> On Oct 15, 5:53 am, de...@web.de (Diez B. Roggisch) wrote:
>> For example Ableton Live, an audio sequencer.
>
> I _have_ Live and I didn't realise this :O Thanks!
Well, it's not a feature for end-users, it's used internally for some
midi controll
Regarding http://www.python.org/dev/peps/pep-0380/,
"Syntax for Delegating to a Subgenerator":
The first call can only be .next(), there's no way to provide an initial
value to .send(). That matches common use, but an initial .send() is
possible if .next() was called before "yield from". So I su
Seebs writes:
>> For long strings, another option is triple-quoting as you've seen in doc
>> strings: print """foo
>> bar""".
>
> I assume that this inserts a newline, though, and in this case I don't
> want that.
True.
$ python
>>> """foo
... bar"""
'foo\nbar'
>>> """foo\
Kingsley Turner writes:
> Hi,
>
> I'm using GCC as a pre-processor for a C-like language (EDDL) to
> handle all the includes, macros, etc. producing a single source file
> for another compiler. My python code massages the inputs (which
> arrive in a .zip file), then calls GCC.
>
> I have a prob
Tony writes:
> hi,
>
> is the python/c api extensively used? and what world-famous software
> use it? thanks!
It is, for a lot of extensions for python, and a lot of embedding python
into a software. For example Ableton Live, an audio sequencer. Arc GIS
has it, and the Eve Online. Many more do,
Seebs writes:
>> You can't really rely on the destructor __del__ being called.
>
> Interesting. Do I just rely on files getting closed?
Sometimes, but that's not it. Think Lisp, not C++. __del__ is not that
useful. Python is garbage-collected and variables have dynamic lifetime,
so the class c
Martin Landa writes:
> Hi,
>
> is there a way how to send command from python script to the shell
> (known id) from which the python script has been called? More
> precisely, the goal is to exit running bash (on Linux) or cmd (on
> Windows) directly from wxPython application, currently user needs
jimgardener writes:
> hi
> I have some demo python code hosted on a public host that uses
> subversion..and I want to modify one of the files using a patch file
> handed to me by another person..How do I do this?Generally I checkout
> the code and make the change and then commit again..I have ne
John Nagle writes:
> On 10/11/2010 1:45 AM, sankalp srivastava wrote:
>>
>> I am having difficulty in easy_installing
>> I use a proxy server and strange errors , like it can't fetch the
>> package is showing up .
>> the package is pyspeech ...please help me :(
>>
>> I don't know if the proxy s
Ethan Furman writes:
>Seebs wrote:
>>On 2010-10-12, Hallvard B Furuseth wrote:
>>>> self.type, self.name = None, None
>>
>>> Actually you can write self.type = self.name = None,
>>> though assignment statements are more limited than in C.
&g
Gregory Ewing writes:
> Philip Semanchuk wrote:
>
>> Hi Greg,
>> Are you talking about compiling Python itself or extensions?
>
> I've managed to get Python itself compiled as 32 bit,
> and that also seems to take care of extensions built
> using 'python setup.py ...'.
>
> I'm mainly concerned ab
I wrote:
> except IOError:
> if e.errno != errno.ENOENT: raise# if you are picky
Argh, I meant "except IOError, e:". That's for Python 2 but not
Python 3. "except IOError as e:" works on Python 2.6 and above.
--
Hallvard
--
http://mail.python.org/mailman/listinfo/python-list
Seebs writes:
> http://github.com/wrpseudo/pseudo/blob/master/makewrappers
>self.f = file(path, 'r')
>if not self.f:
>return None
No. Failures tend to raise exceptions, not return error codes.
Except in os.path.exists() & co.
$ python
>>> open("nonesuch")
Tracebac
Steven D'Aprano writes:
> On Fri, 08 Oct 2010 22:10:35 +0200, Hallvard B Furuseth wrote:
>> Jed Smith writes:
>>>>>> a = [1, 2, 3, 4, 5, 6]
>>>>>> a[::-1]
>>> [6, 5, 4, 3, 2, 1]
>>
>> Nice. Is there a trick to get a &q
Stefan Behnel writes:
>Hallvard B Furuseth, 11.10.2010 21:50:
>> Fine, so programs will have to do it themselves...
>
> Yes, they can finally handle bytes and Unicode data correctly and
> safely. Having byte data turn into Unicode strings unexpectedly makes
> the behaviou
Terry Reedy writes:
>On 10/8/2010 9:45 AM, Hallvard B Furuseth wrote:
>>> Actually, the implicit contract of __str__ is that it never fails, so
>>> that everything can be printed out (for debugging purposes, etc.).
>>
>> Nope:
>>
>> $ python2 -c 's
1 - 100 of 4481 matches
Mail list logo