Re: [Ironpython-users] problem incorporating namespace into Xaml

2014-07-25 Thread Doug Blank
On Fri, Jul 25, 2014 at 6:09 AM, Vernon Cole wrote: > Repeating my (minority) argument on this subject years ago: > > "IP" is generally used as the acronym for "Internet Protocol" and is so > generally understood with that meaning, that re-use of that acronym for any > other computer-related conc

Re: [Ironpython-users] numpy in IronPython

2014-06-05 Thread Doug Blank
I was able to make contact with Timothy Hochberg and Mark DeArman and get the source code to a couple of older numeric/numpy Python libraries. I'm not sure exactly how old these are, nor what version of numpy they implement, but the code can be found here: https://bitbucket.org/dblank/pure-numpy/

Re: [Ironpython-users] cython-for-ironpython

2014-06-04 Thread Doug Blank
On Wed, Jun 4, 2014 at 10:46 AM, Pawel Jasinski wrote: > I have sorted it out. The cython-for-ironpython works as long as you stay > with functionality used by numpy/scipy. Picking random test may expose > thing which were simply not implemented. > There is no dependency on ironclad. > CallSite c

Re: [Ironpython-users] numpy in IronPython

2014-06-03 Thread Doug Blank
ls for the current version of numpy would be static. Requires generic Python skills to develop (a large group of people have these skills; any generic Python implementation could use). -Doug On Mon, Jun 2, 2014 at 2:09 PM, Doug Blank wrote: > On Mon, Jun 2, 2014 at 1:41 PM, Steve Baer wrote

Re: [Ironpython-users] numpy in IronPython

2014-06-02 Thread Doug Blank
ix/?at=default https://bitbucket.org/cwitty/cython-for-ironpython/commits/9dc7e1a2d56a3e3c8a7b3c7a5d23073a54b2b814 But, I haven't worked much with Python and C libraries. -Doug > > -Steve > > > On Sun, Jun 1, 2014 at 6:29 AM, Doug Blank wrote: > >> On Sun, Jun 1, 20

Re: [Ironpython-users] numpy in IronPython

2014-06-01 Thread Doug Blank
On Sun, Jun 1, 2014 at 3:05 AM, Jeff Hardy wrote: > On Sat, May 31, 2014 at 3:23 PM, Doug Blank wrote: > >> On Fri, May 30, 2014 at 5:22 PM, Steve Baer wrote: >> >>> I would definitely be interested in helping, but don't exactly know >>> where to start.

Re: [Ironpython-users] numpy in IronPython

2014-05-31 Thread Doug Blank
here to start? -Doug [1] - http://legacy.python.org/dev/peps/pep-0465/ > > Any suggestions? > > -Steve > > Steve Baer > Robert McNeel & Associates > www.rhino3d.com > > > On Fri, May 30, 2014 at 1:12 PM, Jeff Hardy wrote: > >> On Fri, May 30, 2014 at 2:50

[Ironpython-users] numpy in IronPython

2014-05-30 Thread Doug Blank
numpy is a numeric package for CPython that used a lot in science. Wondering about what it would take to develop a numpy for IronPython... I know a few years ago that there was a paid project to port numpy to IronPython [1], but that appears to have been only for Windows, and they seem to have som

Re: [Ironpython-users] IronPython SQLite interface

2014-05-09 Thread Doug Blank
On Fri, May 9, 2014 at 8:59 AM, Jeff Hardy wrote: > On Fri, May 9, 2014 at 12:01 PM, Doug Blank wrote: > > On Fri, May 9, 2014 at 4:42 AM, Jeff Hardy wrote: > >> > >> On Thu, May 8, 2014 at 5:32 PM, Doug Blank > wrote: > >> > Just getting back to at

Re: [Ironpython-users] IronPython SQLite interface

2014-05-09 Thread Doug Blank
On Fri, May 9, 2014 at 4:42 AM, Jeff Hardy wrote: > On Thu, May 8, 2014 at 5:32 PM, Doug Blank wrote: > > Just getting back to attempting to use sqlite3 on computers other than > > Windows, and it looks like this C# library has other problems on other > OSes. > > > &

Re: [Ironpython-users] IronPython SQLite interface

