Re: script for seconds in given month?

2007-04-23 Thread edfialk
Alex, very nice.  Thank you.

Unfortunately, I just found out the platform for using the script will
be IronPython, not Python.  So, importing calendar in IronPython gives
me:
SyntaxError: future feature is not defined: with_statement (c:
\Python25\Lib\calendar.py, line 8)

so, compatibility issue.

I'm extremely grateful for everyone's help so far and I have moved my
question over to an IronPython group, but does anyone happen to know
of a way to make this work with IronPython?

Thanks!
-Ed

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: script for seconds in given month?

2007-04-23 Thread edfialk
Alex, very nice.  That should be good enough for me.
The rest of you as well, thanks for all the help.

I, unfortunately, failed to realize the actual platform the script is
for is IronPython.  When trying to import calendar in IronPython, I
get:

SyntaxError: future feature is not defined: with_statement (c:
\Python25\Lib\calendar.py, line 8)

so, incompatible.  I have moved my question over to the IronPython
group, but if anyone is familiar with IronPython and knows how to
perform the same function, that's what I'm looking for now. :)

Thanks again!
-Ed

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: script for seconds in given month?

2007-04-16 Thread edfialk
Jim: I need years too, basically from 1960-2000.  Don't want to
hardcode all those days :)

Matt: Thanks, I will try this out.

Paul: I don't believe we need leap seconds.  Leap days definitely.

I'll let you know how Matt's code works.  Any other suggestions feel
free to let me know.

Thanks all!
-Ed

-- 
http://mail.python.org/mailman/listinfo/python-list


script for seconds in given month?

2007-04-16 Thread edfialk
Hi, does anyone happen to know of a script that would return the
number of seconds in a month if I give it a month and a year?

My python is a little weak, but if anyone could offer some suggestions
I think I could handle it myself, or if anyone happens to know of a
script already written that performs this I would be extremely
grateful.

Thanks!
-Ed

-- 
http://mail.python.org/mailman/listinfo/python-list


Interface in IronPython

2007-03-12 Thread edfialk
Hi all, I'm pretty much totally new to IronPython and have come to the
point that I need an interface to interact with a co-worker's code,
but I can't seem to find any documents or discussion on syntax for
writing an interface.

Does anyone know of a link that talks about interfaces in IronPython
or feel like explaining one too me? :)

Any advice would be greatly appreciated.
Thanks.
-Ed

-- 
http://mail.python.org/mailman/listinfo/python-list


IronPython with Apache

2007-03-07 Thread edfialk
Hi all, I'm completely new to Python, but fairly experienced in PHP
and few other languages.

Long story short: The IronPython executable doesn't work for .cgi
scripts in my browser.


I've been assigned to write a service that pulls in parameters from
the URL, accesses a file and serves some data through a CSV.  The only
problem I foresee myself is accessing and reading this file, which is
a 'hyper-cube' in that it has many dimensions of data.

Anyway, the code for reading and writing this cube was already written
by a coworker in IronPython and .NET.  Again, I'm totally new to
Python but as I'm stepping through trying to pick out pieces that I
need, I can't even import clr.

So, I'm told I need IronPython, which I get, and I replace the #!c:
\Python25\python.exe with the IronPython executable (#!c:
\IronPython-1.0.1\ipy.exe), but I get a 500 Internal Server error and:

"[Wed Mar 07 17:02:21 2007] [error] [client 127.0.0.1] malformed
header from script. Bad header=  File , line 0, in __import__:
testing.cgi" in the Error log.

Does anyone know how to set up this 'IronPython' through Apache so I
can use it to read/write data?

Any help would be greatly appreciated.
Thanks!
-Ed

-- 
http://mail.python.org/mailman/listinfo/python-list