Re: What file is foo in package bar in ?

2009-08-19 Thread Christian Heimes
northof40 wrote: Given an arbitary package is there some programmatic way to 'ask' what file the method/function is implemented in ? Indeed, the inspect module contains several useful functions for the job, for example http://docs.python.org/library/inspect.html#inspect.getfile

Re: Executing untrusted code

2009-08-20 Thread Christian Heimes
Emanuele D'Arrigo write: In what ways would the untrusted string be able to obtain the original, built-in open function and open a file for writing? Yes, if you know some tricks: [cls for cls in object.__subclasses__() if cls.__name__ == 'file'][0] Christian -- http://

Re: thread and win32com.client problem

2009-08-20 Thread Christian Heimes
Ray wrote: I already find the way to fix it. :-) I consider it good style when people describe their solution to a problem, too. Other Python users may run into the same issue someday. :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Decompressing gzip over FTP

2009-08-21 Thread Christian Heimes
odule-zlib Have fun! Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: grokproject and zope.security==3.4.1 error

2009-08-22 Thread Christian Heimes
urity==3.4.1'. src/zope/security/_proxy.c:19:20: error: Python.h: No such file or directory sudo apt-get install python2.4-dev Have fun :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Items inheriting attributes from its container?

2009-08-22 Thread Christian Heimes
ibutes i.e. The Python web application framework Zope implements the feature under the name "acquisition". Happy Googling! Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: break unichr instead of fix ord?

2009-08-25 Thread Christian Heimes
Jan Kaliszewski wrote: Are you sure, you couldn't have UCS-4-compiled Python distro for Windows?? :-O Nope, Windows require UCS-2 builds. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: What python can NOT do?

2009-08-28 Thread Christian Heimes
low level stuff like bit operations or direct hardware access. However it can be used as a glue language for low level code written in C or ASM. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: weak reference callback

2009-08-29 Thread Christian Heimes
quot;reference is dead, yet callback hasn't been > called yet") Yes, you'll definitely see a RuntimeError because you forgot to declare callback_called as a global variable. :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How to install setuptools...egg?

2009-08-30 Thread Christian Heimes
Colin J. Williams wrote: > You might try, at the command line: >easy_install setuptools That's not going to work. setuptools provides the easy_install command. If you have the easy_install command than setuptools is already installed. Christian -- http://mail.python.org/mailm

Re: Permanently adding to the Python path in Ubuntu

2009-08-30 Thread Christian Heimes
t root privileges. > > Any ideas? Have you read my blog entry about my PEP 370? http://lipyrary.blogspot.com/2009/08/how-to-add-new-module-search-path.html Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How to define a function with an empty body?

2009-09-13 Thread Christian Heimes
Peng Yu schrieb: > Hi, > > I want to define a function without anything in it body. In C++, I can > do something like the following because I can use "{}" to denote an > empty function body. Since python use indentation, I am not sure how > to do it. Can somebody let me know how to do it in python

Re: Array of objects lost in unpickling

2009-09-13 Thread Christian Heimes
class not your instance. By the way it's called a list in Python, not array. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: compiling python 3

2009-09-13 Thread Christian Heimes
? "apt-get build-dep python2.5" should install all required build dependencies. Have fun! Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: numpy NaN, not surviving pickle/unpickle?

2009-09-13 Thread Christian Heimes
in general it doesn't do what you expect. NaN isn't a singleton in Python. Python's float type uses IEEE 754 double precision numbers internally. The double type has much more than billions of NaN values (IIRC 2**53). isnan() is the only reliable way to detect NaNs. "x != x"

Re: How to define a class that can act as dictionary key?

2009-09-15 Thread Christian Heimes
File "", line 1, in TypeError: an integer is required >>> class Hash(object): ... def __hash__(self): ... return hash((1, 2)) ... >>> hash(Hash()) 3713081631934410656 Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess woes

2009-09-15 Thread Christian Heimes
Mike Driscoll wrote: > You can use cStringIO to create a "file-like" object in memory: > > http://docs.python.org/library/stringio.html No, you can't with subprocess. The underlying operating system API requires a file descriptor of a real file. Christian -- http:/

Re: detmining name during an assignment

