[issue47154] -arch detection in _osx_support generates false positives

2022-03-29 Thread Isuru Fernando
Change by Isuru Fernando : -- keywords: +patch pull_requests: +30256 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32178 ___ Python tracker <https://bugs.python.org/issu

[issue47154] -arch detection in _osx_support generates false positives

2022-03-29 Thread Isuru Fernando
New submission from Isuru Fernando : If `cflags` contains something like, `-I/Users/isuru/handy-archives-env/include`, then the code assumes that there is a `-arch` flag in it and errors with ValueError: Don't know machine value for archs=() -- components: Build messages: 416278

[issue46412] PyQT6 projects crashes with python 3.10

2022-01-17 Thread Fernando Pérez Gómez
Fernando Pérez Gómez added the comment: I have to perform several tests to provide a detailed report, check other third party libraries, mysql connector for example, and send it to you. There are several things that don't work with Qt libs (the one that works best is PyQt6). When I finish

[issue46412] PyQT6 projects crashes with python 3.10

2022-01-17 Thread Fernando Pérez Gómez
New submission from Fernando Pérez Gómez : can't translate ui. files , flags of alignment , curve types of animation doesn´t wors ...etc -- messages: 410791 nosy: fernandoprezgmez priority: normal severity: normal status: open title: PyQT6 projects crashes with python 3.10 type: crash

[issue44556] ctypes unittest crashes with libffi 3.4.2

2021-11-19 Thread Isuru Fernando
Isuru Fernando added the comment: Duplicate of https://bugs.python.org/issue45350 -- nosy: +isuruf ___ Python tracker <https://bugs.python.org/issue44

[issue44182] python-config.sh vs python-config.py inconsistency

2021-10-04 Thread Isuru Fernando
Change by Isuru Fernando : -- keywords: +patch pull_requests: +27071 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28725 ___ Python tracker <https://bugs.python.org/issu

[issue44182] python-config.sh vs python-config.py inconsistency

2021-10-03 Thread Isuru Fernando
Isuru Fernando added the comment: Agree that this should be fixed. If you want, I can send a PR. -- nosy: +isuruf ___ Python tracker <https://bugs.python.org/issue44

[issue40503] PEP 615: Add zoneinfo module

2021-09-21 Thread Isuru Fernando
Isuru Fernando added the comment: Do you have a suggestion for how to make it configurable at compile time? In POSIX platforms, we can set `--with-tzpath` to make it configurable at compile time. -- ___ Python tracker <https://bugs.python.

[issue45258] sysroot_paths in setup.py does not consider -isysroot for macOS

2021-09-21 Thread Isuru Fernando
Change by Isuru Fernando : -- keywords: +patch pull_requests: +26896 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28501 ___ Python tracker <https://bugs.python.org/issu

[issue45258] sysroot_paths in setup.py does not consider -isysroot for macOS

2021-09-21 Thread Isuru Fernando
New submission from Isuru Fernando : It only looks at --sysroot which is Linux specific -- components: Build messages: 402338 nosy: FFY00, isuruf priority: normal severity: normal status: open title: sysroot_paths in setup.py does not consider -isysroot for macOS versions: Python 3.11

[issue40503] PEP 615: Add zoneinfo module

2021-09-21 Thread Isuru Fernando
Isuru Fernando added the comment: Thanks @steve.dower for the info. I've created https://github.com/python/cpython/pull/28495. Let me know if it needs to have a separate bpo issue. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40503] PEP 615: Add zoneinfo module

2021-09-21 Thread Isuru Fernando
Change by Isuru Fernando : -- pull_requests: +26890 pull_request: https://github.com/python/cpython/pull/28495 ___ Python tracker <https://bugs.python.org/issue40

[issue40503] PEP 615: Add zoneinfo module

2021-09-16 Thread Isuru Fernando
Isuru Fernando added the comment: > If anyone building Python for Windows shows up needing support for this, we > can re-visit the issue — I don't believe it's technically infeasible, just > that the usage patterns of Python on Windows mean that it's not worth doing. At conda-forge

[issue22699] Module source files not found when cross-compiling

