Re: distutils setup ignoring scripts
Quoting Raseliarison nirinA <[EMAIL PROTECTED]>: > "Jack Orenstein" wrote: > > > I'm using Python 2.2 on RH9. I have a set of Python modules > > organized > > into a root package and one other package named foobar. setup.py > > looks > > like this: > > > > from distutils.core import setup > > > > setup( > > name = 'foobar', > > version = '0.3', > > description = 'Foo Bar', > > author = 'Jack Orenstein', > > author_email = '[EMAIL PROTECTED]', > > packages = ['', 'xyz'], > > scripts = ['bin/foobar'] > > ) > > > > The resulting package has everything in the specified directories, > > but > > does not include the script. I've tried making the path bin/foobar > > absolute, but that doesn't help. I've googled for known bugs of this > > sort but have come up emtpy. (The first line of bin/foobar is > > #!/usr/bin/python.) > > > > I've also tried using DISTUTIL_DEBUG, which has been uninformative, > > (e.g. no mention of bin/foobar at all). > > > > Can anyone see what I'm doing wrong? > > i think there's nothing wrong. > the script (i guess you mean the setup.py file) is not included > into the package because you haven't specified it to be so. No, I'm referring to bin/foobar, as specified in "scripts = ['bin/foobar']". Jack This message was sent using IMP, the Internet Messaging Program. -- http://mail.python.org/mailman/listinfo/python-list
Re: distutils setup ignoring scripts
Quoting Raseliarison nirinA <[EMAIL PROTECTED]>: > Jack wrote: > > No, I'm referring to bin/foobar, as specified > > in "scripts = ['bin/foobar']". > > yes i'm deadly wrong and should refuse the > temptation to guess! > and ougth to read clearly the post. > so, you want the script foobar included in your package? > what command are you issueing? The tool I'm developing has two python packages (root and 'foobar' in my earlier email), and one script. I want to package up the packages and the script so that when an installer installs, he gets the two packages and the script. I created the package as "python ./setup.py sdist". > > does this include the file? > python setup.py sdist No, that's what I tried. > as you use Python22 on RH9, maybe: > python setup.py bdist_rpm --install-script foobar Is install-script really needed? I would have thought that specifying setup( ... scripts = [...] ...) would suffice, based on the python docs. Jack This message was sent using IMP, the Internet Messaging Program. -- http://mail.python.org/mailman/listinfo/python-list
Re: Rounding up to the nearest exact logarithmic decade
Quoting Derek Basch <[EMAIL PROTECTED]>: > Given a value (x) that is within the range (1e-1, 1e7) how do I round > (x) up to the closest exact logarithmic decade? For instance: How about this: def roundup(x): if x < 1: return 1 else: return '1' + ('0' * len(str(int(x Jack Orenstein -- http://mail.python.org/mailman/listinfo/python-list
Re: using PyShell, or other shells?
Quoting John Salerno <[EMAIL PROTECTED]>: > I'm interested in trying out shells other than IDLE, and I found > PyShell, but I'm not sure how to get it exactly. Is there a way to get > it without installing wxPython, or is it a part of it? I can't find much > reference to it in any of the manuals at wxpython.org (except for a > brief description of what it is, but not *where* it is or how to use it). > > Thanks. And if there are other shells that are newer/better, I'd > appreciate a recommendation. If you're interested in shell-like capabilities inside a Python environment, check out IPython: http://ipython.scipy.org. If you want Python-like capabilities from a traditional shell, check out osh: http://geophile.com/osh. (Disclaimer: I am the developer of osh.) Jack Orenstein -- http://mail.python.org/mailman/listinfo/python-list
Re: To run a python script in all the machines from one server
Quoting [EMAIL PROTECTED]: > >Yogi> I want to run a python script in all the machines that are >Yogi> connected through local network and collect the information about >Yogi> that machine such as HDD size, RAM capacity(with number of slots) >Yogi> ,processer speed etc. > >Yogi> But i want to run a script from just the server, so that it should >Yogi> start scripts in all other machines, and get their local machines >Yogi> information and dump the same information in some FTP. > >Yogi> Could you please let me know how can i do this?? > > Take a look at Nagios and plugins line nrpe. Another possibility is osh (http://geophile.com/osh). You could do something like this: osh @your_cluster [ f 'your_function' ] $ - your_cluster: logical name for the cluster. - your_function: A python function you write to be run on each host. - $: Prints information from each node as a python tuple. You could, instead of printing with $, pipe the result to other osh commands to further process the tuples containing information from each host. I wouldn't recommend this if the hosts are Windows since osh hasn't been tested on Windows. Jack Orenstein (author of osh) -- http://mail.python.org/mailman/listinfo/python-list