Changing path to python in pip.exe, ipython.exe, etc

2024-04-25 Thread Olivier B. via Python-list
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

Re: First two bytes of 'stdout' are lost

2024-04-11 Thread Olivier B. via Python-list
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

First two bytes of 'stdout' are lost

2024-04-11 Thread Olivier B. via Python-list
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

Re: Making 'compiled' modules work with multiple python versions on Linux

2024-03-29 Thread Olivier B. via Python-list
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

Making 'compiled' modules work with multiple python versions on Linux

2024-03-28 Thread Olivier B. via Python-list
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

Module use of python3_d.dll conflicts with this version of Python

2023-01-26 Thread Olivier B.
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

téléchargement python

2021-09-23 Thread olivier Perchet
Envoye `a partir de [1]Courrier pour Windows [2][IMG] Garanti sans virus. [3]www.avast.com References Visible links 1. https://go.microsoft.com/fwlink/?LinkId=550986 2. https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=em

Re: Encounter issues to install Python

2019-01-06 Thread Olivier Oussou via Python-list
samedi 13 octobre 2018 à 19:24:28 UTC+2, Anthony Flury a écrit : Olivier, Welcome to the list - before we can help you, we need some more information : - What Operating system are you using - Windows/Mac/Linux/Raspberry Pi/Android for something else ? - What command or

Encounter issues to install Python

2018-10-08 Thread Olivier Oussou via Python-list
Hi!I downloaded and installed python 3.6.4 (32-bit) on my computer but I have problems and can not access the python interface. I need your technical assistance to solve this matter.  Best regard! Olivier OUSSOUMedical entomologist, Benin -- https://mail.python.org/mailman/listinfo/python-list

Cohabitation of debug and release python in the same folder

2016-11-25 Thread Olivier Barthelemy
If i try to build a normal python and a 'with-pydebug' python in the same folder, I can run both versions of python by running the real executable names instead of the generic name symlinks. However, if i want to use sysconfig.get_config_var() to check "Py_DEBUG" (to then know from .py files wh

Olivier Adret

2015-11-06 Thread olivier
Je vais essayer de programmer en python. On verra bien ! -- https://mail.python.org/mailman/listinfo/python-list

Secretly passing parameter to function

2012-12-05 Thread Olivier Scalbert
fore each step. But it is not very elegant ... One other approach would be to add dynamically an attribute the the step1 function, and retrieve it inside the function, but it is perhaps overkill. Do you have some ideas ? Thanks, Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: integer to binary 0-padded

2011-06-15 Thread Olivier LEMAIRE
You're right, I use Python 2.6.6 -- http://mail.python.org/mailman/listinfo/python-list

Re: integer to binary 0-padded

2011-06-15 Thread Olivier LEMAIRE
Thank you to all of you !! so finally, I can simply write : #!/usr/bin/env python def int2binPadded(number, size): """The purpose of this function is to convert integer number to binary number 0-padded.""" if type(number)!=int or number < 0: raise ValueError, "should be a

integer to binary 0-padded

2011-06-15 Thread Olivier LEMAIRE
print int2binPadded(int(sys.argv[1]),int(sys.argv[2])) This satisfies my needs ! Though, what do you think about it ? Thank you for you remarks, Olivier -- http://mail.python.org/mailman/listinfo/python-list

Want to free hosting.

2011-03-04 Thread Rat Olivier
Hey Want to free hosting... This is for very short time. Visithttp://www.balticwebhost.com/aff.php?aff=001 -- http://mail.python.org/mailman/listinfo/python-list

Re: Question on using urllib

2010-11-11 Thread Olivier Scalbert
gt; with open("tmp.jpg", "w") as f: f.write(img) > ... >>>> > > Now if you are using that workaround a lot he may come up with more > sophisticated techniques. So dont ;) > > Peter Thanks Peter, it works perfectly ! At 60 fps I can even make a video ... ;-) Olivier -- http://mail.python.org/mailman/listinfo/python-list

Question on using urllib

2010-11-11 Thread Olivier Scalbert
n previous pictures can be displayed ... So I am a bit lost ... Any help would be very appreciate !! Thanks, Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and 3d

2009-09-14 Thread Olivier Renouard
lso worth mentioning: > > - The Python Computer Graphics Kit ( http://cgkit.sourceforge.net ) > > Cheers > And you could add Cortex, http://cortex.devjavu.com, various C++ libraries with Python binding to manipulate 3d content creation format and either display them in OpenGL format or export them to RIB format for rendering. -- Olivier Renouard -- http://mail.python.org/mailman/listinfo/python-list

Re: segfault calling SSE enabled library from ctypes

2008-11-30 Thread Olivier Grisel
I found an even simpler solution: use the -mstackrealign GCC option to build the shared library. -- Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: segfault calling SSE enabled library from ctypes

2008-11-25 Thread Olivier Grisel
Replying to myself: haypo found the origin of the problem. Apparently this problem stems from a GCC bug [1] (that should be fixed on x86 as of version 4.4). The bug is that GCC does not always ensure the stack to be 16 bytes aligned hence the "__m128 myvector" local variable in the previous code

Re: SWIG vs. ctypes (Was: ANN: PyEnchant 1.5.0)

2008-11-25 Thread Olivier Grisel
* and then > return the latter in a function with C bindings. http://cython.org also has some support for C++ bindings. I also heard that Boost.Python is very well suited to make full featured C++ / python bindings though I never tried myself. -- Olivier -- http://mail.python.org/mailman/listinfo/python-list

segfault calling SSE enabled library from ctypes

2008-11-24 Thread Olivier Grisel
m not familiar with python internal at all so I cannot understand what's wrong. You can notice that valgrind make the program run till the end and display the correct results (4 zeros) on stdout while logging a bunch of errors (most of those are not related to our problem since they appear when

Re: str() should convert ANY object to a string without EXCEPTIONS !

2008-09-28 Thread Olivier Lauzanne
On Sep 28, 11:21 am, est <[EMAIL PROTECTED]> wrote: > On Sep 28, 4:38 pm, Steven D'Aprano <[EMAIL PROTECTED] > Can anyone tell me how to customize a default encoding, let's say > 'ansi' which handles range(256) ? I assume you are using python2.5 Edit the file /usr/lib/python2.5/site.py There is a

Re: python and web programming, easy way...?

2008-04-27 Thread Olivier Parisy
David a écrit : Also, I can't find any reference to cookies or sessions in the webpy online docs. Maybe it's possible to bolt on support with Python's Cookie module. The web.py cookbook describes how to use sessions and cookies: http://webpy.org/cookbook Regards, O

Re: read and readline hanging

2008-01-28 Thread Olivier Lefevre
>> But in python eventually stdout.readline() hangs. This is a real >> nuisance: why can't it just return None? > > Because that would be quite annoying because most of the time people want > blocking behavior. Just an afterthought: do people prefer the blocking behaviour because blocking until

Re: read and readline hanging

2008-01-28 Thread Olivier Lefevre
pexpect looks promising, thanks. -- O.L. -- http://mail.python.org/mailman/listinfo/python-list

Re: read and readline hanging

2008-01-28 Thread Olivier Lefevre
>> Yes, that has since occurred to me. I need to echo some magic string >> after each command to know that I reached the end of the answer to >> the previous command. In interactive mode the prompt fulfills that >> role. > > And hope that that "magic string" does not occur somewhere within > the r

Re: read and readline hanging

2008-01-28 Thread Olivier Lefevre
> The buffering behavior at the interactive prompt is very often different > from connections via pipes. I hadn't thought of that. I will ask on the Octave list. Thanks, -- O.L. -- http://mail.python.org/mailman/listinfo/python-list

Re: read and readline hanging

2008-01-27 Thread Olivier Lefevre
>> Indeed, if I do this interactively, I can tell after 3 lines that I've >> gotten all there is to get right now and the fourth readline() call >> hangs. > > Can you really? Yes interactively: at the command prompt, you can tell when it's over because you know the command you just sent and whet

Re: read and readline hanging

2008-01-27 Thread Olivier Lefevre
> The `trheading` module is modeled after Java's threading API. OK. Thanks for the hint. However BufferedReader.readline() does not block in Java, so it is still difficult to transpose. >> But how can I find out *programmatically* that there is no more >> input? > > You can't. How do people han

Re: read and readline hanging

2008-01-25 Thread Olivier Lefevre
Hi Steve, Thanks for the answer. Yes this is tricky. I have done it in Java before, where you can, e.g., set up a thread to pump stuff out of both stderr and stdout continuously but my python is too rudimentary for that. There is a key difference anyway: in Java you can write while (br.readL

read and readline hanging

2008-01-24 Thread Olivier Lefevre
I am calling subprocess.Popen with p = Popen(args, bufsize=-1, stdin=PIPE, stdout=PIPE, stderr=PIPE) and after sending come command to the process, I try to read from p.stdout but after a few calls I hang. What is the correct way to do this, i.e., to read everything w/o getting stuck? I am not fami

Re: PYTHONPATH not working on Windows XP (?)

2007-09-03 Thread olivier
rator on win32. It should be "/" or "\\", never "\". Regards, Olivier -- http://mail.python.org/mailman/listinfo/python-list

_hashlib portability issue

2007-06-26 Thread Olivier Feys
, where the theses lib versions are not allways the same. Is it possible to configure that ? thanks, Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: Log-in to forums (using cookielib)?

2007-05-01 Thread Olivier Oost
Gabriel Genellina wrote: > En Tue, 01 May 2007 04:44:57 -0300, Olivier Oost <[EMAIL PROTECTED]> > escribió: > >> I need to login to a online forum, like a phpbb forum, and leave a >> message there. I figured I need to use cookielib, but the >> documentation of

Log-in to forums (using cookielib)?

2007-05-01 Thread Olivier Oost
Hi, I need to login to a online forum, like a phpbb forum, and leave a message there. I figured I need to use cookielib, but the documentation of cookielib is not very clear to me. I tried to just copy/paste all the cookies from FireFox into my Python-program, like this: import cookielib, urll

Memory allocation problem with python 2.4.3

2007-04-09 Thread Brice-Olivier Demory
Hi, I'm encountering an odd problem while running a python script which calls a C program called 'st_time' : Traceback (most recent call last): File "ccdd.py", line 177, in ? answer=proc_request(conn,addr,request) # proc the request File "ccdd.py", line 69, in proc_re

UTF-8

2007-03-10 Thread Olivier Verdier
an utf-8 should be advised against). Such a feature would be greatly appreciated by all of us non native English speakers around the world. Best regards, == Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: Repr or Str ?

2007-02-06 Thread Olivier Feys
str is a text representation of the object, you can see it as a nice print repr is the text representation of the object that you can evaluate to get the same object Johny wrote: > Where and when is good/nescessary to use `repr` instead of `str` ? > Can you please explain the differences > Than

get objects referencing another one

2007-02-05 Thread Olivier Feys
I'm working on a tree and I have refcounting problems. Is it possible from an object, to get the list of objects referencing it ? thanks -- http://mail.python.org/mailman/listinfo/python-list

RE: About the 79 character line recommendation

2006-12-05 Thread Olivier Langlois
Hi, There was a coding standard where I worked and the intention behind this requirement was to make the code printer friendly. Printing code source with lines longer than 80 chars greatly hinder readability on paper. Greetings, Olivier Langlois http://www.olivierlanglois.net > > I also

Problem with using unittest module

2006-07-31 Thread Olivier Langlois
ot;, line 69, in Validate raise CDKeyException, self.logger.error(e) CDKeyException Any idea what is happening? Thanks, Olivier Langlois http://www.olivierlanglois.net -- http://mail.python.org/mailman/listinfo/python-list

Problem with installing MySQL-python-1.2.1_p2

2006-05-23 Thread Olivier Langlois
s but if I do that and compile _mysql.pyd. When that module is initialized, python is crashing because PyRun_String returns a NULL pointer instead of the expected valid PyObject pointer. Is there anybody that can help me? Thank you, Olivier Langlois http://www3.sympatico.ca/olanglois --

RE: Memory limit to dict?

2006-04-11 Thread Olivier Langlois
facing. I have kept thinking about the original problem and I now believe that the only solution if he wants to store 3.6GB of data in a Python script is to recompile Python in 64 bits. I do not know if this is something that someone has already done successfully... Olivier Langlois http

RE: Memory limit to dict?

2006-04-11 Thread Olivier Langlois
That is a good observation! Considering that hash tables to have good performance need to have a fill rate of 70% or lower means that if you try to fit 3.6 GB of data into a dict, your memory requirement will be much higher than 3.6GB. BTW, this brings a new question. How does Python controls dic

RE: Memory limit to dict?

2006-04-11 Thread Olivier Langlois
Just out of curiosity. What is the OS that you are using? I am asking because I do not know about XP 64bits edition but if you are using Windows XP 32 bits version, no matter how much RAM you have on your machine, the OS has an inherent 4GB address space limit per process. Olivier Langlois http

Re: 32-bit python on Opteron, Solaris 10?

2006-04-09 Thread Olivier P
Gary Robinson wrote: > I'm in the market for a server to run some python code which is > optimized via psyco. > > Sun T2100 servers come with Solaris 10, which comes with python > pre-installed. You can always install a 32bits version of Linux or Solaris on the X2100 yourself. The X2100 is even

RE: String comparison question

2006-03-20 Thread Olivier Langlois
Hi Michael, Normalizing the whitespace is what I was looking to do. I guess that that aspect of my original query was not enough clear. But with either solutions, I get the result I wanted. Greetings, Olivier Langlois http://www.quazal.com > -Original Message- > Fredrik Lundh

RE: String comparison question

2006-03-19 Thread Olivier Langlois
Hi Michael! Your suggestion is fantastic and is doing exactly what I was looking for! Thank you very much. There is something that I'm wondering though. Why is the solution you proposed wouldn't work with Unicode strings? Olivier Langlois http://www.quazal.com > > impo

String comparison question

2006-03-19 Thread Olivier Langlois
Hi,   I would like to make a string comparison that would return true without regards of the number of spaces and new lines chars between the words   like ‘A   B\nC’ = ‘A\nB    C’   What would be the easiest way to do it in Python?   Thanks, Olivier Langlois http://www.quazal.com

Re: Advice for creating a web app

2006-03-11 Thread Olivier
capacities (for instance, a wrap around grep). I used to run it behind apache with cgi, but it should be possible to use it with a lightweight-no install web server. HTH, Olivier -- http://mail.python.org/mailman/listinfo/python-list

Optimize flag question

2006-02-24 Thread Olivier Langlois
flag has on scripts but I have not found much…   So my question is: what are the ‘optimizations’ that the Python interpreter is doing when you specify the optimize flag and is there anything I should be cautious about when using it?   Thank you, Olivier Langlois http://www.quazal.com

Re: Multiple versions of Python / PythonWin on the same machine?

2006-02-24 Thread Olivier
path to launch the relevant version at will. Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: Best python module for Oracle, but portable to other RDBMSes

2006-02-24 Thread Olivier
rame database. > > Looks like I'd probably want to use something that conforms to the > DB-API 2.0. You want to use cx_Oracle : http://www.python.net/crew/atuining/cx_Oracle/index.html which is nowadays the very best python Oracle driver. Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python help!

2006-02-17 Thread Olivier
; req.write("Under Construction") if APACHE: return apache.OK ## if __name__ == "__main__": req = DummyRequest() handler(req) HTH, Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: How to calculate the CPU time consumption and memory consuption of any python program in Linux

2005-12-24 Thread Olivier Grisel
s(sys.modules, str) > and objgrep, which i didn't know about > This looks relevant too (not tested though): http://pysizer.8325.org/ -- Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: Vaults of Parnassus hasn't been updated for months

2005-12-23 Thread Olivier Grisel
p.python.org/pypi?%3Aaction=browse -- Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: Pickle to source code

2005-10-26 Thread Olivier Dormond
__main__.MyClass instance at 0xb7bfb76c> >>> obj.a, obj.b, obj.done (1, 2, 1) >>> As I've never used the persistent_id mechanism of pickle I don't know if that would do the trick. Cheers, Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: Alternatives to Stackless Python?

2005-09-23 Thread Olivier Dormond
Christophe wrote: > [EMAIL PROTECTED] a écrit : > >>> I found LGT http://lgt.berlios.de/ but it didn't seem as if the >>> NanoThreads module had the same capabilites as stackless. >> >> What specific capabilities of Stackless are you looking for, that are >> missing from NanoThreads? > > Capabili

Re: mod_python: what's going on here?

2005-09-05 Thread Olivier
-so > Also, if this is not appropriate for this group, does anyone know of a > Python group for which this is more appropriate? The mod_python mailing list ? At http://www.modpython.org/ . Regards, Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: multilanguage site and user informations edition

2005-07-26 Thread Olivier
What do you mean about "a couple of day" ? because I need to do this for next month (a beta version) and the final version for september. do you think plone 2.1 will be release at this date ? thanks. Olivier. - Original Message - From: <[EMAIL PROTECTED]> Newsgroups:

multilanguage site and user informations edition

2005-07-25 Thread Olivier
i need to create a multilinguage site and i need help : first i want to know what is the best and simple solution for a multilinguage site with plone 2? i want some tutorial, how to and if possible exemple next i need to modify the user standard information to put my personnal information like ad

Re: scripting browsers from Python

2005-06-01 Thread Olivier Favre-Simon
On Wed, 01 Jun 2005 22:27:44 +, John J. Lee wrote: > Olivier Favre-Simon <[EMAIL PROTECTED]> writes: > >> On Tue, 31 May 2005 00:52:33 -0700, Michele Simionato wrote: >> >> > I would like to know what is available for scripting browsers from >>

Re: scripting browsers from Python

2005-05-31 Thread Olivier Favre-Simon
On Tue, 31 May 2005 00:52:33 -0700, Michele Simionato wrote: > I would like to know what is available for scripting browsers from > Python. > For instance, webbrowser.open let me to perform GET requests, but I > would like > to do POST requests too. I don't want to use urllib to emulate a > browse

Re: How to read an integer value from a binary file?

2005-05-03 Thread Olivier Elbaz
Hi Jeff, You was right, my problem was coming from the number of items that I gave to the "unpack" method. I was thinking,like an array in C, that slice [2:5] will give 4 items and not 3. Thanks a lot for your help. Olivier On 5/3/05, Jeff Epler <[EMAIL PROTECTED]> wrote: >

How to read an integer value from a binary file?

2005-05-03 Thread Olivier Elbaz
program since I got a syntax error. Could you help me to find a solution? Thanks, Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: How to delete a module file

2005-03-03 Thread Olivier Ravard
Le lundi 28 fÃvrier 2005 Ã 17:08 +, Dennis Lee Bieber a Ãcrit : > On Mon, 28 Feb 2005 16:43:45 +0100, Olivier Ravard > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > > > > > Remark : This problem does not exist under Linux. > >

How to delete a module file

2005-02-28 Thread Olivier Ravard
This problem does not exist under Linux. Thanks for your answers and ideas. Olivier -- http://mail.python.org/mailman/listinfo/python-list

what are PyObject *globals and PyObject *locals ?

2005-02-24 Thread Olivier Sessink
variable then?) regards, Olivier (I know extending is the preferred solution, unfortunately I was not aware of this some years ago) And now a word from our sponsor -- For a quality usenet news server, try DNEWS, easy to install, fast, efficient and reliable. For

Re: python and visual C++

2005-02-03 Thread Olivier Ravard
"Caleb Hattingh" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Olivier > > If you consider using the ctypes module, you can write a dll (windows) or > a shared object (linux) using anything that can make one of those. > > For example, I

python and visual C++

2005-02-02 Thread Olivier Ravard
Hi, When I tryed to compile a python module using distutils under windows, and there is an error message if we do not have Microsoft Visual C++ 6 installed. This is because python have been compiled with MSVC6 and distutils wants it in order to compile C++ python modules. One of the reasons why I

find isset() php function equivalent in python

2005-02-01 Thread Olivier Noblanc ATOUSOFT
Hello What is the equivalent function of php isset() in python Thank you very much. olivier noblanc http://www.logiciel-erp.fr -- http://mail.python.org/mailman/listinfo/python-list

Re: import doesn't work as i want

2005-01-31 Thread Olivier Noblanc ATOUSOFT
how to move in function ? "Fredrik Lundh" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Olivier Noblanc wrote: > >> In the botom of this post you will see my source code. >> >> The problem is when i launch main.py that doesn&#x

import doesn't work as i want

2005-01-31 Thread Olivier Noblanc ATOUSOFT
Hello, In the botom of this post you will see my source code. The problem is when i launch main.py that doesn't make anything why ? Thanks olivier noblanc Atousoft http://www.logiciel-erp.fr I have main.py : - import wx import inc.impor

Re: import directory error

2005-01-31 Thread Olivier Noblanc ATOUSOFT
Problem solved thanks a lot "Steve Holden" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Olivier Noblanc ATOUSOFT wrote: > >> Hello, >> >> >> When i want to import a .py fire from another subdirectory i make >> >&

import directory error

2005-01-31 Thread Olivier Noblanc ATOUSOFT
Hello, When i want to import a .py fire from another subdirectory i make import inc/setupxml but that make me an error message. A man tell me to put a dot but that doesn't work. Can you help me ? Thanks. -- http://mail.python.org/mailman/listinfo/python-list