2021-09-16 Thread Isuru Fernando
Change by Isuru Fernando : -- keywords: +patch nosy: +isuruf nosy_count: 8.0 -> 9.0 pull_requests: +26810 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28397 ___ Python tracker <https://bugs.python.org/i

[issue41100] Support macOS 11 and Apple Silicon Macs

2021-05-31 Thread Isuru Fernando
Change by Isuru Fernando : -- nosy: +isuruf nosy_count: 23.0 -> 24.0 pull_requests: +25069 pull_request: https://github.com/python/cpython/pull/26474 ___ Python tracker <https://bugs.python.org/issu

[issue43052] _dyld_shared_cache_contains_path needs SYSTEM_VERSION_COMPAT=0

2021-01-31 Thread Isuru Fernando
Isuru Fernando added the comment: You are right. I think I may have accidentally used the wrong SDK. Explictly setting `SYSTEM_VERSION_COMPAT=1` is unsupported then? -- ___ Python tracker <https://bugs.python.org/issue43

[issue43052] _dyld_shared_cache_contains_path needs SYSTEM_VERSION_COMPAT=0

2021-01-27 Thread Isuru Fernando
New submission from Isuru Fernando : In macOS Big Sur, if the executable was compiled with MACOSX_DEPLOYMENT_TARGET=10.15 or below, then SYSTEM_VERSION_COMPAT=1 is the default which means that Big Sur reports itself as 10.16 which in turn means that __builtin_available(macOS 11.0

[issue42476] Allow cross compiling python for macos-arm64 from macos-x86_64

2020-11-26 Thread Isuru Fernando
Change by Isuru Fernando : -- keywords: +patch pull_requests: +22407 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23523 ___ Python tracker <https://bugs.python.org/issu

[issue42476] Allow cross compiling python for macos-arm64 from macos-x86_64

2020-11-26 Thread Isuru Fernando
New submission from Isuru Fernando : Only a few changes are needed and I will send a Pull request. This was used for providing macos-arm64 builds for conda where we are using cross compiling exclusively for all macos-arm64 builds -- components: Build messages: 381908 nosy: isuruf

[issue40154] embedded null byte when connecting to sqlite database using a bytes object

2020-04-17 Thread Fernando
Fernando added the comment: Hello SilentGhost, Okay, now I understand the difference and had my code working! Thank you very much for your answer and to all of you who help in making Python better. (Wish I had more knowledge of it to help) Have a nice day

[issue40154] embedded null byte when connecting to sqlite database using a bytes object

2020-04-08 Thread Fernando
Change by Fernando : -- components: +Extension Modules -IO ___ Python tracker <https://bugs.python.org/issue40154> ___ ___ Python-bugs-list mailing list Unsub

[issue40154] embedded null byte when connecting to sqlite database using a bytes object

2020-04-08 Thread Fernando
Fernando added the comment: bump? -- ___ Python tracker <https://bugs.python.org/issue40154> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40154] embedded null byte when connecting to sqlite database using a bytes object

2020-04-02 Thread Fernando
New submission from Fernando : Hello. I think that I found a bug in how sqlite3 module handle bytes. The connect function of sqlite3 accepts strings, FilePath objects and bytes. However, it's impossible for me to connect to bytes objects that are read from BufferedReaders. I always get

[issue33351] Support compiling with clang-cl on Windows

2020-02-05 Thread Isuru Fernando
Change by Isuru Fernando : -- pull_requests: +17747 pull_request: https://github.com/python/cpython/pull/18371 ___ Python tracker <https://bugs.python.org/issue33

[issue37916] distutils: allow overriding of the RANLIB command on macOS (darwin)

2019-11-03 Thread Isuru Fernando
Isuru Fernando added the comment: This is an issue even without cross-compilations as there is an environment variable for the archiver and therefore the archiver and ranlib can be from 2 different toolchains and leads to error. Ran into this issue in python 3.8 on macOS with an lto build

[issue32423] The Windows SDK version 10.0.15063.0 was not found

2019-08-13 Thread Isuru Fernando
Isuru Fernando added the comment: Fixed in https://github.com/python/cpython/pull/12445 -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue32423] The Windows SDK version 10.0.15063.0 was not found

2017-12-23 Thread Isuru Fernando
New submission from Isuru Fernando <isu...@gmail.com>: When compiling python 3.6.4 on appveyor using MSVC 2015 following error occurs. (C:\bld\python_1514037886491\_b_env) C:\bld\python_1514037886491\work\Python-3.6.4\PCbuild>"C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSB

Re: Python boilerplate

2016-03-20 Thread Fernando Felix do Nascimento Junior
@all I released version 1.0.0 with a tiny glossary and explanation of each file in the boilerplate. @Chris I made the boilerplate with intent that everyone can understand, download and use quickly. So, I didn't put extra dependence like cookiecutter (that depends jinja, that depends

Python boilerplate

2016-03-19 Thread Fernando Felix do Nascimento Junior
## Structure Structure of the project in tree format. ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── MANIFEST.in ├── module_name.py ├── README.md ├── requirements │ ├── dev.txt │ └── prod.txt ├── requirements.txt ├── setup.cfg ├── setup.py ├── tests.py └── tox.ini Fernando Felix -- https

Re: "x == None" vs "x is None"

2016-01-19 Thread fernando junior
> I have seen at several places "x == None" and "x is None" within > if-statements. > What is the difference? > Which term should I prefer and why? > > > -- > Ullrich Horlacher Server und Virtualisierung > Rechenzentrum IZUS/TIK E-Mail: horlac...@tik.uni-stuttgart.de >

Observer pattern implementation in Python based on jQuery

2016-01-14 Thread fernando junior
Hi, I made an observer/pubsub pattern implementation in Python based on jQuery. It's available in https://github.com/fernandojunior/python-pattern-observer. Take a look! :) Fernando Felix https://br.linkedin.com/in/fernandofnjr -- https://mail.python.org/mailman/listinfo/python-list

First Brazilian programming MOOC with 10.000 enrolled

2014-02-25 Thread Fernando Masanori Ashikaga
Python for Zombies [1] is the first MOOC in portuguese to teach programming. Today we have 10.000 enrolled in 1013 cities from Brazil. We started five months ago. The website is a Django application. [1] http://pycursos.com/python-para-zumbis/ --

Python for Myo Control Armband

2014-02-03 Thread Fernando Masanori Ashikaga
Does anyone know if there is already a Python library for Myo [1] Gesture Control Armband? There are other gesture controls with Python libraries? Thanks in advance [1] https://www.thalmic.com/en/myo/ -- https://mail.python.org/mailman/listinfo/python-list

Check for the type of arguments

2013-08-17 Thread Fernando Saldanha
I am new to Python, with some experience in Java, C++ and R. Writing in other languages I usually check the type and values of function arguments. In the Python code examples I have seen this is rarely done. Questions: 1) Is this because it would be unpythonic or just because the examples are