2014-05-08 Thread Doug Blank
at code is trying to do (context: > > > > > https://github.com/IronLanguages/main/blob/master/Languages/IronPython/IronPython.SQLite/c%23sqlite/os_win_c.cs#L2646 > ); > > it might be some vestigial part of SQLite that's not needed. Since // > > seems OK I'm assu

[Ironpython-users] IronPython in IPython notebook/console

2014-04-19 Thread Doug Blank
If you haven't used IPython in a while, you might be surprised to find that it can use a web browser as an IDE. They have separated out the frontends of their interfaces (console, qtconsole, and notebook) from their backend (called a kernel). We've written a kernel that allows our Calico system to

Re: [Ironpython-users] Hashing a directory is magnitudes slower than in cPython

2014-02-25 Thread Doug Blank
I think I just wrote the relevant parts in C#, in a slightly different form: public string sign(List list) { hmac.Initialize(); foreach (string item in list) { byte [] sourcebytes = Encoding.UTF8.GetBytes(item); hmac.TransformBlock(sourcebytes, 0, sourcebyte

Re: [Ironpython-users] IronPython SQLite interface

2014-02-11 Thread Doug Blank
> seems OK I'm assuming that's the case. > > Doug, can you open an issue? And in the meantime, is using // an > acceptable workaround? > > - Jeff > > > > > > > On Mon, Feb 10, 2014 at 3:14 PM, Doug Blank > wrote: > >> > >> That mus

Re: [Ironpython-users] IronPython SQLite interface

2014-02-10 Thread Doug Blank
lite3.connect("//home/dblank/test.db") >>> -Doug On Mon, Feb 10, 2014 at 5:12 PM, Doug Blank wrote: > After more testing, it appears that it only fails when the path begins > with a slash "/". > > I see: > > ./c#sqlite/os_win_c.cs: if

Re: [Ironpython-users] IronPython SQLite interface

2014-02-10 Thread Doug Blank
After more testing, it appears that it only fails when the path begins with a slash "/". I see: ./c#sqlite/os_win_c.cs: if ( zConverted.StartsWith( "/" ) && !zConverted.StartsWith( "//" I'll try a couple of more things... -Doug On Mon, Feb 10,

Re: [Ironpython-users] IronPython SQLite interface

2014-02-10 Thread Doug Blank
; for more information. >>> import sqlite3 >>> sqlite3.connect("/home/dblank/test.db") >>> $ ls -al /home/dblank/test.db -rw-r--r-- 1 dblank dblank 0 Feb 10 09:15 /home/dblank/test.db -Doug > > > On Fri, Feb 7, 2014 at 6:01 AM, Doug Blank wro

[Ironpython-users] Missing os.getuid()

2014-02-07 Thread Doug Blank
I'm trying to figure out if the missing os.getuid() is a bug in IronPython. On the one hand, this is to be defined for Unix, where os.name == "posix" (when running IronPython on Unix). On the other hand, what should it return when sys.platform == "cli" and os.name == "nt"? It seems that many pro

Re: [Ironpython-users] IronPython SQLite interface

2014-02-07 Thread Doug Blank
y.exe (Mono 2.10, Ubuntu 13.10) and IronPython in Calico. -Doug > > > On Fri, Feb 7, 2014 at 5:37 AM, Doug Blank wrote: > >> Just recently discovered the sqlite3 port for IronPython, but having some >> basic trouble: >> >> This works fine: >> >> imp

[Ironpython-users] IronPython SQLite interface

2014-02-07 Thread Doug Blank
Just recently discovered the sqlite3 port for IronPython, but having some basic trouble: This works fine: import sqlite3 sqlite3.connect("test.db") but this doesn't: import sqlite3 sqlite3.connect("/home/dblank/test.db") Any ideas? -Doug ___ Ironpyt

Re: [Ironpython-users] Fwd: pyzmq can be used with ironpython

2014-02-07 Thread Doug Blank
FYI, I started integrating our IronPython (and other languages) system, named Calico, with IPython in the last few weeks. I ended up writing an IPython "kernel" (the language backend) in C#: https://bitbucket.org/ipre/calico/src/master/Source/Calico/ZMQServer.cs It isn't complete yet (need to add

[Ironpython-users] Building IronRuby

2014-02-05 Thread Doug Blank
I was updating the page: https://ironpython.codeplex.com/wikipage?title=IronPython%20on%20Mono and got stuck on building IronRuby. I tried many variations (Mono 2.10 on Ubuntu 13.10) but no luck. Always at least errors like: PartialTrustDriver.cs(51,63): error CS0103: The name `PermissionState'

Re: [Ironpython-users] Splitting up the IronPython repo

2014-01-22 Thread Doug Blank
+1 for these plans! I think this split will be good for the dlr, which hasn't (so far) been used as much as it could. BTW, (and this is a small point) even though IronRuby is dead and was never complete, it is still functional for some purposes. So, if it is possible without major time commitments

Re: [Ironpython-users] Calling Python function from C# with **args?

2013-04-18 Thread Doug Blank
On Wed, Apr 17, 2013 at 11:42 AM, Jeff Hardy wrote: > On Wed, Apr 17, 2013 at 7:00 AM, Doug Blank wrote: >> IronPython users, >> >> Is there a way to call a Python function or method defined like: >> >> def func(**args): >> return args >> &g

Re: [Ironpython-users] Calling Python function from C# with **args?

2013-04-17 Thread Doug Blank
On Wed, Apr 17, 2013 at 11:42 AM, Jeff Hardy wrote: > On Wed, Apr 17, 2013 at 7:00 AM, Doug Blank wrote: >> IronPython users, >> >> Is there a way to call a Python function or method defined like: >> >> def func(**args): >> return args >> &g

[Ironpython-users] Calling Python function from C# with **args?

2013-04-17 Thread Doug Blank
IronPython users, Is there a way to call a Python function or method defined like: def func(**args): return args from C#? Currently, I'm using Mono with mcs -sdk:2 (aka, .NET 3.5) but if I need to upgrade to sdk:4 (.NET 4.0) I will. Thanks for any pointers, -Doug _

Re: [Ironpython-users] Latest status on ctypes?

2013-03-06 Thread Doug Blank
On Tue, Mar 5, 2013 at 3:41 PM, Jeff Hardy wrote: > On Tue, Mar 5, 2013 at 6:12 AM, Doug Blank wrote: >> Looks like there are at least two issues: one where the platform is >> not known (and doesn't know what low level library to open), but the >> lower level issue

Re: [Ironpython-users] Latest status on ctypes?

2013-03-05 Thread Doug Blank
crosoft.Scripting.Interpreter.InterpretedFrame frame) [0x0] in :0 at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x0] in :0 libpython2.7.so does exist, but LoadLibrary doesn't appear to be able to deal with it. Am I using this correctl

