Re: Shutdown Mac OSX computer using python

2008-12-08 Thread Wolfgang Draxinger
) Must be run as root, won't work otherwise. You can however add to sudoers (man visudo) shutdown as NOPASSWD program for the users that want to execute the script and use "sudo shutdown ..." instead of just "shutdown ..." Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python barcode decoding

2008-10-28 Thread Wolfgang Draxinger
2D code, but this certain library is excellent: http://www.libdmtx.org/ Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list

Re: Exit from os.chroot()

2008-06-04 Thread Wolfgang Draxinger
/bin there: mount --bind /usr/bin $chroot/usr/bin The same has to be done with all library stuff. Another option would be to place a statically linked busybox and it's subprogram links into the chroot Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867

Re: Problem creating a shorcut

2008-05-16 Thread Wolfgang Draxinger
gram Files\Mozilla Firefox\firefox.exe However the path largely differs from system to system. On *nix systems you normally have all programs in $PATH, so a non full qualified path would be sufficient. On Windows this works, too, _IF_ the installation directory of the to be used application get's added to the PATH environment variable. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list

Re: Solve a Debate

2008-02-17 Thread Wolfgang Draxinger
ions forward, where it hits the assign instruction, which assignes a value from a table by an index given into a variable. We're not talking about Python here. I introduced this "architecture" just to showcase that even in the most "optimal" situation, where special RISC o

Re: Solve a Debate

2008-02-17 Thread Wolfgang Draxinger
e thinking of Python you can bet, that an opcode will not contain all information, but have the operands encoded in additional values, consuming memory. Look up Table is more efficient: Debate solved. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list

Re: How to autorun a python script when a specific user logs on?

2008-02-08 Thread Wolfgang Draxinger
oot password for the gateway. If you're still up on making screenshots, I'd recommend to install a VNC deamon, as a _system service_(!), to which the alarm action program connects to make screenshots. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 1346828

Re: HTTP POST uploading large files

2008-01-20 Thread Wolfgang Draxinger
Paul Rubin wrote: > Wolfgang Draxinger <[EMAIL PROTECTED]> writes: >> Am I just blind for some urllib2/httplib feature, or some >> other library? Or do I really have to fiddle around with >> sockets myself (I hope not...). > > I did something like that by just o

HTTP POST uploading large files

2008-01-19 Thread Wolfgang Draxinger
nd with sockets myself (I hope not...). Thanks in advance Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to protect my new commercial software.

2007-12-14 Thread Wolfgang Draxinger
information to deobfuscate it. So even self modifying code doesn't help here. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list

Re: How python writes text into another windows application

2007-10-30 Thread Wolfgang Draxinger
nterface you have to reimplement the stuff from grounds up. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list

Re: File Read Cache - How to purge?

2007-08-21 Thread Wolfgang Draxinger
Marc 'BlackJack' Rintsch wrote: > You mean reading the file without actually reading it!? :-) Linux provides its specific syscall 'readahead' that does exactly this. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://

Re: Best programs written completly in Python

2007-08-06 Thread Wolfgang Draxinger
e. Especially you don't have to use the standard frontends, but can also use BitTorrent modules in your own Python programs. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list

Webmail application for mod_python

2007-05-31 Thread Wolfgang Draxinger
off in this NG: webmail apps for mod_perl or mod_ruby would be acceptable, too. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting directory contents

2007-02-21 Thread Wolfgang Draxinger
essing a _large_ distributed Oracle9i DB - a query can take up to half a minute, so obviously I'm caching the results of previous queries in the mentioned files, where the modification time is the sorting criterium for later reading. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAI

Re: Sorting directory contents

2007-02-20 Thread Wolfgang Draxinger
rt will sort on mtime, then on filename > # > flist.sort() > # > # Extract a list of the filenames only and return it > # > return [x[1] for x in flist] > # > # or if you only want the basenames of the files > # > #return [os.pa

Re: Sorting directory contents

2007-02-20 Thread Wolfgang Draxinger
es.sort() filenames = list() for mtime in mtimes: fnames = files_dict[mtime] fnames.sort() for fname in fnames: filenames.append(fname) return filenames Wolfgang Draxinger -- E-Mail address works, Jab

Sorting directory contents

2007-02-20 Thread Wolfgang Draxinger
tinue src_file_paths[os.stat(fpath).st_mtime] = fpath for ftime in src_file_paths.keys().sort(): read_and_concatenate(src_file_paths[ftime]) of course listdir and sorting could be done in a separate function, but I wonder if there was a more elegant approach. Wolfgang Draxinger -- E-Mail address

Re: Program eating memory, but only on one machine?

2007-01-22 Thread Wolfgang Draxinger
would know > where to start and would blame some horrible programming on my > end. This just seems like a less straightforward problem. GCC 3.x.x brings other runtime libs, than GCC 4.x.x, I would check into that direction. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list

Re: Tarfile .bz2

2006-12-11 Thread Wolfgang Draxinger
reas the latter is better if you need random access to the individual files. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list

Re: Safely renaming a file without overwriting

2006-10-29 Thread Wolfgang Draxinger
upports hard links and soft links, too but I don't know if those got the same constraints. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E -- http://mail.python.org/mailman/listinfo/python-list

Re: Safely renaming a file without overwriting

2006-10-28 Thread Wolfgang Draxinger
fore I make more dumb mistakes/typos... Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E -- http://mail.python.org/mailman/listinfo/python-list

Re: Safely renaming a file without overwriting

2006-10-28 Thread Wolfgang Draxinger
7;t close them. You have to close it, to remove all remains of it. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E -- http://mail.python.org/mailman/listinfo/python-list

Re: Safely renaming a file without overwriting

2006-10-28 Thread Wolfgang Draxinger
dissappears from the >> file system) but the opening process can still access it. >> >> 4: close the file -> the lock is removed and the rename >> finalized. The open is to happen on the new file name with O_CREAT | O_EXCL flags. Sorry, I forgot that to mention explicitly.

Re: Safely renaming a file without overwriting

2006-10-28 Thread Wolfgang Draxinger
he file system) but the opening process can still access it. 4: close the file -> the lock is removed and the rename finalized. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E -- http://mail.python.org/mailman/listinfo/python-list

Re: Higher-level OpenGL modules

2006-09-05 Thread Wolfgang Draxinger
Leon wrote: > http://www.processing.org/reference/index.html). The closest > thing I could find was devachan - Hava a look at Amanith http://www.amanith.org OpenGL is that "low" level by design. Everything beyond is to be packed into other libraries. Wolfgang Draxinger -- E-Ma

Re: What are decorated functions?

2006-08-22 Thread Wolfgang Draxinger
Daniel O'Brien wrote: > How one actually makes use of decorators beyond the above is an > exercise of imagination. Now it rings a bell, thx. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A64

Can, and if yes how could this be done elegant?

2006-08-22 Thread Wolfgang Draxinger
mething like POV Scene Description Language or similair). Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E -- http://mail.python.org/mailman/listinfo/python-list

What are decorated functions?

2006-08-22 Thread Wolfgang Draxinger
I'm just reading the python language reference and came around the term "decorated functions", but I have no idea, for what they could be used. Any reply gracefully accepted. Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 GPG key FP: 2FC8