Re: [IronPython] Silverlight code need help (Repost)

2010-01-11 Thread Jimmy Schementi
> You must be getting sick of me :-P j/k Na, I'm happy someone's asking this many questions about Silverlight. =) > Ok I have a simple video player setup ultimately I would like to connect it > to a Database. I am writing the database code but I am unsure how to $_GET > a value in IronPython. Al

Re: [IronPython] IronPython 2.6 final: Debugging not working?

2010-01-11 Thread Dino Viehland
Thanks! In that case I think I understand what's going on and it should be fairly simple to fix. > -Original Message- > From: users-boun...@lists.ironpython.com [mailto:users- > boun...@lists.ironpython.com] On Behalf Of Joshua Kramer > Sent: Monday, January 11, 2010 7:57 PM > To: users@l

Re: [IronPython] IronPython 2.6 final: Debugging not working?

2010-01-11 Thread Joshua Kramer
"I ask because I can't seem to hit breakpoints in top-level code at all but so far I reliably hit them in functions - but that may just be the way the races are going on my machine." That is interesting, Dino. At first my debug program was five simple print statements. The debug breakpoint

Re: [IronPython] Silverlight code need help (Repost)

2010-01-11 Thread Andrew Evans
Hello again You must be getting sick of me :-P j/k Ok I have a simple video player setup ultimately I would like to connect it to a Database. I am writing the database code but I am unsure how to $_GET a value in IronPython. Although I will be honest and haven't done to much research as of yet ;-

Re: [IronPython] IronPython 2.6 final: Debugging not working?

2010-01-11 Thread Dino Viehland
What does program.py look like? Is it all top-level code or does it also contain functions and classes? And are the break points in the top-level code or are they in functions/classes? I ask because I can't seem to hit breakpoints in top-level code at all but so far I reliably hit them in func

Re: [IronPython] Can't Get an Image on a Button Ipy Silverlight

2010-01-11 Thread Jimmy Schementi
For archival purposes, here's the answer to this: http://lists.ironpython.com/pipermail/users-ironpython.com/2010-January/011953.html ___ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: [IronPython] Silverlight code need help (Repost)

2010-01-11 Thread Jimmy Schementi
And to answer your initial question about images in buttons, here's how to do it: from System.Windows.Controls import Button, Image from System.Windows.Media.Imaging import BitmapImage btn = Button( Width = 25, Height = 20, Content = Image( Source = BitmapImage(Uri("images/s

Re: [IronPython] Silverlight code need help (Repost)

2010-01-11 Thread Andrew Evans
WOW ty so much at least I wasn't to far off :-P again ty, you saved me from giving up on Silverlight :D On Mon, Jan 11, 2010 at 1:37 PM, Jimmy Schementi < jimmy.scheme...@microsoft.com> wrote: > You can attach Visual Studio to a running Silverlight process, and > breakpoints will be hit in you

Re: [IronPython] Silverlight code need help (Repost)

2010-01-11 Thread Jimmy Schementi
You can attach Visual Studio to a running Silverlight process, and breakpoints will be hit in your Silverlight code if you set the debug flag in the HTML page hosting Silverlight: This only works if VS 2008 SP1 has the Silverlight 3 Tools (http://www.microsoft.com/downloads/details.aspx

Re: [IronPython] Silverlight code need help (Repost)

2010-01-11 Thread Jimmy Schementi
The error you're probably seeing is "AttributeError: 'Duration' object has no attribute 'CurrentState'," correct (line highlighted below)?. This is because MediaElement.NaturalDuration gives you a System.Windows.Duration object (http://msdn.microsoft.com/en-us/library/system.windows.duration(VS.

[IronPython] Silverlight code need help (Repost)

2010-01-11 Thread Andrew Evans
I am having problems with my code. I am not sure how to debug silverlight. I receive no error messages, but this is what happens. When this app runs it starts for a second then disappears I am not sure where I am going wrong, any ideas? Perhaps in the threading? I am not a C# programmer but I am d

Re: [IronPython] Converting C# to Python ... the lock() keyword?

2010-01-11 Thread Dino Viehland
Correct - threading.Lock is a custom lock implementation (it's also non-reentrant) so if you need to interoperate Monitor is the way to go. > -Original Message- > From: users-boun...@lists.ironpython.com [mailto:users- > boun...@lists.ironpython.com] On Behalf Of Sandy Walsh > Sent: Monda

Re: [IronPython] Converting C# to Python ... the lock() keyword?

2010-01-11 Thread Sandy Walsh
Thanks for the prompt answer Dino. The lock is defined in a C# library and I have to access it ... I assume Monitor and threading.Lock() are different implementations (specifically, you can't mix and match)? I can live with the Monitor for now I think. Thanks again! -Sandy On 1/11/2010 2:2

Re: [IronPython] Converting C# to Python ... the lock() keyword?

2010-01-11 Thread Dino Viehland
If you really want to use .NET monitors you can code it up as a try/finally: Monitor.Enter(m_object) try: if ...: ... finally: Monitor.Exit(m_object) If you'd like to do a slightly more Pythonic lock you could do: import threading x = threading.Lock() with x:

[IronPython] Converting C# to Python ... the lock() keyword?

2010-01-11 Thread Sandy Walsh
Hi, I'm converting a C# program to IronPython and running into the C# lock() command ... what is the equivalent operation in IronPython? The C# is like: lock(m_object) if (...) { ... } Thanks! -Sandy <>___ Users mailing list Use

[IronPython] Using IronPython and IronRuby from C# 4.0

2010-01-11 Thread Mohammad Tayseer
Hello I'm going to give a session about new features in C# 4.0 in Cairo Code Camp (), and I was thinking of illustrating using Python and Ruby libraries from C# 4, instead of the repeated COM interoperability. I was thinking of presenting BeautifulSoup, SqlAlchemy and/or Rails ActiveRecord, as

[IronPython] serial ports and arduinos

2010-01-11 Thread Ale Fernandez
Hi, I'm trying to figure out how to interface an arduino microcontroller to an ironpython script using serial comms. Has anyone done this before? Or, has anyone just used the serial comms functionality in IronPython, and if so, how have you tested this? I could only find one reference to it on th