[Ironpython-users] Latest status on ctypes?

2013-03-04 Thread Doug Blank
Wondering what the status is on ctypes with IronPython. I had an older version of ctypes.py that was referencing a previous dll: ImportError: No module named IronPython.Runtime.Calls The CPython 2.7 ctypes directory doesn't load: python>>> import ctypes Traceback (most recent call last): File

Re: [Ironpython-users] IronPython localization?

2013-03-04 Thread Doug Blank
Jeff Hardy wrote: > On Wed, Feb 27, 2013 at 5:13 AM, Doug Blank wrote: >> What support does IronPython have for localization for itself? In >> other words, what support does it have for showing, say, Python error >> messages in another human language? Could it use CPython's l

[Ironpython-users] IronPython localization?

2013-02-27 Thread Doug Blank
What support does IronPython have for localization for itself? In other words, what support does it have for showing, say, Python error messages in another human language? Could it use CPython's locale, gettext files? -Doug ___ Ironpython-users mailing l

Re: [Ironpython-users] Type Error: not all arguments converted during string formatting

2012-12-13 Thread Doug Blank
Could it be that you have a \N in your filename? Shouldn't that be \\N? -Doug ___ Ironpython-users mailing list Ironpython-users@python.org http://mail.python.org/mailman/listinfo/ironpython-users

Re: [Ironpython-users] Separating return values from printed values?

2012-09-20 Thread Doug Blank
On Thu, Sep 20, 2012 at 11:48 AM, Keith Rome wrote: > That should be fine. My example was the simplest way possible to spin up a > script, so I didn't bother with an explicit scope. But that doesn't change > anything really. Also if you re-use the same engine many times, you only > really need

Re: [Ironpython-users] Separating return values from printed values?

2012-09-20 Thread Doug Blank
way using this interface, or is our code too much, and we could get by with less? -Doug > Keith Rome > Senior Consultant and Architect > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > Wintellect | 770.617.4016 | kr...@wintellect.com > www.wintellect.com > > -Orig

[Ironpython-users] Separating return values from printed values?

2012-09-19 Thread Doug Blank
IronPython users, Interesting question: we have IronPython embedded in a nice little educational GUI, and have the DLR output sent to our text output window where we can control the font color, etc. In teaching CS, it is always hard to try to get across the difference between a "return value" and

Re: [Ironpython-users] Debugging IronPython

2012-05-31 Thread Doug Blank
On Thu, May 31, 2012 at 10:04 AM, David, Al wrote: > We’re developing a C#, WPF, .NET application.  And the purpose of this > application is to communicate with and control custom hardware (circuit > boards) as well as instrumentation (oscilloscopes, power supplies, etc). > > > > This application

Re: [Ironpython-users] Guidelines for embedding Python libraries in installers

