Brian Sheldon <brianmshel...@gmail.com> added the comment:
Windows does not implement symlinks as junctions. Windows has hardlinks,
symlinks and junctions which are all distinctly different in behaviour.
I don't doubt that this is a Windows-specific issue, although I have not tested
Change by Brian Sheldon <brianmshel...@gmail.com>:
--
type: -> behavior
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33428>
___
_
New submission from Brian Sheldon <brianmshel...@gmail.com>:
Given a `pathlib.Path` that contains symlinked subfolders, `Path.glob` (and
`.rglob`) do not follow symlinks. This is not consistent with `glob.glob`
which does.
For example given the following:
C:\Folder
C:\Folder\Subfolde
Brian Sheldon <brianmshel...@gmail.com> added the comment:
This appears to be a duplicate of #22276
--
nosy: +brianmsheldon
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
On Feb 21, 12:53 am, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
On Mon, 20 Feb 2012 12:37:22 -0800, Sheldon wrote:
Hi,
I'm trying to read a netCDF4 variable from a file (no problem) and then
scale it before writing over the original variable in the file.
I'm using
Hi,
I'm trying to read a netCDF4 variable from a file (no problem) and
then scale it before writing over the original variable in the file.
I'm using python 2.7 and the latest netCDF4 module. It's not that I
keep getting an error message but I want to do this without using for
loops and all the
Could I write my own if one does not exist?
Take a look at the getpass.py module. It's very short. The windows
version of the getpass function can be trivially modified to echo
something. The unix version is just as short but a bit more
complicated.
def win_getpass(prompt='Password: ',
Is there any way to make urllib2 handle NTLM authentication?
Sheldon Neuberger
--
http://mail.python.org/mailman/listinfo/python-list
If you're just writing Python code then it will run unmodified on his
Windows machine.
Are you planning on using other languages too?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Levi Campbell
Sent: Friday, July 18, 2008 4:27 PM
To:
get an HTTP 401
exception. Any help would be much appreciated.
Code and traceback follows.
Regards,
Sheldon Neuberger
--
cj = cookielib.LWPCookieJar()
cookie_handler = urllib2.HTTPCookieProcessor(cj)
passmgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
passmgr.add_password
/lib/python2.3/site-packages/Numeric/ranlib.so
Symbols already loaded for
/usr/lib/python2.3/site-packages/Numeric/lapack_lite.so
Symbols already loaded for /usr/lib/python2.3/lib-dynload/time.so
Symbols already loaded for
/data/proj_ns1/safworks/sheldon/MSG_PPS_COMP/c_codes/msgppsarea.so
Symbols
Martin v. Löwis skrev:
Sheldon schrieb:
Can anyone tell me what this error mean:
#0 0x4008376e in PyType_IsSubtype () from /usr/lib/libpython2.3.so.1.0
It's not an error. It is just a frame from the backtrace.
To understand the crash better, one would need to see more frames from
, refcnt 0
at 0x80d885c, refcnt 0 at 0x80d885c, refcnt 0 at 0x80d885c,
refcnt 0 at 0x80d885c, refcnt 0 at 0x80d885c, refcnt 0 at
0x80d885c, refcnt 0 at 0x80d885c
Any help is appreciated!
/Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Jack Diederich skrev:
On Wed, Jan 03, 2007 at 01:16:38PM -0800, Sheldon wrote:
I have a function that creates python objects out of C arrays and
returns them to Python. Below is a working example that I later want to
expand to return 12 arrays back to Python. The problem is that when I
Nick Craig-Wood skrev:
Sheldon [EMAIL PROTECTED] wrote:
Sheldon skrev:
Wonderful! Now I know how to used gdb with python.
Good!
The are results area posted below. Since I am new at this I could
used some help in interpreting the problem. What I do know is
this: my allocation
Hi,
The code below is a rookie attempt to copy a python list of strings to
a string array in C. It works to some extent but results in memory
problems when trying to free the C string array. Does anyone know how
to do this properly?
***
Duncan Booth skrev:
Sheldon [EMAIL PROTECTED] wrote:
I am new to this and copied this code from a colleague. So, it
corrupts the pointer. How do I do this properly?
Here is at least part of your problem:
msgop = PyList_GetItem(work.msgobj, i);
work.msg_scenes[i
Nick Craig-Wood skrev:
Sheldon [EMAIL PROTECTED] wrote:
Man. You are good. This is most insight I have had from anyone.
:-)
I did initialize the arrays with PyObjects and today, after hours of
debugging and now with your insight, I think the problem lies here:
Good!
You need
Klaas skrev:
Sheldon wrote:
The code below is a rookie attempt to copy a python list of strings to
a string array in C. It works to some extent but results in memory
problems when trying to free the C string array. Does anyone know how
to do this properly?
You have numerous problems
Nick Craig-Wood skrev:
Sheldon [EMAIL PROTECTED] wrote:
gdb msgppscomp.py core.3203
Run
gdb python
Then type
run msgppscomp.py
at the gdb prompt.
When it crashes, type bt for a back trace. This will pinpoint
exactly where it crashes.
Hopefully that will make things
Nick Craig-Wood skrev:
Sheldon [EMAIL PROTECTED] wrote:
gdb msgppscomp.py core.3203
Run
gdb python
Then type
run msgppscomp.py
at the gdb prompt.
When it crashes, type bt for a back trace. This will pinpoint
exactly where it crashes.
Hopefully that will make things
to see the conditions.
There is absolutely no warranty for GDB. Type show warranty for
details.
This GDB was configured as
i586-mandrake-linux-gnu.../data/proj_ns1/safworks/sheldon/msgppscomp.py:
not in executable format: File format not recognized
Core was generated by `python msgppscomp.py
Marc 'BlackJack' Rintsch wrote:
In [EMAIL PROTECTED], Sheldon wrote:
Now I am wondering if the problem is in Python and the wrapper? Does
anybody have any idea or experience with this? I am running on
Mandrake10 using python 2.3. I am not exactly sure which C wrapper I am
using as I
Fredrik Lundh wrote:
Sheldon wrote:
I am very new at this C extensions in Python so my term wrapper was
probably a misnomer. Perhaps glue is better or the interface that
allows the exchange of data between Python and C.
Yes, I am using python objects in my C extension.
Tell me where I
Fredrik Lundh wrote:
Sheldon wrote:
I am very new at this C extensions in Python so my term wrapper was
probably a misnomer. Perhaps glue is better or the interface that
allows the exchange of data between Python and C.
Yes, I am using python objects in my C extension.
Tell me where I
== NULL) { // Memory for the Col
fprintf(stderr, Failed to allocate memory\n);
exit(EXIT_FAILURE);
}
}
return array;
}
static
void MemoryFreeStr(int Col, char*** array) {
int i;
for (i = 0; i 15; i++) {
free((*array)[i]);
}
free(*array);
}
Thanks,
Sheldon
--
http
person.
thanks in advance,
/Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Can anyone give me some idea as to what this error means?
ImportError: dynamic module does not define init function
I am new at this and there is still a lot to learn.
Any help is appreciated,
/Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Farshid Lashkari skrev:
Sheldon wrote:
Can anyone give me some idea as to what this error means?
ImportError: dynamic module does not define init function
I am new at this and there is still a lot to learn.
Any help is appreciated,
Take a look at the documentation for creating
Robert Kern skrev:
Sheldon wrote:
This function is there and is called init_mymodule() but I have other
functions that are not static.
Is the module's name _mymodule? Or is it mymodule?
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless enigma
number crunching. Now I just need to
connect it to my python program. Should the initmsgpps_functions() be
the only function in the file? Then how do I connect my C module to
my Python program?
/Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina skrev:
At Tuesday 7/11/2006 17:27, Sheldon wrote:
Here is the file/module name: _msgpps_functions.c
Here is the initfunction:
PyMODINIT_FUNC init_msgpps_functions(void) {
PyObject* m;
m=Py_InitModule(_msgpps_functions,_msgpps_functionsMethods);
ErrorObject
MRAB wrote:
Sheldon wrote:
MRAB wrote:
Sheldon wrote:
Hi.
Does anyone know if one can resume a python script at the error point
after the error is corrected?
I have a large program that take forever if I have to restart from
scratch everytime. The error was the data
is very large and it is being
modified often.
Any advice on how to save the variables.
/Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
MRAB wrote:
Sheldon wrote:
Hi.
Does anyone know if one can resume a python script at the error point
after the error is corrected?
I have a large program that take forever if I have to restart from
scratch everytime. The error was the data writing a file so it seemed
such a waste
Hi,
Does anyone know if it is possible to resume the execution of a program
after it stops at an error in the code and the error was corrected?
Sincerely,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
be recalculated again.
Sincerely,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
I am new to unicode so please bear with my stupidity.
I am doing the following in a Python IDE called Wing with Python 23.
s = äöü
print s
äöü
print s
äöü
s
'\xc3\xa4\xc3\xb6\xc3\xbc'
s.decode('utf-8')
u'\xe4\xf6\xfc'
u = s.decode('utf-8')
u
u'\xe4\xf6\xfc'
print u.encode('utf-8')
a 1 does it
horizontally. But the results does not reflect this.
What am I missing here?
I am using Numeric.
Any help is appreciated,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Robert Kern skrev:
Sheldon wrote:
Hi,
I am trying to build a large array using concatenate function in
python.
So as I loop over the number of arrays, of which there are 12 (4 down
and 3 across), I create 3 long arrays by concatenating them at the
bottom and then concatenating
Robert Kern wrote:
Sheldon wrote:
Hi,
I am trying to build a large array using concatenate function in
python.
So as I loop over the number of arrays, of which there are 12 (4 down
and 3 across), I create 3 long arrays by concatenating them at the
bottom and then concatenating them
Robert Kern skrev:
Sheldon wrote:
Thanks again for showing me this. I have been trying to read up on
reduce() as I have never used it before. I would like to know what it
does. So far my search has found nothing that I can grasp. The
reference library notes are estoteric at best.
Can
)) values is incorrect. Does anyone knows why this is
so?
If I was doing something wrong then Matlab would not have returned
correct values.
Any help is appreciated!
/Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Sheldon skrev:
Hi,
I am trying to build a large array using concatenate function in
python.
So as I loop over the number of arrays, of which there are 12 (4 down
and 3 across), I create 3 long arrays by concatenating them at the
bottom and then concatenating them side by side:
for ind
Carl Banks wrote:
Sheldon wrote:
average(compress(ravel(equal(wk,z)),ravel(sattmp)),axis=None)
This is much more compact and elegant. Thanks for pointing this out.
I don't know why average() returned a divide by zero error and to avoid
this I inserted this if statement. Now it works
instead of
passing them back and forth.
After trying this it did work! My question is why? Another way to solve
this problem is to make the variable I need global in the class that
they are created. Does anyone have a better way in mind?
Sincerely,
Sheldon
--
http://mail.python.org/mailman/listinfo
Simon Forman skrev:
Sheldon wrote:
Hi,
I have a series of classes that are all within the same file. Each is
called at different times by the main script. Now I have discovered
that I need several variables returned to the main script. Simple,
right? I thought so and simply returned
Scott David Daniels skrev:
Sheldon wrote:
Hi,
I have a series of classes that are all within the same file. Each is
called at different times by the main script. Now I have discovered
that I need several variables returned to the main script. Simple,
right? I thought so and simply
Carl Banks wrote:
Sheldon wrote:
Carl Banks wrote:
I'm not sufficiently sure this isn't a homework problem, so here's a
partial answer.
[snip]
My days as a student is over for the most part. I am learning python on
my own and Numeric is not properly documented so I am learning
wrong. I am not
using the original arrays, only the copies and when a new z is chosen
then these are recreated.
Care to help out with this?
/Sheldon
Carl Banks wrote:
Sheldon wrote:
Hi,
I have the following loop that I think can be written to run faster in
Numeric. I am currently using
the sum of the
values
count += 1 # count the occurrences
tmp_array[0,index] = round(mbias/count,1) # store the mean
tmp_array[1,index] = z
index += 1
Any help would be greatly appreciated!
Sincerely,
Sheldon
--
http://mail.python.org
this
without using for loops?
Sincerely,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Hi Gary,
I am really trying to cut the time down as I have 600+ arrays with
dimensions (1215,1215) to compare and I do a lot more things with the
arrays. If I understand you correctly, there is no way around a for
loop?
/Sheldon
Gary Herron wrote:
Sheldon wrote:
Hi,
I have two arrays
of these arrays at the same time. I cannot install Numpy due to my
working conditions. Sorry I should have made it clear that is was
Numeric I was working with.
/Sheldon
Alex Martelli wrote:
Sheldon [EMAIL PROTECTED] wrote:
Hi Gary,
I am really trying to cut the time down as I have 600+ arrays
into it when I get back to work tomorrow.
Bye for now,
Sheldon
Alex Martelli wrote:
Sheldon [EMAIL PROTECTED] wrote:
Alex,
I am using Numeric and have created 3 arrays: zero((1215,1215),Float)
Two arrays are compared and one is used to hold the mean difference
between the two compared
:
print x
[10 1 30 3 50]
putmask(x, [1,0,1,0,1], [-1,-2])
print x
[-1 1 -1 3 -1]
Can you explain why the -2 didn't factor in?
/Sheldon
Sheldon wrote:
Hi Alex,
I will code this in a little while and get back to you. Terrific! I saw
this function but I skipped over it without realizing what
Thanks for the tips!
I am going to look into this some more.
/Sheldon
Simon Forman skrev:
Sheldon wrote:
Hi,
I have a written a script that will check to see if the divisor is zero
before executing but python will not allow this:
if statistic_array[0:4] 0.0:
statistic_array[0,0
.
/Sheldon
Robert Kern skrev:
Sheldon wrote:
Hi,
I have a written a script that will check to see if the divisor is zero
before executing but python will not allow this:
if statistic_array[0:4] 0.0:
statistic_array[0,0:4] =
int(multiply(divide(statistic_array[0,0:4
Thanks Diez,
It will take a little while for this one to sink in but it gets the job
done now and will for future cases.
/Sheldon
Diez B. Roggisch skrev:
print [i for i, _ in enumerate((None for x, y in zip(a, b) where x ==
y))]
instead.
Diez
Hi Diez,
I wish I say that I
Thanks Diez,
It will take a little while for this one to sink in but it gets the job
done now and will for future cases.
/Sheldon
Diez B. Roggisch skrev:
print [i for i, _ in enumerate((None for x, y in zip(a, b) where x ==
y))]
instead.
Diez
Hi Diez,
I wish I say that I
is complaining:
statistic_array[0,0:4] =
int(multiply(divide(statistic_array[0,0:4],statistic_array[0,4]),1.0))/100.0
OverflowError: math range error
and how do I get around this problem? This stupid because there is a if
statement preventing this dividing by zero.
Sincerely,
Sheldon
--
http
.
Diez
Hi Diez,
I wish I say that I understood what you wrote here but I can't.
Do you mind explaining a little more?
/sheldon
--
http://mail.python.org/mailman/listinfo/python-list
)
0
Numeric.where(a==b,1,0)
0
Numeric.where(a==6 and b==6,1,0)
0
The where() statement is also worhtless here. Does anyone have any
suggestion on how to do this?
Thanks in advance,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
which is called baseline but when python reads it, it returns
baselin instead.
Does anyone have any idea why this is happening?
Sincerely,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Marc 'BlackJack' Rintsch skrev:
In [EMAIL PROTECTED], Sheldon wrote:
I am using a HLHDF C wrapper to extract data from HDF (version 5)
files.
I can view the contents with IDL, for example, and read the attributes
in the HDF file. There is one attribute that I extracted and only
Good day,
I would like to know if there is a way to print all the variables set
in a python program with having to write
print variable on all?
sincerely,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth skrev:
Sheldon wrote:
Good day,
I would like to know if there is a way to print all the variables set
in a python program with having to write
print variable on all?
Not all the variables in a program (that would be rather more than you
want), but you can print all
would be greatly appreciated!
Sincerely,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Thanks!
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am interesseted on reading some GRIB files using python and then
converting the fields to gif images.
Does anyone know if this is possible or have a program that does this?
/Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Thanks,
I later discovered that it was a big edian binary as well.
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
anyone have any ideas of how to improve this by writing the 2D
array in binary form?
Thanks,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Travis,
I don't have the new NumPy yet but this tofile() method should work
fine.
/Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Sorry Mike, after seeing so many experts beat up others for not being
as smart as they are, I intrepreted your words incorrectly - my
apologies. I am not in the least bit against impproving my programming.
I liked what you did and thanks for the pointers.
Sheldon
--
http://mail.python.org
handling using the function RAISE:
try:
Call C
except:
raise my_error.
A catch-all error is RuntimeError; try this first.
try:
call C
except RuntimeError, r:
print r
You can read up on it here:
http://docs.python.org/api/standardExceptions.html
Cheers,
Sheldon
--
http://mail.python.org
So Mike if you can do better then do it then! There are many ways do
solve a problem, perhaps you have not learned that yet. At first this
guy didn't know what to do, so he had to begin somewhere. Now you can
take him much further, I am sure but the journey might not be so
pleasant. Your attitude
was executed without error or -1 for
an error. We have not tried to catch the error from the C-code. Sorry.
Perhaps some else knows how.
cheers,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
anyone point me in the right direction? What
triggers such erroneous errors in Python?
Sincerely,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Hi Rod,
This sounds very interesting. I am checking the previous lines and will
get back to you.
Thanks,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Hi Rod,
You were right. The error was on the previous line. I will remember
that.
Thanks for your help!
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
Hi Fredrik,
I am using python 2.3.3
I am checking now the previous lines for errors.
Thanks,
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
83 matches
Mail list logo