ANN: Resolver One 1.3 released

G

Giles Thomas

We are proud to announce the release of Resolver One, version 1.3.
Resolver One is a spreadsheet that allows you to write Python directly
in cells, and converts the spreadsheets you create into Python
programs. It's based on IronPython, and runs on Windows.

For version 1.3, we've made two big changes:

* Our Web server, which (as you would expect) allows you to expose
your spreadsheets to other people as web applications, is now included
- it was previously a commercial-only product.
* We've added column- and row-level formulae. With these, you can
specify one formula which is then used to fill in a whole column or
row, reducing duplication and starting to bring some of the benefits
of loops to the spreadsheet world.

We've done a screencast outlining both of these: <http://
www.resolversystems.com/screencasts/release-1.3/>

Michael Foord also did a great screencast describing how you can use
Python-syntax formulae with column-level formulae to do interesting
stuff: <http://www.resolversystems.com/screencasts/column-formulae/>

Resolver One is free for non-commercial use, so if you would like to
take a look, you can download it from our website: <http://
www.resolversystems.com/download/>


Best regards,

Giles
--
Giles Thomas
MD & CTO, Resolver Systems Ltd.
(e-mail address removed)
+44 (0) 20 7253 6372

Try out Resolver One! <http://www.resolversystems.com/get-it/>

17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79 Registered in England and Wales as company
number 5467329.
Registered address: 843 Finchley Road, London NW11 8NA, UK
 
J

Jules Stevenson

Hi,

I have a list which contains a folder structure, for instance:

dirs=['c:\', 'temp', 'foo', 'bar']

The length of the list can vary. I'd like to be able to construct a
os.path.join on the list, but as the list can vary in length I'm unsure how
to do this neatly. I figured I could use a for loop and build the whole
statement as a string and 'eval it', but I'm aware that this is not a good
idea.

It strikes me that there probably is a very elegant way to achieve what I
want to do, any pointers much appreciated.

Cheers,

Jules
 
T

Tim Chase

I have a list which contains a folder structure, for instance:
dirs=['c:\', 'temp', 'foo', 'bar']

The length of the list can vary. I'd like to be able to construct a
os.path.join on the list, but as the list can vary in length I'm unsure how
to do this neatly.

Sounds like you want argument unpacking:
>>> dirs=['c:\\', 'temp', 'foo', 'bar']
>>> print os.path.join(*dirs)
c:\temp\foo\bar

(side note: you can't have a single trailing backslash like your
example assignment)

The asterisk instructs python to unpack the passed list as if
each one was a positional argument. You may occasionally see
function definitions of the same form:

def foo(*args):
for arg in args:
print arg
foo('hello')
foo('hello', 'world')
lst = ['hello', 'world']
foo(*lst)

You can use "**" for dictionary/keyword arguments as well. Much
more to be read at [1].

-tkc


[1]
http://www.network-theory.co.uk/docs/pytut/KeywordArguments.html
 
J

Jules Stevenson

Sorry for the noise, I found the * unpack operator. Perfect for what I need.
 
S

Steve Holden

Jules said:
Hi,

I have a list which contains a folder structure, for instance:

dirs=['c:\', 'temp', 'foo', 'bar']
Of course this should really be

dirs=['c:\\', 'temp', 'foo', 'bar']

but we'll overlook your little syntax error ;-)
The length of the list can vary. I'd like to be able to construct a
os.path.join on the list, but as the list can vary in length I'm unsure how
to do this neatly. I figured I could use a for loop and build the whole
statement as a string and 'eval it', but I'm aware that this is not a good
idea.

It strikes me that there probably is a very elegant way to achieve what I
want to do, any pointers much appreciated.
Jules:

Don't reply to someone else's post with a new question, please: many
people use "threaded" readers, and will not even see your subject line.

What you need is

os.path.join(*dirs)

which tells Python to take the list and turn it into separate arguments.
Fortunately os.path.join will take as many arguments as you care to pass it:

regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top