2009-09-18 Thread Christian Heimes
class SceneObject(object): pass class Cube(SceneObject): pass scene = Scene() scene.cube1 = Cube() Have fun! Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Granularity of OSError

2009-09-18 Thread Christian Heimes
ual. The first one suffers from a race condition which may lead to a severe security issue. The file may be gone or replaced by a different file in the time span between the check and the call to unlink(). Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Pickle Encoding Errors

2009-09-20 Thread Christian Heimes
ython 2.5.4 on Debian Sid. > > If anybody understands the error please enlighten me. __del__ is called in an indeterministic order. Most of the Python environment is already gone when your __del__ method is called. The pickle module doesn't have enough bits left to fulfill its job. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Compile kinterbasdb with mingw32 and python 2.6 - DLL load failed

2009-09-21 Thread Christian Heimes
olve this problem? I know from experience that it's sometimes hard to compile Python extensions with MinGW32. Have you tried the official builds from the new download page http://www.firebirdsql.org/index.php?op=devel&sub=python ? Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: very weird python bug..

2009-09-24 Thread Christian Heimes
Sampsa Riikonen wrote: > => If I start the program in directory "paska2", everythings OK, but if the > directory name happens to be "python", the importation of the modules goes > nuts! What's inside the python/ subdirectory? Do you happen to have a file called struct.py inside it? -- http://ma

Re: problems trying to build python 2.6 as a shared library

2009-09-25 Thread Christian Heimes
Y_PATH=/path/to/python_shared_lib: > $LD_LIBRARY_PATH > 2. Add path to dynamic linker configuration file. This typically > is in '/etc/ld.so.conf'. See man page for ld for more information. 3. Set LD_RUN_PATH before you link the shared library or use the -rlink option of the

Re: how to kill a subprocess

2010-09-10 Thread Christian Heimes
Please show us how you are starting and controlling the Python process in your PHP code. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: how to kill a subprocess

2010-09-10 Thread Christian Heimes
his clearly tells me that the issue is in your PHP script. See http://en.wikipedia.org/wiki/Fork-exec Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: how to kill a subprocess

2010-09-10 Thread Christian Heimes
Am 10.09.2010 22:14, schrieb cerr: > No, the Perl becomes the zombie. How are you killing the Python process? Are you sending SIGINT, SIGTERM or SIGKILL? SIGKILL can prevent Python from running its cleanup code. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Install python-mcrypt on Ubuntu

2010-09-14 Thread Christian Heimes
Am 14.09.2010 16:14, schrieb lsolesen: > I am trying to install python-mcrypt (http://labix.org/python-mcrypt) > on Ubuntu, but I cannot get it to work. I have the following python > installed: sudo apt-get install python-dev Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Install python-mcrypt on Ubuntu

2010-09-14 Thread Christian Heimes
headers for mcrypt, too. sudo apt-get install libmcrypt-dev Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Overriding dict constructor

2010-09-20 Thread Christian Heimes
subclass from something like DictMixin or the appropriate ABC. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems reading tif files

2010-09-26 Thread Christian Heimes
age [1] and LCMS2 [2] and works very well. So far we have processed several million TIFF files with more than 100 TB of raw data smoothly. I've permission to release the software as open source but haven't found time to do a proper release. Christian Heimes [1] http://freeimage.sourceforge.n

Re: File holes in Linux

2010-09-29 Thread Christian Heimes
on beyond the file's end. >>> with open("sparse", "w") as fh: ... fh.seek(1000**3) ... fh.write("data") ... $ ls -l --si sparse -rw-r--r-- 1 heimes heimes 1,1G 2010-09-29 22:25 sparse $ ls -s sparse 4 sparse $ du sparse 4 sparse Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: __file__ is sometimes absolute, sometimes relative

2010-10-01 Thread Christian Heimes
using __file__ and os.getcwd() in the module Use the abspath function of the os.path module: HERE = os.path.dirname(os.path.abspath(__file__)) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: force coredump from child created by subprocess

2010-10-05 Thread Christian Heimes
This code snippet enables core dumps for the current Python process. It should also enable it for child processes. import resource resource.setrlimit(resource.RLIMIT_CORE, (-1, -1)) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: how to test for atomicity/mutability/hashability?

2010-10-07 Thread Christian Heimes
Am 07.10.2010 22:02, schrieb Chris Rebert: > On Thu, Oct 7, 2010 at 12:13 PM, kj wrote: > >> It would facilitate the implementation of t() to have a simple test >> for mutability. Is there one? > > Non-default hashability is an approximate heuristic: Except that every user defined class is has

Re: My first Python program

2010-10-13 Thread Christian Heimes
uot; or msg = ("WARNING: " "Pants on fire") Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Classes in a class: how to access variables from one in another

2010-10-18 Thread Christian Heimes
widget, event): > pass > # for each curve of self.listOfCurves: draw it Don't nest classes. Just don't. This might be a valid and good approach in some programming languages but it's not Pythonic. Your code can easily be implemented without nested classes. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.7 or 3.1