Re: Check for the type of arguments

2013-08-17 Thread Fernando Saldanha
Thanks for the insightful answers. PTVS is Python Tools for Visual Studio. -- http://mail.python.org/mailman/listinfo/python-list

Python getters and setters

2013-08-17 Thread Fernando Saldanha
I am new to Python. I understand that it is unpythonic to write getters and setters, and that property() can be used if necessary. This deals with the case of attributes, but there are other kinds of information available within a class. Suppose my class contains an attribute called data that

Re: Python getters and setters

2013-08-17 Thread Fernando Saldanha
The debate got more interesting than I expected. Without taking sides, I would like to add that perhaps my length example was misleading: length is easy to calculate. The information could be hard to extract from the data, either because complex calculations are involved, or because it is not

how to use property?

2012-09-17 Thread Fernando Jiménez
Hi guys! I'm noob in python and I would know how to correctly use the property. I have read some things about it but I do not quite understand. I found this: class C(object): def __init__(self): self._x = None @property def x(self): I'm the 'x' property.

A sad day for the scientific Python community. John Hunter, creator of matplotlib: 1968-2012.

2012-08-29 Thread Fernando Perez
of knowing you. Fernando. -- http://mail.python.org/mailman/listinfo/python-list

[ANN] IPython 0.13 is officially out!