2012-05-08 Thread Doug Blank
On Tue, May 8, 2012 at 9:11 AM, Cesar Mello wrote: > Hi! > > Please I would like to know if there is any recommendation for embedding > Python libraries together with IronPython in applications. I'm asking this > just to know if there is a path to follow towards some "ecosystem" regarding > Python

Re: [Ironpython-users] IronPython Samples

2012-04-04 Thread Doug Blank
Jeff, I'd be glad to send you a Python Gtk example. That would be a graphical sample that runs on all platforms. -Doug On Wed, Apr 4, 2012 at 11:54 PM, Jeff Hardy wrote: > I've put together a set of IronPython samples: > https://github.com/jdhardy/IronPythonSamples. They're still a bit > early,

Re: [Ironpython-users] Passing an IronPython function to C#

2012-03-17 Thread Doug Blank
On Sat, Mar 17, 2012 at 6:51 PM, Dino Viehland wrote: > > > Jeff wrote: >> IronPython's conversion code is, um, interesting -- Dino might understand it >> all, >> but I don't know if anyone else does -- so it's possible two different sets >> of >> conversions are being chosen. Now, this >> *shou

Re: [Ironpython-users] Passing an IronPython function to C#

2012-03-16 Thread Doug Blank
On Fri, Mar 16, 2012 at 11:36 AM, Jeff Hardy wrote: > On Fri, Mar 16, 2012 at 4:24 AM, Doug Blank wrote: >> This is looking more and more like a bug. I see from >> http://stackoverflow.com/questions/799987/how-to-pass-a-lambda-expression-to-a-c-sharp-constructor-from-an-

Re: [Ironpython-users] Passing an IronPython function to C#

2012-03-16 Thread Doug Blank
On Thu, Mar 15, 2012 at 9:22 PM, Doug Blank wrote: > I am attempting to pass an IronPython function into the following C# > functions, which I import into IronPython: > >        public static Func getFunc1(params Func [] functions) { >                ret

[Ironpython-users] Passing an IronPython function to C#

2012-03-15 Thread Doug Blank
I am attempting to pass an IronPython function into the following C# functions, which I import into IronPython: public static Func getFunc1(params Func [] functions) { return functions[0]; } public static Func getFunc2(IList> functions) {

[Ironpython-users] Simulating Python's scoping at the DLR level

2011-12-20 Thread Doug Blank
What would be a good way to simulate Python's scoping rules at the DLR level? For example, if I were running two DLR-based scripts, I can just use the same ScriptScope for both to have shared globals. But how would you replicate Python's exact idea of a local environment in each, while falling ba

Re: [Ironpython-users] Beginner question.

2011-12-02 Thread Doug Blank
On Fri, Dec 2, 2011 at 3:04 PM, Jeff Hardy wrote: > I wouldn't be surprised if you were one of the first people to try > this particular combination. However, anything that works from C# > should work from IronPython (except possibly unsafe code). > > Translating C# to IronPython is fairly straigh

Re: [Ironpython-users] Setting __name__ to __main__

2011-11-23 Thread Doug Blank
Perhaps this is what you are thinking of: PythonEngine engine = new PythonEngine(pyEngineOptions); engine.DefaultModule = engine.CreateModule("__main__", true); From: http://ironpython.codeplex.com/workitem/2537 -Doug On Wed, Nov 23, 2011 at 1:13 PM, Dino Viehland wrote: > I think there's a M

Re: [Ironpython-users] IronPython Ubuntu 11.10 Beta 2

2011-10-04 Thread Doug Blank
On Tue, Oct 4, 2011 at 7:11 AM, Matthias Klose wrote: > On 10/04/2011 12:47 PM, Doug Blank wrote: >> On Tue, Oct 4, 2011 at 5:36 AM, Matthias Klose wrote: >>> On 10/04/2011 09:52 AM, Christopher Tottle wrote: >>>> Hi All, >>>> >>>>  Dose an

Re: [Ironpython-users] IronPython Ubuntu 11.10 Beta 2

2011-10-04 Thread Doug Blank
On Tue, Oct 4, 2011 at 5:36 AM, Matthias Klose wrote: > On 10/04/2011 09:52 AM, Christopher Tottle wrote: >> Hi All, >> >>  Dose anybody know why IronPython has been removed from Ubuntu 11.10 Beta 2? >> as it was in Beta 1 >> >>  http://www.ubuntuupdates.org/packages/show/332742 > > IronPython wa

Re: [Ironpython-users] Options for debugger for DLR languages on Mono

2011-09-27 Thread Doug Blank
try to come up with a small example for a bug report. Thanks! -Doug >> -Original Message- >> From: ironpython-users- >> bounces+dinov=exchange.microsoft....@python.org [mailto:ironpython- >> users-bounces+dinov=exchange.microsoft@python.org] On Behalf Of >> Do