2010-10-26 Thread Christian Heimes
ff with 2.7 or even 2.6. For now most Linux distributions have Python 2.6. With some care you can write your app with Python 2 and automatically port it to Python 3 with the 2to3 tool. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.7 or 3.1

2010-10-26 Thread Christian Heimes
jority has no or only experimental support for Python 3.1. The overall situation improves every week. Christian PS: I recommend against MySQL, if you need the full power or a RDBMS. Just try to combine foreign keys with database triggers and you'll see which major features are still broken in

Re: Python 2.7 or 3.1

2010-10-29 Thread Christian Heimes
rebird. You are looking for a simple yet extremely power persistent layer that supports even transactions, MVCC and networking? Check out ZODB + ZEO. You have to store and acces a LOT of data? Hadoop may the solution. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing File Objects into Subprocess.Popen

2010-11-04 Thread Christian Heimes
he MP3 generation will never understand the hard work of a mix tape created recorded from radio broadcasts. ;) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Define macro when invoking setup.py

2010-11-08 Thread Christian Heimes
arse.) You were looking at the wrong manual. Read http://docs.python.org/distutils/setupscript.html#preprocessor-options Extension(..., define_macros=[('NDEBUG', '1'), ('HAVE_STRFTIME', None)], undef_macros=['HAVE_FOO', 

Re: DTD Parsing

2010-11-09 Thread Christian Heimes
ack to the initial question: I highly recommend LXML for any kind of XML processing, validation, XPath etc. It's super fast, extremely powerful and supports all features of libxml2 and libxslt. It also supports DTD, RelaxNG and XML schema. Christian [1] http://pypi.python.org/pypi/configobj [2]

Re: Is Eval *always* Evil?

2010-11-10 Thread Christian Heimes
* either learn more XPath. You can do everything with XPath as well, for example "//houses/name/text()" * use lambdas instead, for example "names" : lambda x: [y.text for y in x.xpath("//houses/name")] Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: DTD Parsing

2010-11-10 Thread Christian Heimes
Am 10.11.2010 04:36, schrieb Asun Friere: > Yes but configuration files are not necessarily meant to be edited by > humans either! Yeah, you are right. I'm sorry but every time I read XML and configuration in one sentence, I see the horror of TomCat or Shibboleth XML configs popping up. -- http:

Re: scrivere file

2017-02-12 Thread Christian Gollwitzer
nimal knowledge of Italian, but be prepared to discuss it in English in the following. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: scrivere file

2017-02-12 Thread Christian Gollwitzer
Am 12.02.17 um 22:07 schrieb BartC: On 12/02/2017 20:38, Christian Gollwitzer wrote: Am 12.02.17 um 21:19 schrieb Paolo: Buonasera, è da un pò che sto cercando come esercizio di scrivere un file al contrario. Mi spiego meglio ho un file con N righe e vorrei scriverne un altro con gli stessi

Re: Manual parameter substitution in sqlite3

2017-03-02 Thread Christian Gollwitzer
retical) right way", which is using another table. Insert your keys into a table, maybe temporary one, and then do select * from mumble where key in (select key from keytable) In theory that should also be faster, but unless you have a thousand keys, there will be no noticeable d

Re: how to embed non-tkinter VLC player into grid of tkinter with python?

2017-03-16 Thread Christian Gollwitzer
ackage vlc and via an external call to os.system. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: The ternaery operator

