[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.

2022-02-16 Thread Isaac Johnson
Isaac Johnson added the comment: Well that is how it works with open. It is implemented in the io module and added to builtins. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.

2022-02-16 Thread Isaac Johnson
Isaac Johnson added the comment: Well it wouldn't need to be imported. I was working on including it inside builtins like open(). It wouldn't be very convenient if it needed to be imported. -- ___ Python tracker <https://bugs.python.

[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.

2022-02-15 Thread Isaac Johnson
Change by Isaac Johnson : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue46766> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.

2022-02-15 Thread Isaac Johnson
Isaac Johnson added the comment: I'm currently working on implementing this. It will probably be a few weeks. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.

2022-02-15 Thread Isaac Johnson
New submission from Isaac Johnson : I think it would be great for something like this to be with the IO module. It will improve code readability. -- components: Library (Lib) messages: 413315 nosy: isaacsjohnson22 priority: normal severity: normal status: open title: Add a class

[issue37578] Change Glob: Allow Recursion for Hidden Files

2021-12-16 Thread Isaac Muse
Isaac Muse added the comment: If this was to be done, you'd want to make sure character sequences also match hidden files: [.]. Just * and ? would be incomplete. If allowing ** to match a leading dot, it would not match . or .. -- nosy: +Isaac Muse

[issue13475] Add '--mainpath'/'--nomainpath' command line options to override sys.path[0] initialisation

2021-11-26 Thread Neil Isaac
Change by Neil Isaac : -- nosy: +nisaac ___ Python tracker <https://bugs.python.org/issue13475> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45552] Close asyncore/asynchat/smtpd issues and list them here

2021-10-21 Thread Isaac Boukris
Change by Isaac Boukris : -- keywords: +patch nosy: +Isaac Boukris nosy_count: 1.0 -> 2.0 pull_requests: +27397 stage: -> patch review pull_request: https://github.com/python/cpython/pull/11770 ___ Python tracker <https://bugs.p

[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-21 Thread Isaac Boates
New submission from Isaac Boates : I was just using the sqlite3 package and was very confused when trying to open an sqlite database from a relative path, because the only error provided was: File "/path/to/filepy", line 50, in __init__ self.connection = sqlite3.connect(pat

[issue45038] Bugs

2021-08-28 Thread Jonathan Isaac
New submission from Jonathan Isaac : Jonathan Isaac Sent with Aqua Mail for Android https://www.mobisystems.com/aqua-mail -- messages: 400479 nosy: bonesisaac1982 priority: normal severity: normal status: open title: Bugs ___ Python tracker <ht

[issue45037] theme-change.py for tkinter lib

2021-08-28 Thread Jonathan Isaac
Jonathan Isaac added the comment: Bugs -- components: +Parser nosy: +lys.nikolaou, pablogsal type: -> crash versions: +Python 3.11, Python 3.6 ___ Python tracker <https://bugs.python.org/issu

[issue45037] theme-change.py for tkinter lib

2021-08-28 Thread Jonathan Isaac
Jonathan Isaac added the comment: Get the code! -- nosy: +bonesisaac1982 ___ Python tracker <https://bugs.python.org/issue45037> ___ ___ Python-bugs-list mailin

[issue35673] Loader for namespace packages

2021-07-16 Thread Isaac
Isaac added the comment: Not sure if it's proper etiquette to bump issues on the tracker, but is there any interest in this issue for 3.11? -- nosy: +fwahhab ___ Python tracker <https://bugs.python.org/issue35

[issue44380] glob.glob handling of * (asterisk) wildcard is broken

2021-06-10 Thread Isaac Muse
Isaac Muse added the comment: Sadly, this because pathlib glob and glob.glob use different implementations. And glob.glob does not provide something equivalent to a DOTALL flag allowing a user to glob hidden files without explicitly defining the leading dot in the pattern. -- nosy

[issue44175] What do "cased" and "uncased" mean?

2021-05-21 Thread Isaac Ge
Isaac Ge added the comment: Or we could integrate the explanation of uncased characters into the footnote for cased characters, and append the footnote in "str.istitle()" and "str.upper()". -- ___ Python tracker <

[issue44175] What do "cased" and "uncased" mean?

2021-05-21 Thread Isaac Ge
Isaac Ge added the comment: @ Josh Rosenberg Sorry, I mistook "follow" as "be followed by". Thanks to your explication, the document is coherent. I admit that I cannot conjure up any better altnernative. I noticed that "cased character" are expl

[issue44175] What do "cased" and "uncased" mean?

2021-05-19 Thread Isaac Ge
Isaac Ge added the comment: Why does "a".istitle() return "False" while it is not followed by any uncased character? -- ___ Python tracker <https://bug

[issue44175] What do "cased" and "uncased" mean?

2021-05-18 Thread Isaac Ge
Change by Isaac Ge : -- title: What does "cased" and "uncased" mean? -> What do "cased" and "uncased" mean? ___ Python t

[issue44175] What does "cased" and "uncased" mean?

2021-05-18 Thread Isaac Ge
New submission from Isaac Ge : str.istitle(): Return True if the string is a titlecased string and there is at least one character, for example uppercase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise. I saw this description

[issue42830] tempfile mkstemp() leaks file descriptors if os.close() is not called

2021-01-28 Thread Isaac Young
Isaac Young added the comment: Perhaps the documentation should be more explicit, but I wouldn't say this is an issue. Both mkstemp and mkdtemp are low level functions which are intended to have this kind of flexibility. The os.unlink, and the equivalent os.remove, are POSIX defined

[issue39682] pathlib.Path objects can be used as context managers

2020-03-05 Thread Isaac Muse
Isaac Muse added the comment: Wrong thread sorry -- ___ Python tracker <https://bugs.python.org/issue39682> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39856] glob : some 'unix style' glob items are not supported

2020-03-05 Thread Isaac Muse
Isaac Muse added the comment: Brace expansion does not currently exist in Python's glob. You'd have to use a third party module to expand the braces and then run glob on each returned pattern, or use a third party module that implements a glob that does it for you. Shameless plug: Brace

[issue39682] pathlib.Path objects can be used as context managers

2020-03-05 Thread Isaac Muse
Isaac Muse added the comment: Brace expansion does not currently exist in Python's glob. You'd have to use a third party module to expand the braces and then run glob on each returned pattern, or use a third party module that implements a glob that does it for you. Shameless plug: Brace

[issue39532] Pathlib: handling of `.` in paths and patterns creates unmatchable paths

2020-02-02 Thread Isaac Muse
Isaac Muse added the comment: The more I think about this, I think the normalization of paths is actually fine, it is the normalization of the patterns that is problematic, or more the difference in normalization. I could live with the pattern normalization of `.` and trailing

[issue39532] Pathlib: handling of `.` in paths and patterns creates unmatchable paths

2020-02-02 Thread Isaac Muse
New submission from Isaac Muse : It appears that the pathlib library strips out `.` in glob paths when they represent a directory. This is kind of a naive approach in my opinion, but I understand what was trying to be achieved. When a path is given to pathlib, it normalizes it by stripping

[issue29249] Pathlib glob ** bug

2020-01-31 Thread Isaac Muse
Isaac Muse added the comment: I think the idea of adding a globmatch function is a decent idea. That is what I did in a library I wrote to get more out of glob than what Python offered out of the box: https://facelessuser.github.io/wcmatch/pathlib/#purepathglobmatch. Specifically

ANN: calf 0.3.1

2019-11-09 Thread Isaac To
Hello all, I'm glad to announce the first public release of calf, 0.3.1: https://pypi.org/project/calf/0.3.1/ About = calf: Command Argument Loading Function for Python Calf lets you remove all your command argument parsing code, at least for simple cases. Only the implementation function

[issue37591] test_concurrent_future failed

2019-10-07 Thread Isaac Turner
Isaac Turner added the comment: I'm seeing the same error on Ubuntu LTS 16.04.6 on an ARM64 platform. $ make && make test ... 0:09:18 load avg: 2.09 [ 78/416] test_complex 0:09:20 load avg: 2.08 [ 79/416] test_concurrent_futures Traceback: Thread 0x007f61f0 (most recent ca

[issue35913] asyncore: allow handling of half closed connections

2019-02-07 Thread Isaac Boukris
Isaac Boukris added the comment: if not data: # a closed connection is indicated by signaling # a read condition, and having recv() return 0. self.handle_close() return b'' This above is the current code. Do you agree

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Isaac Boukris
Isaac Boukris added the comment: > But I want to raise the flag again: why we are adding new functionality to > the *deprecated* module? It violates our on deprecation policy, isn't it? I'm biased but I see this as more of a small and subtle fix for the current logic that incorrectly

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Isaac Boukris
Isaac Boukris added the comment: > It seems recv() returning b"" is an alias for "connection lost". E.g. in > Twisted: To my understanding, technically the connection is not fully closed, it is just shut-down for reading but we can still perform write operations o

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Isaac Boukris
Isaac Boukris added the comment: Fair enough. I'll sign the CLA meanwhile you consider it. In my opinion it may still be useful in addressing issues in existing projects written using asyncore (and maybe for python2 as well). Thanks

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Isaac Boukris
New submission from Isaac Boukris : When recv() return 0 we may still have data to send. Add a handler for this case, which may happen with some protocols, notably http1.0 ver. Also, do not call recv with a buffer size of zero to avoid ambiguous return value (see recv man page

[issue34583] os.stat() wrongfully returns False for symlink on Windows 10 v1803

2018-09-04 Thread Isaac Shabtay
New submission from Isaac Shabtay : Windows 10 Pro, v1803. Created a directory: D:\Test Created a symbolic link to it: C:\Test -> D:\Test The current user has permissions to access the link, however os.stat() fails: >>> os.stat('C:\\Test') Traceback (most recent call last): Fil

[issue33766] Grammar Incongruence

2018-06-03 Thread Isaac Elliott
Isaac Elliott added the comment: Cool, thanks for the help. Should I submit a PR with the updated documentation? -- ___ Python tracker <https://bugs.python.org/issue33

[issue33766] Grammar Incongruence

2018-06-03 Thread Isaac Elliott
Isaac Elliott added the comment: I went through that document before I created this issue. I can't find anything which describes this behavior - could you be more specific please? -- ___ Python tracker <https://bugs.python.org/issue33

[issue33766] Grammar Incongruence

2018-06-03 Thread Isaac Elliott
Isaac Elliott added the comment: Thanks for the clarification. Is there a reference to this in the documentation? -- ___ Python tracker <https://bugs.python.org/issue33

[issue33766] Grammar Incongruence

2018-06-03 Thread Isaac Elliott
New submission from Isaac Elliott : echo 'print("a");print("b")' > test.py This program is grammatically incorrect according to the specification (https://docs.python.org/3.8/reference/grammar.html). But Python 3 runs it without issue. It's this production here

[issue33149] Parser stack overflows

2018-03-26 Thread Isaac Elliott
Isaac Elliott <isaace71...@gmail.com> added the comment: Because of the way recursive descent parsing works, [[ is actually the minimal input required to reproduce this in python3. In python2, t

[issue33149] Parser stack overflows

2018-03-26 Thread Isaac Elliott
New submission from Isaac Elliott <isaace71...@gmail.com>: python3's parser stack overflows on deeply-nested expressions, for e

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread Isaac Elliott
Isaac Elliott added the comment: Does backward compatibility take priority over correct behavior? What process is followed when fixing a bug causes a breaking change? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread Isaac Elliott
Isaac Elliott added the comment: Yes I would disallow a script such as `a = [0]; [5, a][1][:] = [3]` (note: your example of just `[5, a][1][:] = [3]` does not run, so I assumed it must be used in a situation like this) Evaluating the target of an assignment is unnecessary, we can syntactically

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-22 Thread Isaac Elliott
New submission from Isaac Elliott: In Python 3.5 and 3.6 (at least), the language reference presents a grammar that disallows assignment to literals. For example, `(a for 1 in [1,2,3])` is a syntax error, as is `(1, a) = (2, 3)`. However the grammar doesn't prevent assignment to subscripted

[issue31085] Add option for namedtuple to name its result type automatically

2017-08-02 Thread Isaac Morland
Isaac Morland added the comment: Not if one of the attributes is something that cannot be part of a typename: >>> fields = ['def', '-'] >>> namedtuple ('test', fields, rename=True).__doc__ 'test(_0, _1)' >>> namedtuple ('__'.join (fields), fields, rename=True).__do

[issue31085] Add option for namedtuple to name its result type automatically

2017-08-02 Thread Isaac Morland
Isaac Morland added the comment: OK, so it's pretty clear this is heading towards a rejection, but I can't help but respond to your points: On 2 August 2017 at 01:12, Raymond Hettinger <rep...@bugs.python.org> wrote: * This would be a potentially confusing addition to the API. > I

[issue31085] Add option for namedtuple to name its result type automatically

2017-08-02 Thread Isaac Morland
Isaac Morland added the comment: On 1 August 2017 at 14:32, R. David Murray <rep...@bugs.python.org> wrote: > > R. David Murray added the comment: > > I wrote a "parameterized tests" extension for unittest, and it has the > option of autogenerating the tes

[issue31085] Add option for namedtuple to name its result type automatically

2017-08-01 Thread Isaac Morland
Isaac Morland added the comment: First, another note I would like to point out: this is much nicer to write within namedtuple than as a wrapper function because it is trivial to use the existing rename logic when needed, as seen in the diff I provided. I suppose I could write a wrapper which

[issue31086] Add namedattrgetter function which acts like attrgetter but uses namedtuple

2017-07-31 Thread Isaac Morland
Isaac Morland added the comment: Maybe the issue is that I work with SQL constantly. In SQL, if I say "SELECT a, b, c FROM t" and table t has columns a, b, c, d, e, f, I can still select a, b, and c from the result. So to me it is natural that getting a bunch of attributes returns

[issue31085] Add option for namedtuple to name its result type automatically

2017-07-31 Thread Isaac Morland
Isaac Morland added the comment: I want a meaningful name to appear in debugging output generated by repr() or str(), not just _ all over the place. I just don't want to specifically come up with the meaningful name myself. Right now I pass in the same generated name ('__'.join (field_names

[issue31086] Add namedattrgetter function which acts like attrgetter but uses namedtuple

2017-07-30 Thread Isaac Morland
Isaac Morland added the comment: Here is the diff. Note that I assume implementation of #31085, which allows me to push determination of a name for the namedtuple down into namedtuple itself: diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 62cf708..d507d23 100644

[issue31086] Add namedattrgetter function which acts like attrgetter but uses namedtuple

2017-07-30 Thread Isaac Morland
New submission from Isaac Morland: This is meant to replace my proposal in #30020 to change attrgetter to use namedtuple. By creating a new function implemented in Python, I avoid making changes to the existing attrgetter, which means that both the need of implementing a C version

[issue31085] Add option for namedtuple to name its result type automatically

2017-07-30 Thread Isaac Morland
Isaac Morland added the comment: I'm hoping to make a pull request but while I figure that out here is the diff: diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 8408255..62cf708 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -384,7

[issue31085] Add option for namedtuple to name its result type automatically

2017-07-30 Thread Isaac Morland
New submission from Isaac Morland: I would like to have the possibility of creating a namedtuple type without explicitly giving it a name. I see two major use cases for this: 1) Automatic creation of namedtuples for things like CSV files with headers (see #1818) or SQL results (see #13299

[issue30020] Make attrgetter use namedtuple

2017-04-08 Thread Isaac Morland
Isaac Morland added the comment: What are the "other issues"? As to the issue you raise here, that's why I use rename=True. First create a type with an underscore attribute: >>> t = namedtuple ('t', ['a', '1234'], rename=True) (just an easy way of creating such a type;

[issue30020] Make attrgetter use namedtuple

2017-04-08 Thread Isaac Morland
Isaac Morland added the comment: I've attached a file which illustrates what I'm proposing to happen with the examples from the help. Note that attrgetter (attr) is not affected, only attrgetter (*attrs) for more than one attribute. The idea is that tuples resulting from attrgetter

[issue30020] Make attrgetter use namedtuple

2017-04-07 Thread Isaac Morland
New submission from Isaac Morland: I would find it useful if the tuples returned by attrgetter functions were namedtuples. An initial look at the code for attrgetter suggests that this would be an easy change and should make little difference to performance. Giving a namedtuple where

[issue25831] dbm.gnu leaks file descriptors on .reorganize()

2015-12-09 Thread Isaac Schwabacher
New submission from Isaac Schwabacher: I found because test_dbm_gnu fails on NFS; my initial thought was that the test was failing to close a file somewhere (similarly to #20876), but a little digging suggested that the problem is in dbm.gnu itself: $ ./python Python 3.5.1 (default

[issue25831] dbm.gnu leaks file descriptors on .reorganize()

2015-12-09 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: Further searching reveals this as a dupe of #13947. Closing. -- status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.or

[issue25818] If protocol_factory raises an error, the connection closes but no stacktrace is printed on the server.

2015-12-07 Thread Isaac Dickinson
New submission from Isaac Dickinson: This makes it a nightmare to figure out why your connections are abruptly closing. It should print an error at least. -- components: asyncio files: broken.py messages: 256081 nosy: SunDwarf, gvanrossum, haypo, yselivanov priority: normal severity

[issue25818] asyncio: If protocol_factory raises an error, the connection closes but no stacktrace is printed on the server.

2015-12-07 Thread Isaac Dickinson
Changes by Isaac Dickinson <eyesism...@gmail.com>: -- title: If protocol_factory raises an error, the connection closes but no stacktrace is printed on the server. -> asyncio: If protocol_factory raises an error, the connection closes but no stacktrace is printed on t

[issue25818] asyncio: If protocol_factory raises an error, the connection closes but no stacktrace is printed on the server.

2015-12-07 Thread Isaac Dickinson
Isaac Dickinson added the comment: I completely forgot asyncio has a debug mode. Ignore this. -- resolution: -> not a bug ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.or

[issue24920] shutil.get_terminal_size throws AttributeError

2015-08-25 Thread Isaac Levy
Isaac Levy added the comment: I guess users need to check standard streams for None. There's not many uses of stream attributes in core libs. Maybe catch should be Exception -- since it's documented to return a fallback on error. -- ___ Python

[issue24920] shutil.get_terminal_size throws AttributeError

2015-08-23 Thread Isaac Levy
New submission from Isaac Levy: OS: windows 7, python 3.4.3, tk version 8.6.1 os.get_terminal_size also fails. shutil.get_terminal_size() Traceback (most recent call last): File pyshell#4, line 1, in module shutil.get_terminal_size() File C:\Python34\lib\shutil.py, line 1058

[issue21483] Skip os.utime() test on NFS?

2015-03-05 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: ...and fixed a spot where git diff + copy/paste truncated a long line. /sheepish -- Added file: http://bugs.python.org/file38346/test_import.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20876] python -m test test_pathlib fails

2015-03-05 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: Fixed a truncated line in the patch. -- Added file: http://bugs.python.org/file38347/test_support.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20876

[issue19884] Importing readline produces erroneous output

2015-03-03 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: From the OP: This was reported at [1] and originally at [2]. The readline maintainer suggests [3] using: rl_variable_bind (enable-meta-key, off); which was introduced in readline 6.1. Do you think it'd be safe to add the above line? From

[issue19884] Importing readline produces erroneous output

2015-03-03 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: Whoops, that's 0x0601. Though Maxime gives evidence that the version should in fact be 0x0603. (Note that while OS X ships with libedit over libreadline, anyone who wants to can install the real thing instead of that pale imitation; the test would have

[issue21483] Skip os.utime() test on NFS?

2015-03-01 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: Patch to do precisely this. Wish I'd spent more time searching for this thread and less time debugging; it would have saved me a lot of trouble. -- keywords: +patch nosy: +ischwabacher Added file: http://bugs.python.org/file38291/test_import.patch

[issue20876] python -m test test_pathlib fails

2015-03-01 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: This behavior is caused by the way NFS clients implement unlinking open files: instead of unlinking an open file, the filesystem renames it to .nfs and unlinks it on close. (The search term you want is silly rename.) The reason this problem appears

[issue23331] Add non-interactive version of Bdb.runcall

2015-01-27 Thread Isaac Jurado
New submission from Isaac Jurado: The Bdb.runcall method shows a prompt right at the beginning of the function. If breakpoints are defined, it is sometimes handy to skip the prompt until the next breakpoint, if any. This use case came up in our development environment for a Django

[issue22147] PosixPath() constructor should not accept strings with embedded NUL bytes

2014-08-05 Thread Isaac Schwabacher
New submission from Isaac Schwabacher: This is listed as a python3.4 issue even though I only tried this on the python2.7 backport because I don't have a python3 handy, but I was not able to find an indication, either here or elsewhere, that this had been addressed. Please forgive me

[issue22147] PosixPath() constructor should not accept strings with embedded NUL bytes

2014-08-05 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: Further digging reveals that the issue with `open()` was fixed in #13848 (the bug was in the `io` module). I still believe that this should fail in the `pathlib.Path` constructor, but this is less of a security issue. -- type: security - behavior

[issue21039] pathlib strips trailing slash

2014-08-05 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: This may be only syntactic sugar, but it is POSIX-specified syntactic sugar: according to http://pubs.opengroup.org/onlinepubs/9699919799/. trailing slashes in pathnames are semantically meaningful in pathname resolution. Tilde escapes are not mentioned

Extracting the value from Netcdf file with longitude and lattitude

2014-05-16 Thread Isaac Won
Hi, My question may be confusing. Now I would like to extract temperature values from model output with python. My model output have separate temperature, longitude and latitude variables. So, I overlap these three grid variables on one figure to show temperature with longitude and latitude

Google app engine database

2014-02-22 Thread glenn . a . isaac
Is there a way to make sure that whenever you're making google engine app iterations to a database that that info does not get wiped/deleted. Please advise -- https://mail.python.org/mailman/listinfo/python-list

[issue20496] function definition tutorial encourages bad practice

2014-02-02 Thread Alan Isaac
New submission from Alan Isaac: Section 4.6 of the tutorial introduces function definition: http://docs.python.org/3/tutorial/controlflow.html#defining-functions The first example defines a function that *prints* a Fibonacci series. A basic mistake made by students new to programming is to use

Drawing shaded area depending on distance with latitude and altitude coordinate

2014-01-06 Thread Isaac Won
meshgrid for X and Y, I also get: TypeError: Inputs x and y must be 1D or 2D. I just need to draw shaded contour with distance from one point on the top of the plot of each point. If you give any idea or hint, I will really apprecite. Thank you, Isaac -- https://mail.python.org/mailman/listinfo

Using MFDataset to combine netcdf files in python

2013-12-02 Thread Isaac Won
help, idea, and hint. Thank you, Isaac -- https://mail.python.org/mailman/listinfo/python-list

Plot a contour inside a contour

2013-11-14 Thread Isaac Won
intention is to plot ax2 on the top of ax1 from xdist and ydist = 8 with 18 by 18 size. However, the result seems only showing ax1. I will really appreciate any help or idea. Thank you, Isaac -- https://mail.python.org/mailman/listinfo/python-list

Re: Plot a contour inside a contour

2013-11-14 Thread Isaac Won
On Thursday, November 14, 2013 2:01:39 PM UTC-8, John Ladasky wrote: On Thursday, November 14, 2013 11:39:37 AM UTC-8, Isaac Won wrote: I tried to plot one smaller contour inside of the other larger contour. Using what software? A plotting package is not part of the Python standard

using print() with multiprocessing and pythonw

2013-11-12 Thread Isaac Gerg
are supressed. I would hate to do a warnings.filterwarnings('ignore') because when I unit test those functions, the warnings dont appear. Thanks in advance, Isaac -- https://mail.python.org/mailman/listinfo/python-list

Re: using print() with multiprocessing and pythonw

2013-11-12 Thread Isaac Gerg
Thanks for the reply Bill. The problem is the text i am getting is from a python warning message, not one of my own print() function calls. -- https://mail.python.org/mailman/listinfo/python-list

Python 3.2 | WIndows 7 -- Multiprocessing and files not closing

2013-10-10 Thread Isaac Gerg
in advance, Isaac -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 | WIndows 7 -- Multiprocessing and files not closing

2013-10-10 Thread Isaac Gerg
example here: http://stackoverflow.com/questions/948119/preventing-file-handle-inheritance-in-multiprocessing-lib None of the solutions posted work. On Thursday, October 10, 2013 12:38:19 PM UTC-4, Piet van Oostrum wrote: Isaac Gerg isaac.g...@gergltd.com writes: I have a function

Re: Python 3.2 | WIndows 7 -- Multiprocessing and files not closing

2013-10-10 Thread Isaac Gerg
On Thu, Oct 10, 2013 at 2:41 PM, Ned Batchelder n...@nedbatchelder.comwrote: On 10/10/13 12:44 PM, Isaac Gerg wrote: Sorry, I am just providing pseudo code since I the code i have is quite large. As I mentioned, the code works fine when I remove the multirpcessing stuff so the filename

Re: Python 3.2 | WIndows 7 -- Multiprocessing and files not closing

2013-10-10 Thread Isaac Gerg
On Thu, Oct 10, 2013 at 2:49 PM, Isaac Gerg isaac.g...@gergltd.com wrote: On Thu, Oct 10, 2013 at 2:41 PM, Ned Batchelder n...@nedbatchelder.comwrote: On 10/10/13 12:44 PM, Isaac Gerg wrote: Sorry, I am just providing pseudo code since I the code i have is quite large. As I mentioned

Re: Python 3.2 | WIndows 7 -- Multiprocessing and files not closing

2013-10-10 Thread Isaac Gerg
functions which read from the file. Isaac -- https://mail.python.org/mailman/listinfo/python-list

[issue18844] allow weights in random.choice

2013-08-26 Thread Alan Isaac
New submission from Alan Isaac: The need for weighted random choices is so common that it is addressed as a common task in the docs: http://docs.python.org/dev/library/random.html This enhancement request is to add an optional argument to random.choice, which must be a sequence of non

Re: Why is the argparse module so inflexible?

2013-06-28 Thread Isaac To
On Sat, Jun 29, 2013 at 9:36 AM, Ethan Furman et...@stoneleaf.us wrote: On 06/27/2013 03:49 PM, Steven D'Aprano wrote: Libraries should not call sys.exit, or raise SystemExit. Whether to quit or not is not the library's decision to make, that decision belongs to the application layer. Yes,

Re: I hate you all

2013-04-05 Thread Isaac To
You underestimated the arrogance of Python. Python 3 tab doesn't map to 4 spaces. It doesn't map to any number of spaces. Tabs and spaces are completely unrelated. If you have a function having the first indentation level with 4 (or any number of) spaces, the next line starting not with 4

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Isaac To
In general, it is hard for any process to return the memory the OS allocate to it back to the OS, short of exiting the whole process. The only case that this works reliably is when the process allocates a chunk of memory by mmap (which is chosen by libc if it malloc or calloc a large chunk of

Triple nested loop python (While loop insde of for loop inside of while loop)

2013-03-01 Thread Isaac Won
try to make my triple nested loop working. My code would be: c = 4 y1 = [] m1 = [] std1 = [] while c 24: c = c + 1 a = [] f.seek(0,0) for columns in ( raw.strip().split() for raw in f ): a.append(columns[c])

Re: Triple nested loop python (While loop insde of for loop inside of while loop)

2013-03-01 Thread Isaac Won
Thank you, Chris. I just want to acculate value from y repeatedly. If y = 1,2,3...10, just have a [1,2,3...10] at onece. On Friday, March 1, 2013 7:41:05 AM UTC-6, Chris Angelico wrote: On Fri, Mar 1, 2013 at 7:59 PM, Isaac Won winef...@gmail.com wrote: while c 24: for columns

Re: Triple nested loop python (While loop insde of for loop inside of while loop)

2013-03-01 Thread Isaac Won
On Friday, March 1, 2013 7:41:05 AM UTC-6, Chris Angelico wrote: On Fri, Mar 1, 2013 at 7:59 PM, Isaac Won winef...@gmail.com wrote: while c 24: for columns in ( raw.strip().split() for raw in f ): while d 335: Note your indentation levels: the code does

Re: Triple nested loop python (While loop insde of for loop inside of while loop)

2013-03-01 Thread Isaac Won
Thank you Ulich for reply, What I really want to get from this code is m1 as I told. For this purpose, for instance, values of fpsd upto second loop and that from third loop should be same, but they are not. Actually it is my main question. Thank you, Isaac On Friday, March 1, 2013 6:00:42 AM

Putting the loop inside of loop properly

2013-03-01 Thread Isaac Won
to m1. However, it doesn't work and fpsd values in and out of the last loop are totally different. My question is clear? Any help or questions would be really appreciated. Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Import redirects

2013-02-11 Thread Isaac To
On Mon, Feb 11, 2013 at 8:27 PM, Oscar Benjamin oscar.j.benja...@gmail.comwrote: On 11 February 2013 06:50, Isaac To isaac...@gmail.com wrote: Except one thing: it doesn't really work. If I `import foo.baz.mymod` now, and if in bar.baz.mymod there is a statement `import bar.baz.depmod

Import redirects

2013-02-10 Thread Isaac To
I have a package (say foo) that I want to rename (say, to bar), and for compatibility reasons I want to be able to use the old package name to refer to the new package. Copying files or using filesystem symlinks is probably not the way to go, since that means any object in the modules of the

About a value error called 'ValueError: A value in x_new is below the interpolation range'

2013-02-05 Thread Isaac Won
() --- For any help or advice, I will really appreciate. Best regards, Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory error with quadratic interpolation

2013-01-23 Thread Isaac Won
On Tuesday, January 22, 2013 10:06:41 PM UTC-6, Isaac Won wrote: Hi all, I have tried to use different interpolation methods with Scipy. My code seems just fine with linear interpolation, but shows memory error with quadratic. I am a novice for python. I will appreciate any help

  1   2   3   4   5   6   7   >