Re: [Ironpython-users] Options for debugger for DLR languages on Mono

2011-09-26 Thread Doug Blank
way that I can from outside that script (eg, from the IronPython hosting app) get tracing on. I can probably write some of this in C# if I need to, but all of the hosting app is written in IronPython at the moment. -Doug > -----Original Message- > From: Doug Blank [mailto:doug.bl...@gmail.co

Re: [Ironpython-users] Options for debugger for DLR languages on Mono

2011-09-24 Thread Doug Blank
ailto:ironpython- >> users-bounces+dinov=exchange.microsoft@python.org] On Behalf Of >> Doug Blank >> Sent: Saturday, September 24, 2011 10:48 AM >> To: Dino Viehland >> Cc: ironpython-users@python.org >> Subject: Re: [Ironpython-users] Options for debugger

Re: [Ironpython-users] Options for debugger for DLR languages on Mono

2011-09-24 Thread Doug Blank
Use of sys.settrace (especially with the bdb.py) makes the Python debugger really easy. However, I'm having one little issue: I want to set the trace from outside the running code. Currently, I'm running a Python file like this: source = engine.CreateScriptSourceFromFile(filename) source.Compile()

Re: [Ironpython-users] Options for debugger for DLR languages on Mono

2011-09-23 Thread Doug Blank
et the students to do it... ;-)   ) PyTools is written in C# >> mostly, looks like, with a sprinkling of C++/unsafe native code, but >> not in the debuggers. They look like straight cs. >> I have no idea what MonoDevelop looks like under the hood. >> But between the two, I wou

[Ironpython-users] Options for debugger for DLR languages on Mono

2011-09-19 Thread Doug Blank
IronPython users, We have a fairly robust editor/shell written in IronPython, using Gtk#, running under cross-platform Mono with abilities to switch between many languages (including Python, Ruby, Scheme, Lua, FSharp, CSharp, Boo, and a new visual Scratch-based language called Jigsaw. Although not

Re: [Ironpython-users] Compiling IronPython for .NET 2.0

2011-07-28 Thread Doug Blank
On Thu, Jul 28, 2011 at 3:07 AM, Markus Schaber wrote: > Hi, > >> [Compiling IPy 2.7 for a pure .NET 2.0] > > I did try to patch some of the problems > > g...@github.com:markusschaber/IronLanguages.git (2.7-maint branch) > > Now I have about 270 problems mostly relating to extension methods, > may

Re: [Ironpython-users] Assembly references: file does not exist?

2011-07-14 Thread Doug Blank
On Thu, Jul 14, 2011 at 7:59 AM, Dave Peterson wrote: > Turns out that I can put an ipy.exe.config in the install location of > IronPython and get my assembly to load. > > Does anyone know if there's an equivalent programmatic way to do this?  For > example, can I import the clr module, call som

Re: [Ironpython-users] How can IronPython access a public static value defined in C#?

2011-06-20 Thread Doug Blank
On Mon, Jun 20, 2011 at 2:40 AM, Markus Schaber wrote: > Hi, Doug, > >> Von: Doug Blank > > [> ] >> On Sun, Jun 19, 2011 at 3:06 AM, Abubakar wrote: >> > try reading the following, maybe that'll explain: >> > http://stackoverflow.com/quest

Re: [Ironpython-users] How can IronPython access a public static value defined in C#?

2011-06-19 Thread Doug Blank
On Sun, Jun 19, 2011 at 3:06 AM, Abubakar wrote: > try reading the following, maybe that'll explain: > http://stackoverflow.com/questions/44834/can-someone-explain-all-in-python > ..ab Well, my question was about how to do that in C#. I can indeed do this: public static class Myro { public rea

Re: [Ironpython-users] How can IronPython access a public static value defined in C#?

2011-06-18 Thread Doug Blank
On Sat, Jun 18, 2011 at 1:56 PM, Dino Viehland wrote: [snip] >> Is there something I can do to make white accessible with "from ... import >> *"? > > If you mark the field as readonly we'll let you import it using import *. > Without > it being read-only we don't put it in Graphics.__all__ and

Re: [Ironpython-users] How can IronPython access a public static value defined in C#?

2011-06-18 Thread Doug Blank
I asked: Consider this C# code: public static class Graphics {  public static Color white = new Color(255, 255, 255); } I can compile and import this from IronPython: >>> import clr >>> clr.AddReference("Graphics") >>> import Graphics >>> Graphics.white But I can't: >>> import clr >>> clr.Ad