2017-03-16 Thread Christian Gollwitzer
-0308/ This should be the first place to go if you want to learn about Python language decisions. Asking here will just start the flame fire again. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Who are the "spacists"?

2017-03-18 Thread Christian Gollwitzer
and tabs are merely "allowed" - see PEP8 https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces Both have advantages and disadvantages for indentation. Some ideas how to get both have never gained widespread adoption: http://nickgravgaard.com/elastic-tabstops/

Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-02 Thread Christian Gollwitzer
use an absolute path... ...which is reality for a lot more people than you might think. On a German keyboard, / is Shift-7. Same for \ {} [] which require carpal-tunneling combinations with the right Alt key "Alt Gr". Especially bad are shortcutrs like Ctrl+\ which appear in some software.

Re: Python and the need for speed

2017-04-10 Thread Christian Gollwitzer
r the instructions and assign variables to registers. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and the need for speed

2017-04-13 Thread Christian Gollwitzer
here you can sometimes recover portions of the data, the full drive is completely dead from one point on. Christian [1] https://www.heise.de/newsticker/meldung/SSDs-im-Stresstest-mit-ueberraschenden-Ergebnissen-3580824.html -- https://mail.python.org/mailman/listinfo/python-list

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Christian Gollwitzer
something; break" thingy is just an idiom to fake a do..while loop in Python. C does have it, for example, and it is way better like this than the abuse of assignment and comma operator in the condition. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Looping [was Re: Python and the need for speed]

2017-04-18 Thread Christian Gollwitzer
Am 18.04.17 um 08:21 schrieb Chris Angelico: On Tue, Apr 18, 2017 at 4:06 PM, Christian Gollwitzer wrote: Am 18.04.17 um 02:18 schrieb Ben Bacarisse: Thanks (and to Grant). IO seems to be the canonical example. Where some languages would force one to write c = sys.stdin.read(1) while

Re: How to install Python package from source on Windows

2017-05-16 Thread Christian Gollwitzer
cense, supports many platforms and gives reasonable (unoptimized) code. AFAIK Mathworks does that, they ship tcc on Windows so that you can build .mex files without installing additional software, though they recommend to get a decent compiler for performance reasons Christian -- https://mai

Re: How to install Python package from source on Windows

2017-05-17 Thread Christian Gollwitzer
Am 16.05.17 um 09:53 schrieb Chris Angelico: On Tue, May 16, 2017 at 5:14 PM, Christian Gollwitzer wrote: More likely would be the option to ship a C compiler with Python written in C. For C++ this is way too big, but a pure C compiler can be as small as 1MB. tcc has a liberal license

Re: How to install Python package from source on Windows

2017-05-18 Thread Christian Gollwitzer
Am 18.05.17 um 00:21 schrieb Chris Angelico: On Thu, May 18, 2017 at 8:06 AM, Christian Gollwitzer wrote: tcc even has a "JIT-mode" of operation (libtcc). For Tcl, there exists an extension which compiles C code to memory and executes directly from there. The same thing could b

Re: How to install Python package from source on Windows

2017-05-18 Thread Christian Gollwitzer
nload via svn? Isn't everything hosted on git these days, or at least mirrored somewhere where it can be accessed via git? Christian -- https://mail.python.org/mailman/listinfo/python-list

Python compiled by tcc

2017-05-21 Thread Christian Gollwitzer
Am 18.05.17 um 10:10 schrieb Christian Gollwitzer: The whole discussion reminds me of the "bumblebees can't fly" thing. tcc is a very small compiler (some 100kb) which supports most of C99. For what it's worth, I compiled Python 3.6.1 on Linux/x86 using tcc. It wa

Re: Python compiled by tcc

2017-05-21 Thread Christian Gollwitzer
Am 21.05.17 um 12:38 schrieb bartc: On 21/05/2017 10:32, Christian Gollwitzer wrote: Am 18.05.17 um 10:10 schrieb Christian Gollwitzer: The whole discussion reminds me of the "bumblebees can't fly" thing. tcc is a very small compiler (some 100kb) which supports most of C99.

Re: How to install Python package from source on Windows

