Re: how to simulate tar filename substitution across piped subprocess.Popen() calls?

2012-11-12 Thread Rebelo
Dana četvrtak, 8. studenoga 2012. 19:05:12 UTC+1, korisnik jkn napisao je: > Hi All > > i am trying to build up a set of subprocess.Ponen calls to > > replicate the effect of a horribly long shell command. I'm not clear > > how I can do one part of this and wonder if anyone can advise. I'm o

Re: help me debug my "word capitalizer" script

2012-08-22 Thread Rebelo
> Let's move to Bug #2: > > 2. How do I escape the words that are already in uppercase? For example: > > > > The input file has this: > > NASA > > > > The script changes this to: > > Nasa > > > > Is it possible to make this script look at a word, see if its first > > character is cap

Re: webapp development in pure python

2011-10-26 Thread Rebelo
Try Pylons. Use html templates which get populated with data from your database and then just render them. If you just want to display data, with simple forms for editing and adding Pylons framework is more then enough. http://pylonsbook.com/en/1.1/ http://www.pylonsproject.org/ -- http://mail.

Re: SqlAlchemy: remote connection on problem on mysql database

2010-07-09 Thread Rebelo
from SQLAlchemy docs (http://www.sqlalchemy.org/docs/ dbengine.html#database-engine-options): " create_engine() URL Arguments SQLAlchemy indicates the source of an Engine strictly via RFC-1738 style URLs, combined with optional keyword arguments to specify options for the Engine. The form of the U

Re: Python scripts from DOS

2010-07-09 Thread Rebelo
On 9 srp, 11:37, Mark Carter wrote: > On my machine, I can go to a DOS shell, and type >    myscript.py > This will cause the script to be run as a python script. So that bit > works. > > On another machine, on which python was set up without admin > privileges, if I type >    myscript.py > it wil

Re: scraping from bundes-telefonbuch.de with python

2010-06-19 Thread Rebelo
On 19 lip, 12:23, davidgp wrote: > hello, i'm new on this group, and quiet new to python! > i'm trying to scrap some adress data from bundes-telefonbuch.de but i > run into a problem: > the link is like > this:http://www.bundes-telefonbuch.de/cgi-btbneu/chtml/chtml?WA=20 > and it is basically the

Re: Hashbang error

2010-06-01 Thread Rebelo
On 06/01/2010 12:56 PM, pradeepbpin wrote: I use gVim as an editor to create python scripts on a windows machine. To run the same script on my ubuntu machine, I added a hashbang line to the script. Now when I run this script from command line of ubuntu, I get a bad interpreter error, like below

Re: Iterating over dict and removing some elements

2010-05-12 Thread Rebelo
On 05/11/2010 05:08 PM, Ulrich Eckhardt wrote: Hi! I wrote a simple loop like this: d = {} ... for k in d: if some_condition(d[k]): d.pop(k) If I run this, Python complains that the dictionary size changed during iteration. I understand that the iterator relies on th

Re: Linux servers, network and file names

2010-04-23 Thread Rebelo
Infinity77 wrote: Hi All, I apologize in advance if this sounds like a stupid question but I am really no expert at all in network things, and I may be looking in the wrong direction altogether. At work we have a bunch of Linux servers, and we can connect to them with our Windows PCs over a net

Re: msvcr90.dll is MIA?

2010-04-14 Thread Rebelo
> Alex Hall wrote: but I still have no dll. I installed vs2005, but apparently I need vs2008, which I cannot find. -- http://mail.python.org/mailman/listinfo/python-list http://www.microsoft.com/express/Downloads/ -- http://mail.python.org/mailman/listinfo/python-list

Re: missing dll follow-up

2010-04-14 Thread Rebelo
Alex Hall wrote: Hi again, I said "msvcr90.dll", but I meant "msvcp90.dll". In either case, I cannot locate the dll to include in my project and I am not sure what else I can do. The vcredist_x86 was, I thought, supposed to give me the dll, but it does not seem to have done so. i think that you

Re: Preserving logging streams through a daemon.DaemonContext switch

2010-04-08 Thread Rebelo
Ben Finney wrote: Vinay Sajip writes: On Apr 8, 1:58 pm, Rebelo wrote: Vinay Sajip wrote: My guess is - files_preserve needs to be passed a file handle and not alogginghandler. This is correct. As the ‘DaemonContext.__init__’ docstring says:: | `files_preserve` | :Default

Re: daemon.DaemonContext

2010-04-08 Thread Rebelo
Vinay Sajip wrote: On Apr 8, 1:58 pm, Rebelo wrote: Vinay Sajip wrote: On Apr 8, 1:28 pm, Rebelo wrote: when i use this : context = daemon.DaemonContext(stdin=sys.stdin, stdout=sys.stdout, files_preserve=[fh], signal_map = {signal.SIGTERM: 'terminate',signal.SIGHUP: 'termi

Re: daemon.DaemonContext

2010-04-08 Thread Rebelo
i found a crude workaround: i wrote a function in which i start logging after deamon starts -- http://mail.python.org/mailman/listinfo/python-list

Re: daemon.DaemonContext

2010-04-08 Thread Rebelo
Vinay Sajip wrote: On Apr 8, 1:28 pm, Rebelo wrote: when i use this : context = daemon.DaemonContext(stdin=sys.stdin, stdout=sys.stdout, files_preserve=[fh], signal_map = {signal.SIGTERM: 'terminate',signal.SIGHUP: 'terminate'}) i don't get error but i still can'

Re: daemon.DaemonContext

2010-04-08 Thread Rebelo
when i use this : context = daemon.DaemonContext(stdin=sys.stdin, stdout=sys.stdout, files_preserve=[fh], signal_map = {signal.SIGTERM: 'terminate',signal.SIGHUP: 'terminate'}) i don't get error but i still can't write to log file what am i doing wrong? -- http://mail.python.org/mailman/listinfo

daemon.DaemonContext

2010-04-08 Thread Rebelo
i get : IOError: [Errno 9] Bad file descriptor when i have logging and using daemon.DaemonContext() i tried passing : fh = logging.handlers.TimedRotatingFileHandler(LOG_FILENAME, 'midnight', encoding='utf-8') with : context = daemon.DaemonContext() context.files_preserve=[fh] but no good what a

Re: Getting Local MAC Address

2010-04-07 Thread Rebelo
Lawrence D'Oliveiro wrote: In message , Booter wrote: I am new to python ans was wondering if there was a way to get the mac address from the local NIC? What if you have more than one? you can try with netifaces : http://pypi.python.org/pypi/netifaces/0.3 I use them on both Windows and L