Re: Problem in using Pulp

2006-12-21 Thread [EMAIL PROTECTED]
Thanks, now I am not getting that error, but now I am getting a different error: -error--- GLPK("C:\Documents and Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\"").solve(prob) File "C:\Documents and Settings\Amit\Desktop\pulp\pulp.py", line 11

Re: Problem in using Pulp

2006-12-21 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Thanks, now I am not getting that error, but now I am getting a > different error: > -error--- >GLPK("C:\Documents and > Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\"").solve(prob) > File "C:\Documents and Setting

Re: Need Simple Way To Determine If File Is Executable

2006-12-21 Thread Tim Roberts
Sebastian 'lunar' Wiesner <[EMAIL PROTECTED]> wrote: > >Fredrik Lundh <[EMAIL PROTECTED]> schrieb > >> Sebastian 'lunar' Wiesner wrote: >> you're confusing the shell's "is this file executable" check with the loader's "can I execute this file" check: >... >Well, that doesn't tell us anyt

Weekly Python Patch/Bug Summary

2006-12-21 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 420 open ( +6) / 3510 closed (+12) / 3930 total (+18) Bugs: 944 open ( -5) / 6391 closed (+15) / 7335 total (+10) RFE : 249 open ( +2) / 245 closed ( +0) / 494 total ( +2) New / Reopened Patches __ cp720 enc

Re: tuple.index()

2006-12-21 Thread Hendrik van Rooyen
"Nick Maclaren" <[EMAIL PROTECTED]> wrote: > "Hendrik van Rooyen" <[EMAIL PROTECTED]> writes: > |> When I looked at the above, I went "tilt" - > > Yes, you are confused :-) Neither the agents nor strings take the > other as 'arguments', but are effectively methods of the I/O object. > Let's co

Re: How a script can know if it has been called with the -i command lineoption?

2006-12-21 Thread Hendrik van Rooyen
"Michele Simionato" <[EMAIL PROTECTED]> wrote: > The subject says it all, I would like a script to act differently when > called as > $ python script.py and when called as $ python -i script.py. I looked > at the sys module > but I don't see a way to retrieve the command line flags, where should

Re: Question about Tkinter windows

2006-12-21 Thread Hendrik van Rooyen
Manuel Malo de Molina wrote: >Hi everyone, this is the first time I use Python. I'm working on an application >using Tkinter and I would like that >the windows could only be opened once, is >there any option to get that? > >I don't know if I've explained myself: what I want is that if the user cl

Re: Decorator for Enforcing Argument Types

2006-12-21 Thread George Sakkis
John Machin wrote: > Bruno Desthuilliers wrote: > > > > > Python is dynamic, and fighting against the language is IMHO a really > > bad idea. The only places where theres a real need for this kind of > > stuff are when dealing with the "outside world" (IOW : inputs and > > outputs). And then packa

Re: Problem in using Pulp

2006-12-21 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > GLPK("C:\Documents and > Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\").solve(prob) ^* * This is a no no - the backslash escapes the last quote... - Hendrik -- http://mail.python.o

Re: How a script can know if it has been called with the -i command lineoption?

2006-12-21 Thread Michele Simionato
Hendrik van Rooyen wrote: > "Michele Simionato" <[EMAIL PROTECTED]> wrote: > > > > The subject says it all, I would like a script to act differently when > > called as > > $ python script.py and when called as $ python -i script.py. I looked > > at the sys module > > but I don't see a way to retrie

Re: removing the header from a gzip'd string

2006-12-21 Thread Fredrik Lundh
Gabriel Genellina wrote: > Using the default options ("deflate", default compression level, no > custom dictionary) will make those first two bytes 0x78 0x9c. > > If you want to encrypt a compressed text, you must remove redundant > information first. encryption? didn't the OP say that he *d

Re: Script Error

2006-12-21 Thread Forced_Ambitions
Guys any suggestions ? Could it be because of a MS patch or something as i believe i had some patching on the windows box i was running this script on. Forced_Ambitions wrote: > Hi Guys, > > I am facing a problem with a script that i had written to automate > opening a website and signing on to

Confusion with calling function of a subclass

2006-12-21 Thread Pyenos
class TREE: def gettree(self):print self TREE.gettree() # I get an error saying # TypeError: unbound method gettree() must be called # with TREE instance as first argument (got nothing instead I still don't understand how to solve this simple code. -- http://m

Re: def index(self):

2006-12-21 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Gert Cuykens wrote: > On 21 Dec 2006 09:44:48 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: >> "George Sakkis" <[EMAIL PROTECTED]> wrote: >> >> @expr >> def fn(...): ... >> >> is exactly equivalent to: >> >> def fn(...): ... >> fn = (expr)(fn) >> > > ok i did my homework re

Re: Confusion with calling function of a subclass

2006-12-21 Thread Adonis Vargas
Pyenos wrote: > class TREE: > def gettree(self):print self > TREE.gettree() # I get an error saying ># TypeError: unbound method gettree() must be called ># with TREE instance as first argument (got nothing instead > > > I still don't understand how to solve t

Re: Decorator for Enforcing Argument Types

2006-12-21 Thread John Machin
George Sakkis wrote: > John Machin wrote: > > Bruno Desthuilliers wrote: > > > > > > > > Python is dynamic, and fighting against the language is IMHO a really > > > bad idea. The only places where theres a real need for this kind of > > > stuff are when dealing with the "outside world" (IOW : inpu

<    1   2