2017-05-21 Thread Christian Gollwitzer
wicth a GUI to configure all the compile options. Probably no human would be able to set them to a reasonable value without the help of thsi software. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Strang thing in tkinter, and pdb too?

2017-06-12 Thread Christian Gollwitzer
the user can close them freely, then one should withdraw the main window: root=Tkinter.Tk() root.withdraw() now the main window disappears, the user can't incidentally close it. One can then create additional toplevel windows using t=Tkinter.Toplevel() and place anything there. These can be closed without destroying the application / exiting the main loop. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Teaching the "range" function in Python 3

2017-06-30 Thread Christian Gollwitzer
s is the original question. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: is @ operator popular now?

2017-07-15 Thread Christian Heimes
not the same thing). > However, to answer the question you actually asked, yes, all the time. @ is an actual operator in Python. It was added in Python 3.5 as infix matrix multiplication operator, e.g. m3 = m1 @ m2 The operator is defined in PEP 465, https://www.python.org/dev/pep

Re: @lru_cache on functions with no arguments

2017-08-01 Thread Christian Heimes
elegant and faster approach if you use a non-data descriptor instead of a property or a lru_cache. If you use a non-data descriptor property, you can even get rid of subsequent function calls. I dumped some example code in a gist, https://gist.github.com/tiran/da7d4c43d493c5aa7d7abc4d8a0678a6 Christ

Re: SSL/TLS support in Pyro4

2017-08-04 Thread Christian Heimes
the right combination of BasicConstraint, Key Usage and Extended Key Usage. For my tests I use my own project CA. For example https://github.com/latchset/custodia/tree/master/tests/ca/ contains a script to generate a CA and two EE certs. The server cert is valid for localhost and 127.0.0.1. You can easily extend the configuration to include one or multiple intermediate CAs. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Linux/Windows GUI programming: tk or wx?

2017-08-04 Thread Christian Gollwitzer
re: https://groups.google.com/d/msg/comp.lang.python/AB42dD5xB_U/pYG6-rnMBQAJ Maybe it is useful now. If you replace the "askopenfilename" by "askopenfilenames", it will allow to select multiple files and return them as a list. Christian -- https://mail.python.org/mailman/listinfo/python-list

Location of data files

2011-04-01 Thread Matthias-Christian Ott
packaging (e.g. data files are installed to /usr/share when requested), portability and customisation (i.e. data files can be replaced by the user or alternative locations can be specified)? Regards, Matthias-Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Location of data files