2012-06-30 Thread Fernando Perez
contributed! Fernando, on behalf of the IPython development team. http://ipython.org -- http://mail.python.org/mailman/listinfo/python-list

[issue10109] itertools.product with infinite iterator cause MemoryError.

2012-01-18 Thread Sumudu Fernando
Sumudu Fernando sumu...@gmail.com added the comment: I don't agree with the response to this. It is true that as implemented (at least in 2.7, I don't have 3.x handy to check) itertools.product requires finite iterables. However this seems to be simply a consequence of the implementation

[issue10109] itertools.product with infinite iterator cause MemoryError.

2012-01-18 Thread Sumudu Fernando
Sumudu Fernando sumu...@gmail.com added the comment: tuple(itertools.cycle(enumerate(it)) for it in itertools.count()) ... TypeError: 'int' object is not iterable That is not what happens in the function, though! That would correspond to doing product(*itertools.count(2010)), but if you

Re: Python education survey

2011-12-20 Thread Fernando Perez
On Mon, 19 Dec 2011 19:51:00 -0800, Raymond Hettinger wrote: Do you use IDLE when teaching Python? If not, what is the tool of choice? I'm obviously biased (I started IPython years ago), but I've done a lot of teaching and I still do like the combination of IPython plus an editor. Sometimes

[ANN] IPython 0.12 is out!

2011-12-19 Thread Fernando Perez
files have been uploaded to github and PyPI, we'll let them be. As usual, if you find any other problem, please file a ticket --or even better, a pull request fixing it-- on our github issues site (https:// github.com/ipython/ipython/issues/). Many thanks to all who contributed! Fernando

Re: IPython 0.12 is out!

2011-12-19 Thread Fernando Perez
On Mon, 19 Dec 2011 20:00:03 -0800, alex23 wrote: You read the installation instructions and did a 'python setup.py install' as it states, yes? Installed that way for Python 2.7.2 under Win64 with no issues whatsoever. Glad to hear that. Obviously since I announced it here I'll try to

[ANN] IPython 0.11 is officially out

2011-07-31 Thread Fernando Perez
://stronginference.com/weblog/2011/7/15/innovations-in-ipython.html As usual, if you find any problem, please file a ticket --or even better, a pull request fixing it-- on our github issues site (https://github.com/ipython/ipython/issues/). Many thanks to all who contributed! Fernando, on behalf

[issue10144] Buffering bug after calling curses function

2010-10-19 Thread Fernando Perez
Fernando Perez fdo.pe...@gmail.com added the comment: No problem for us (IPython) if you mark it as won't fix. I've just applied the environment workaround you guys suggested: http://github.com/ipython/ipython/commit/147b245d2ead0e15d2c17b7bb760a03126660fb7 Thanks a lot for that tip

[issue1170] shlex have problems with parsing unicode

2010-07-27 Thread Fernando Perez
Fernando Perez fdo.pe...@gmail.com added the comment: Yes, sorry that I failed to mention the example I gave applies only to 2.x, not to 3.x. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1170

[issue1170] shlex have problems with parsing unicode

2010-07-27 Thread Fernando Perez
Fernando Perez fdo.pe...@gmail.com added the comment: On Tue, Jul 27, 2010 at 11:52, Alexander Belopolsky rep...@bugs.python.org wrote: Why do you expect shlex to work with unicode in 2.x? =A0The documentation clearly says that the argument should be a string. Supporting unicode

[issue1170] shlex have problems with parsing unicode

