[sage-devel] Re: Is it possible to avoid libsingular from being imported by Sage

2010-05-19 Thread Dima Pasechnik
On May 19, 12:15 pm, Pablo Winant wrote: > Would it work to simply rename Array class to SingularArray in > singular's spkg, maybe using a preprocessor directive ? well, and in all the places in Sage that uses Singular's Array... You'd rather do this to Octave, at least it's only your code.

Re: [sage-devel] Re: Is it possible to avoid libsingular from being imported by Sage

2010-05-19 Thread Pablo Winant
Would it work to simply rename Array class to SingularArray in singular's spkg, maybe using a preprocessor directive ? Le 18/05/2010 18:01, Martin Albrecht a écrit : It's been a while since I coded in C++, but isn't there always a simple way out, just by putting these classes in different names

Re: [sage-devel] Re: Is it possible to avoid libsingular from being imported by Sage

2010-05-18 Thread Martin Albrecht
> It's been a while since I coded in C++, but isn't there always a > simple way out, just by putting these classes in different namespaces? > (IMHO it's a silly of a library developer to call something "Array" > and put in into the global namespace, > hoping that noone else ever is going to call "

[sage-devel] Re: Is it possible to avoid libsingular from being imported by Sage

2010-05-18 Thread Dima Pasechnik
On May 18, 5:30 pm, William Stein wrote: > On Tue, May 18, 2010 at 8:21 AM, Pablo Winant wrote: > > I guess the problem does not arise in Python's namespace. Unless I'm missing > > something, I don't see how 'import pytave'  statement could conflict with > > singular python modules or objects.

Re: [sage-devel] Re: Is it possible to avoid libsingular from being imported by Sage

2010-05-18 Thread William Stein
On Tue, May 18, 2010 at 8:21 AM, Pablo Winant wrote: > I guess the problem does not arise in Python's namespace. Unless I'm missing > something, I don't see how 'import pytave'  statement could conflict with > singular python modules or objects. > > There seem to be an incompatibility between octa

Re: [sage-devel] Re: Is it possible to avoid libsingular from being imported by Sage

2010-05-18 Thread Pablo Winant
I guess the problem does not arise in Python's namespace. Unless I'm missing something, I don't see how 'import pytave' statement could conflict with singular python modules or objects. There seem to be an incompatibility between octave and singular shared libraries (.so file) related to C++

[sage-devel] Re: Is it possible to avoid libsingular from being imported by Sage

2010-05-18 Thread Dima Pasechnik
Certainly, such name clashes are not uncommon (e.g. cvxopt defines its own matrix that clashes with Sage's matrix) IMHO if you import the needed things from the package you need, doing re-namings when needed, as usual (from foo import blah as fooblah) you can avoid the problem you describe. HTH,