2011-04-01 Thread Matthias-Christian Ott
On Fri, Apr 01, 2011 at 08:37:35PM +0200, Matthias-Christian Ott wrote: > I want to include data files with a python package. With distutils it > seems common to specifiy these files in the data_files argument with a > non-portable location (e.g. data_files=[('share/examp

Re: how to comment out a block of code

2005-01-26 Thread Christian von Essen
A bit of a hack of course, but you can enclose the code that should be commented out with ''' and ''' or """ and """ (not sure about the name of this tripple-quoting) OTOH, some (or even most if not all) Python editors support blockquoting by pushing a button or using shortcuts. SPE and IDLE for ex

Question About Image Processing in Python

2015-05-28 Thread Serge Christian Ibala
ckage available for image processing using Python 3.4.3? Or what is the recommendation of Python for image processing? Do you know any good Python book on the subject or tutorial ? Thank you enormously, Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: BluWater: God is not a man

2005-05-11 Thread America's Best Christian
thout Make-up (once), Mrs. Betty Bowers America's Best Christian www.bettybowers.com -- http://mail.python.org/mailman/listinfo/python-list

Django admin multi layour

2008-07-11 Thread Christian Kortenhorst (Forum)
t for school is shown -> add a school -> -> input for Programme is shown -> -> add a programme -> -> -> etc.. also the option to add new school and program so can have a one to many relationship. Thanks Christian K -- Christian Kortenhorst mod: +353-(0)87-6183349 home: +353-(0)1-4966287 -- http://mail.python.org/mailman/listinfo/python-list

ANN: pyevolve 0.6rc1 released !

2010-04-25 Thread Christian S. Perone
Pyevolve is an evolutionary computation framework written in pure Python. This is the first release candidate before the 0.6 official release. See more information about this release on the official announce at (http://pyevolve.sourceforge.net/wordpress/?p=1164) or in the Documentation site at (h

Upgrade from Python 3.6 to 3.8 and cx-freeze is not available more

2020-07-21 Thread Christian SCHEIBER / KLS GmbH
? Thanx in advance Mit freundlichen Grüßen Christian Scheiber -- https://mail.python.org/mailman/listinfo/python-list

Re: unable to run the basic Embedded Python example

2023-06-26 Thread Christian Gollwitzer via Python-list
the C code. Christian -- https://mail.python.org/mailman/listinfo/python-list

Detect naming typos (AttributeError) in function names

2023-11-06 Thread Christian Buhtz via Python-list
quot;foo" package if "baR()" really exist. Can I fix this somehow? I am aware that this would get detected by a unit test. That is the way I do prefer in most cases. But sometimes not all code segments are covered by tests. I'm more interested in using a linter or somethi

Re: Detect naming typos (AttributeError) in function names

2023-11-06 Thread Christian Buhtz via Python-list
Hello Dieter, thanks for your reply. Am 06.11.2023 19:11 schrieb Dieter Maurer: One option is a test suite (--> Python's "unittest" package) with a sufficiently high coverage (near 100 %). Yes, that is the primary goal. But it is far away in the related project. I got a hint that "pylint"

Request to Review: Tutorial about Python Packaging offering different use case

2023-12-13 Thread Christian Buhtz via Python-list
e problems and possible solutions I created this minimal examples. I also do plan a tutorial repo about Debian Python Packaging using the same approach with minimal examples illustrating different use cases. Thanks in advance, Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Christian Buhtz via Python-list
What is the "command line" on your Windows 11? On Windows 10 it usually is "cmd.exe" (Windows Command Prompt). On Windows 11 it usually is the "Terminal" which is different from cmd.exe. -- https://mail.python.org/mailman/listinfo/python-list

Re: shutil.rmtree() fails when used in Fedora (rpm) "mock" environment

2024-10-25 Thread Christian Buhtz via Python-list
Thank you very much for all your responses. Am 24.10.2024 17:17 schrieb Left Right: To investigate this, I'd edit the file with the assertion and make it print the actual value found in os.lstat and func. My guess is that they are both somehow "lstat", but with different memory addresses. My

Re: shutil.rmtree() fails when used in Fedora (rpm) "mock" environment

2024-10-25 Thread Christian Buhtz via Python-list
Hello Barry, thank you for your reply and clarifying the Fedora aspects. Am 25.10.2024 00:44 schrieb Barry: What do you mean by the real file sustem? You cannot write to the /usr file system. Is that what your tests do? If so that needs changing. Asking the right questions brings up to impor

Re: shutil.rmtree() fails when used in Fedora (rpm) "mock" environment

2024-10-25 Thread Christian Buhtz via Python-list
Am 25.10.2024 09:06 schrieb Christian Buhtz via Python-list: On a "regular" system all tests are running. To clarify: "regular" does not exclude PyFakeFS. It means on my own local development machine and on the TravsCI machines (Ubuntu 22 with Python 3.9 up to 3.13) a

shutil.rmtree() fails when used in Fedora (rpm) "mock" environment

2024-10-24 Thread Christian Buhtz via Python-list
iner also has no clue how to solve it or why it happens. Can you please have a look (especially at the line "assert func is os.lstat"). Maybe you have an idea what is the intention behind this error raised by an "assert" statement inside "shutil.rmtree()". T

Re: shutil.rmtree() fails when used in Fedora (rpm) "mock" environment

2024-10-26 Thread Christian Buhtz via Python-list
As you can see in the linked issue it seems it was an incompatibility between the version of Python and PyFakeFS. In the end it was a Fedora packaging bug because that pyfakefs version was not compatible with Python 3.13. Thanks in advance for helping out. -- https://mail.python.org/mailman/list

Re: Strategies for avoiding having to use --break-system-packages with pip

2025-01-14 Thread Christian Buhtz via Python-list
example. Pipx is not intended to install Python packages that are not applications. Regrads, Christian -- https://mail.python.org/mailman/listinfo/python-list

<    15   16   17   18   19   20