2010-07-25 Thread Fernando Perez
Fernando Perez fdo.pe...@gmail.com added the comment: Here is an illustration of the problem with a simple test case (the value of the posix flag doesn't make any difference): Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type help, copyright, credits or license

[issue7897] Support parametrized tests in unittest

2010-04-09 Thread Fernando Perez
Fernando Perez fdo.pe...@gmail.com added the comment: Hey Yarick, On Thu, Apr 8, 2010 at 18:53, Yaroslav Halchenko rep...@bugs.python.org w= rote: In PyMVPA we have our little decorator as an alternative to Fernando's ge= nerators, =A0and which is closer, I think, to what Michael was wishing

[issue7897] Support parametrized tests in unittest

2010-04-09 Thread Fernando Perez
Fernando Perez fdo.pe...@gmail.com added the comment: Yarick: Yes, I do actually see the value of the summary view. When I have a parametric test that fails, I tend to just run nose with -x so it stops at the first error and with the --pdb options to study it, so I simply ignore all

saving a TIFF

2010-02-15 Thread fernando sedano
I'm trying to save an image created from two arrays (I'm using numpy and PIL): n=(b4a-b3a)/(b4a+b3a); ndvi = Image.fromarray(n) ndvi.save(F:\Fire_scar_mapping\ILS3\ndvi_test,TIFF) ...but I get the following error message: IOError: [Errno 22] invalid mode ('wb') or filename:

[issue7897] Support parametrized tests in unittest

2010-02-11 Thread Fernando Perez
Fernando Perez fdo.pe...@gmail.com added the comment: I should probably have clarified better our reasons for using this type of code. The first is the one Michael pointed out, where such parametric tests all execute; it's very common in scientific computing to have algorithms that only fail

[issue7897] Support parametrized tests in unittest

2010-02-09 Thread Fernando Perez
New submission from Fernando Perez fdo.pe...@gmail.com: IPython has unittest-based parametric testing (something nose has but which produces effectively undebuggable tests, while this approach gives perfectly debuggable ones). The code lives here for 2.x and 3.x: http://bazaar.launchpad.net

Trouble with subprocess.Popen()

2009-04-04 Thread Fernando
Hi, I'm having a very strange issue with subprocess.Popen. I'm using it to call several times an external exe and keep the output in a list. Every time you call this external exe, it will return a different string. However, if I call it several times using Popen, it will always return the SAME

logging and daemons

2009-02-16 Thread Fernando M. Maresca
that may go to stderr/stdout to show up in the logfiles. Any ideas? Thanks a lot, -- Fernando signature.asc Description: Digital signature -- http://mail.python.org/mailman/listinfo/python-list

Re: logging and daemons

2009-02-16 Thread Fernando M. Maresca
into this because I really need rotating, because when debugging is on, large amounts of data are logged, and because I like the logging module approach in every aspect. Also, may it be possible to derive the class and add a file-like write method? Anyone using logging in this manner? Cheers, -- Fernando

Re: logging and daemons

2009-02-16 Thread Fernando M. Maresca
On Mon, Feb 16, 2009 at 10:11:51AM -0800, Scott David Daniels wrote: Fernando M. Maresca wrote: On Mon, Feb 16, 2009 at 05:07:45AM -0800, Garrett Cooper wrote: You can actually set sys.std[err|out] to your ?file? descriptor of choice in python Yes, but I'm trying to use *TimedRotating

[issue1168055] Add current dir when running try_run test program

2009-01-12 Thread Fernando Gomes
Fernando Gomes fgs...@gmail.com added the comment: Dear Community, I'd fronted problems to install Statistics module on my Ubuntu. There are errors that are hard to solve without an expert help, such as the one received from Michiel (Thank you again!!!). Errors are listed below

Re: RELEASED Python 3.0 final

2008-12-05 Thread Fernando H. Sanches
On Dec 4, 5:45 pm, Andreas Waldenburger [EMAIL PROTECTED] wrote: On Thu, 4 Dec 2008 11:52:38 -0600 [EMAIL PROTECTED] wrote:     As you have probably guessed: nothing changed here.     Also see:http://www.python.org/dev/peps/pep-0666/     What? Do you mean it's possible to mix tabs

Re: Pyhon (with wxPython) on Windows' cygwin: can it be done fully ?

2008-12-01 Thread Fernando H. Sanches
At first I also disliked print's new syntax, but later I realised it could be useful. However, I agree that the parentheses are annoying. Not because of the parens theirselves, but because of the Shift key. Why programmers stilll can't have special keyboards with parens keys that doesn't need

[issue4287] Broken URL in documentation style guide

2008-11-08 Thread Fernando Correia
New submission from Fernando Correia [EMAIL PROTECTED]: The documentation Style Guide [http://docs.python.org/dev/documenting/style.html] has a broken link to http://developer.apple.com/documentation/UserExperience/Conceptual/APStyleGuide/AppleStyleGuide2006.pdf. This link should be updated

Re: from package import * without overwriting similarly named functions?

2008-10-25 Thread Fernando H. Sanches
Also, remember that since the latter functions will always overwrite the first, you can just reverse the order of the imports: from package2 import * from package1 import * This should preserve the functions of package1 over the other ones. -- http://mail.python.org/mailman/listinfo/python-list

[issue3158] Doctest fails to find doctests in extension modules

2008-06-21 Thread Fernando Pérez
Fernando Pérez [EMAIL PROTECTED] added the comment: I think there are two issues that need to be separated: 1. The doctest bug. I'm happy with any resolution for it, and I'm not claiming that my patch is the best approach. isroutine() indeed works in my case, and if that approach works well

[issue3158] Doctest fails to find doctests in extension modules

2008-06-20 Thread Fernando Pérez
New submission from Fernando Pérez [EMAIL PROTECTED]: Doctest fails to find doctests defined in extension modules. With tools like cython (http://cython.org) it's trivially easy to add docstrings to extension code, a task that is much less pleasant with hand-written extensions. The following

Re: Avoiding redirects with urllib

2008-06-15 Thread Fernando Rodriguez
Hello [EMAIL PROTECTED], import urllib url_opener = urllib.URLopener() # create URLopener #You could also work with urllib.FancyURLopener try: data = url_opener.open(http://www.somedomain.com/index.html;) # open index.html except IOError, error_code: if error_code[0] == http error: if

Re: Avoiding redirects with urllib

2008-06-15 Thread Fernando Rodriguez
Hello Fernando, I hope that's of some help! I think you may want to delve deeper into FancyURLopener... The problem is that I'm using a subclass of FancyOpener and it doesn't raise those exceptions. Ok, forget it, I should have read the fine manual. O:-) -- http://mail.python.org/mailman

Avoiding redirects with urllib

2008-06-14 Thread Fernando Rodriguez
Hi, I'musing urllib to download pages from a site. How can I detect if a given url is being redirected somewhere else? I want to avoid this, is it possible? Thanks in advance! -- http://mail.python.org/mailman/listinfo/python-list

[issue2657] Curses sometimes fails to initialize terminal

2008-06-10 Thread Fernando Pérez
Fernando Pérez [EMAIL PROTECTED] added the comment: As reported by Ondrej Certik on the IPython mailing list: Here is how to reliably (100%) reproduce it in ipython 0.8.2 (the bug indeed goes away in 0.8.4): http://code.google.com/p/sympy/issues/detail?id=822 together with a screenshot how

Error when calling superclass __init__ method

2008-05-18 Thread Maese Fernando
Hi, I'm getting an odd error while trying to call the __init__ method of a super class: BaseField.__init__(self) TypeError: unbound method __init__() must be called with BaseField instance as first argument (got nothing instead) This is the code: class BaseField(object): def

[issue2657] curses

2008-04-18 Thread Fernando Pérez
New submission from Fernando Pérez [EMAIL PROTECTED]: Curses sometimes fails to correctly initialize the terminal. Unfortunately I don't know how to reproduce the problem, it was reported multiple times by ipython users, but I have no idea what causes it. I finally found a workaround by making

Re: Strange behavior of __get__ in a descriptor in IPython

2007-11-07 Thread Fernando Perez
Jakub Hegenbart wrote: Hi, I'm studying the descriptor protocol and its usage from the following document: http://users.rcn.com/python/download/Descriptor.htm There is some sample code: http://users.rcn.com/python/download/Descriptor.htm#descriptor-example that behaves in a

Confused about closures and scoping rules

2007-11-06 Thread Fernando Perez
Hi all, consider the following small example: Small test to try to understand a strange subtlety with closures def outer(nmax): aa = [] for n in range(nmax): def a(y): return (y,n) print 'Closure and cell id:',id(a.func_closure),\

Re: Confused about closures and scoping rules

2007-11-06 Thread Fernando Perez
Diez B. Roggisch wrote: It's a FAQ. The reason is that the created closures don't capture the _value_, but the _name_. Plus of course the locals()-dictionary outside the function a to perform the lookup of that name. Which has the value bound to it in the last iteration. Common cure for

Re: Yet another comparison of Python Web Frameworks

2007-10-12 Thread Fernando Perez
Massimo Di Pierro wrote: P.S. Michele Simionato. I have heard your name before? Is it possible we have met in Pisa in 1990-1996? I am also a Quantum Field Theorist and there is not many of us. More than you think, it seems. Some of us were even using python to process Lattice QCD

Re: Yet another comparison of Python Web Frameworks

2007-10-12 Thread Fernando Perez
Massimo Di Pierro wrote: happy to hear that. you may want take a loot at http://mdp.cti.depaul.edu/vqcd It is mostly python stuff and will post the code soon. Ah, memories :) I'm not working on QCD anymore, but I did write a bunch of code a while back to script Mayavi (the old one, not the

Re: Any syntactic cleanup likely for Py3? And what about doc standards?

2007-09-10 Thread Fernando Perez
Ferenczi Viktor wrote: Properties are very useful, since ordinary attribute access can be transparently replaced with properties if the developer needs to add code when it's set or needs to calculate it's value whenever it is read. As an additional benefit this could allow developers to

Re: Registering a python function in C

2007-09-03 Thread fernando
Is Maya a different python build than what is contained at python.org? If so, I suggest you get your C program to work with the latest python build from python.org. Then see if you can get it to work with the Maya version. Ok, did that. If I write a normal C++ program and use the python

Re: Registering a python function in C

2007-08-31 Thread fernando
Thanks for the responses. To be more specific, this code is part of a Maya plugin. The funcion MFnPlugin::registerUI takes a pointer to a PyObject which is the function that will set up the UI for that plugin. The code Matimus posted seems to me exactly like what I need to do, except that maya

Registering a python function in C

2007-08-30 Thread fernando
Could someone post an example on how to register a python function as a callback in a C function? It expects a pointer to PyObject... how do I expose that? Basically, the signature of the function is foo(PyObject* obj), where obj is the callback function... It's not exactly extending or embedding,

Bug in execfile?

2007-08-02 Thread Fernando Perez
Hi all, I'm finding the following behavior truly puzzling, but before I post a bug report on the site, I'd rather be corrected if I'm just missing somethin obvious. Consider the following trivial script: # Simple script that imports something from the stdlib from math import sin, pi wav =

Re: Bug in execfile?

2007-08-02 Thread Fernando Perez
Ian Clark wrote: Fernando Perez wrote: Hi all, (snip) I'm really, really puzzled by this. From reading the execfile() docs, I had the hunch to change the call to: execfile(fname,{}) and now the problem disappears, so I can keep on working. But I'm still very bothered

Re: Plotting Images

2007-07-31 Thread Fernando Perez
Pei-Yu CHAO wrote: Hi ALL: I have only been switched from matlab to python few months ago. I having trouble of plotting images from a matrix size of 8x1 (unfortunately that is the size of my data.) for example, x = rand(8,1) inshow(x) Read the docstrings, they explain

[ANN] IPython 0.8.0 is out

2007-04-10 Thread Fernando Perez
Hi all, The IPython team is happy to release version 0.8.0, with a lot of new enhancements, as well as many bug fixes. We hope you all enjoy it, and please report any problems as usual. WHAT is IPython? 1. An interactive shell superior to Python's default. IPython has many

Re: ipython env

2007-04-05 Thread Fernando Perez
Larry Bates wrote: Greg Donald wrote: Anyone know what's up with environment variables when using ipython? [...] In Cpython you get this with: import os os.environ['EDITOR'] Yup, same in ipython :) Just to clarify, env is just a convenience function in ipython that simply does this: In

Re: Rational numbers

2007-02-28 Thread Fernando Perez
[EMAIL PROTECTED] wrote: On Feb 25, 3:09 pm, Fernando Perez [EMAIL PROTECTED] wrote: Alex, have you had a look at SAGE? http://modular.math.washington.edu/sage/ it uses GMP extensively, so they've had to patch it to work around these issues. You can look at the SAGE release (they package

Re: Rational numbers

2007-02-25 Thread Fernando Perez
[EMAIL PROTECTED] wrote: gmpy itself is or should be pretty trivial to build on any platform (and I'll always happily accept any fixes that make it better on any specific platform, since it's easy to make them conditional so they'll apply to that platform only), but the underlying GMP is

Re: pylab, integral of sinc function

2007-02-22 Thread Fernando Perez
Schüle Daniel wrote: Hello, In [19]: def simple_integral(func,a,b,dx = 0.001): : return sum(map(lambda x:dx*x, func(arange(a,b,dx : In [20]: simple_integral(sin, 0, 2*pi) Out[20]: -7.5484213527594133e-08 ok, can be thought as zero In [21]:

Re: Maybe a little bug of ipython 0.7.3 ?

2007-01-08 Thread Fernando Perez
[EMAIL PROTECTED] wrote: I'm new to ipython, and i found it a very cool product. Glad you like it, though in the future I recommend you post on the ipython list. I very rarely scan c.l.py these days, unfortunately. $ ipython Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-08 Thread Fernando Perez
sturlamolden wrote: Following up on my previous post, there is a simple Python MPI wrapper that can be used to exploit multiple processors for scientific computing. It only works for Numeric, but an adaptaion to NumPy should be easy (there is only one small C file in the source):

Re: switching to numpy and failing, a user story

2006-10-07 Thread Fernando Perez
[EMAIL PROTECTED] wrote: After using numeric for almost ten years, I decided to attempt to switch a large codebase (python and C++) to using numpy. Here's are some comments about how that went. - The code to automatically switch python stuff over just kind of works. But it was a 90%

Re: Interact with system command prompt

2006-09-20 Thread Fernando Perez
billie wrote: Uhm... It seems that IPython got some problems: http://ipython.scipy.org/doc/manual/node12.html In details: Note that this does not make IPython a full-fledged system shell. In particular, it has no job control, so if you type Ctrl-Z (under Unix), you'll suspend pysh itself,

Re: Scientific computing and data visualization.

2006-09-06 Thread Fernando Perez
Matteo wrote: One hurdle to overcome is transferring array data from Numeric/Numpy into VTK. I have a sort of ad-hoc method to do that (mainly for volume data). If anyone knows of any elegant solution, or a module to ease the pain, I'd like to hear about it.

Re: unit testing failure makes no sense

2006-09-05 Thread Fernando Perez
[EMAIL PROTECTED] wrote: I have some unit testing code in one of my modules that appears to run without an error, but the unit test fails anyhow. Have a look at the output below -- the TestResult seems to have no errors and no failures, yet I get a system exit. unittest.main() ALWAYS raises

Re: Matplotlib eps export

2006-07-04 Thread Fernando Perez
Martin Manns wrote: Hi, When I use matplotlib for a scatter plot with both dots and connecting lines, the exported eps file is huge, if the distances between many points are small. I think of this as a bug, since no preview tiff is included in the generated eps and a variety of text

IPython 0.7.2 is out.

2006-06-07 Thread Fernando Perez
Hi all, The IPython team is happy to release version 0.7.2, with a lot of new enhancements, as well as many bug fixes. We hope you all enjoy it, and please report any problems as usual. WHAT is IPython? 1. An interactive shell superior to Python's default. IPython has many

IPython 0.7.2 is out.

2006-06-06 Thread Fernando Perez
Hi all, The IPython team is happy to release version 0.7.2, with a lot of new enhancements, as well as many bug fixes. We hope you all enjoy it, and please report any problems as usual. WHAT is IPython? 1. An interactive shell superior to Python's default. IPython has many

Is the standard output thread-safe?

2006-03-09 Thread Fernando Rodríguez
Hi, Is the standard output thread-safe? Can I use print from several threads without having to use a mutex? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Blocking a thread for x seconds

2006-03-09 Thread Fernando Rodríguez
Hi, I have a class that descends from threading.Thread. One method should block the thread during x seconds and then call another method. How can I do this? -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >