On Tuesday 05 December 2006 23:32, Alan Gauld wrote:
> "Dave S" <[EMAIL PROTECTED]> wrote
>
> > Struggling with python & XP again. My app needs to know if a certain
> > program
> > is running on my XP box
> >
> > os.execl('')
> > It throws the output to the terminal + I need the exact path to t
At 09:40 PM 12/5/2006, wesley chun wrote:
> > > How can I check if a variable is an integer?
> >
> > Luke and John have answered your question, but we should also ask, why
> > do you want to do that? Explicit type testing is a code smell, perhaps
> > there is a better way to do what you want.
>
>
>
Say I have a function,
def my_function(max, min=0):
return max - min
The order of arguments is counterintuitive, but it seems it can't be
changed if I want to have a default min. Is there way to write
def my_function(min=0, max):
stuff
Thanks,
Dick Moores
> > How can I check if a variable is an integer?
>
> Luke and John have answered your question, but we should also ask, why
> do you want to do that? Explicit type testing is a code smell, perhaps
> there is a better way to do what you want.
- another way of doing it is: type(aVar) is int (which
Eli Zabielski wrote:
> How can I check if a variable is an integer?
Luke and John have answered your question, but we should also ask, why
do you want to do that? Explicit type testing is a code smell, perhaps
there is a better way to do what you want.
Kent
Alan Gauld wrote:
> "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote
>
>> I mean to say that suppose I have two lists, and I want to pass them
>> to the
>> event handling function. Is that possible using bind?
>
> Not answering your question directly but you can do
> it with a lambda expression.
>
Running python 2.3.4, on Windows XP
the popen2 docs show
6.8 popen2 -- Subprocesses with accessible I/O streams
This module allows you to spawn processes and connect to their
input/output/error pipes and >>obtain their return codes under Unix and
Windows.<<
Then it further goes to say
The onl
On 06/12/06, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
> Eli Zabielski wrote:
> > How can I check if a variable is an integer?
> if type(aVar) == type(1):
Well, you could also do "type(aVar) == int", which is clearer.
Or "type(aVar) in (int, long)", depending on exactly what you mean by "integ
Eli Zabielski wrote:
> How can I check if a variable is an integer?
if type(aVar) == type(1):
should do the trick.
>
>
> ___
> Tutor maillist - Tutor@python.org
> http://mail.pyth
How can I check if a variable is an integer?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Chris Hengge wrote:
> I have a script that makes my python scripts into .pyc files and I can
> run those without a .py in the directory or anywhere else on the system
> for that matter. No clever tricks needed.
You're right. Probably this trick was only needed in (very) old versions
of Python.
"Dave S" <[EMAIL PROTECTED]> wrote
> Struggling with python & XP again. My app needs to know if a certain
> program
> is running on my XP box
> os.execl('')
> It throws the output to the terminal + I need the exact path to the
> executable
> (a bit of a trial)
> Any ideas how I can catch
"Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote
> I mean to say that suppose I have two lists, and I want to pass them
> to the
> event handling function. Is that possible using bind?
Not answering your question directly but you can do
it with a lambda expression.
def myfunc(l1,l2):
# the func
"Luke Paireepinart" <[EMAIL PROTECTED]> wrote
>> I have a script that makes my python scripts into .pyc files and I
>> can
>> run those without a .py in the directory or anywhere else on the
>> system for that matter. No clever tricks needed.
>>
> Why would you want to do this?
I haven't measur
[EMAIL PROTECTED] escreveu:
>
>1. Re: How to kill an app from python on windows? (Tim Golden)
>
>
> This link may get you started:
>
> http://effbot.org/pyfaq/how-do-i-emulate-os-kill-in-windows.htm
>
> although it may not apply, depending on the exact
> circumstances of what you're doing.
>
On Tuesday 05 December 2006 22:42, Luke Paireepinart wrote:
> Dave S wrote:
> > On Tuesday 05 December 2006 20:58, Luke Paireepinart wrote:
> >> Dave S wrote:
> >>> Hi all,
> >>>
> >>> Struggling with python & XP again. My app needs to know if a certain
> >>> program is running on my XP box
> >>>
>
Dave S wrote:
> On Tuesday 05 December 2006 20:58, Luke Paireepinart wrote:
>
>> Dave S wrote:
>>
>>> Hi all,
>>>
>>> Struggling with python & XP again. My app needs to know if a certain
>>> program is running on my XP box
>>>
>>> Ideal world - I can get the output of 'tasklist.exe' into a
On Tuesday 05 December 2006 20:58, Luke Paireepinart wrote:
> Dave S wrote:
> > Hi all,
> >
> > Struggling with python & XP again. My app needs to know if a certain
> > program is running on my XP box
> >
> > Ideal world - I can get the output of 'tasklist.exe' into a string.
> >
> > I have tried
>
Dave S wrote:
> Hi all,
>
> Struggling with python & XP again. My app needs to know if a certain program
> is running on my XP box
>
> Ideal world - I can get the output of 'tasklist.exe' into a string.
>
> I have tried
>
> os.execl('')
> It throws the output to the terminal + I need the exact
Quick and dirty way to keep people from lookin at the code.
On 12/5/06, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
Chris Hengge wrote:
> I have a script that makes my python scripts into .pyc files and I can
> run those without a .py in the directory or anywhere else on the
> system for that
Hi all,
Struggling with python & XP again. My app needs to know if a certain program
is running on my XP box
Ideal world - I can get the output of 'tasklist.exe' into a string.
I have tried
os.execl('')
It throws the output to the terminal + I need the exact path to the executable
(a bit
Chris Hengge wrote:
> I have a script that makes my python scripts into .pyc files and I can
> run those without a .py in the directory or anywhere else on the
> system for that matter. No clever tricks needed.
>
Why would you want to do this?
___
Tutor
I have a script that makes my python scripts into .pyc files and I can run
those without a .py in the directory or anywhere else on the system for that
matter. No clever tricks needed.
On 12/1/06, Christopher Arndt <[EMAIL PROTECTED]> wrote:
Addendum: these rules only apply to Python *modules*.
Hi folks,
Is it possible to pass parameters using bind ?
I mean to say that suppose I have two lists, and I want to pass them to the
event handling function. Is that possible using bind?
Thanks.
Regards,
Asrarahmed Kadri
--
To HIM you shall return.
Ketan Maheshwari wrote:
> Hi *:
> How do I save the output of a wxpython program as a jpg or png image
> from within the program?
What output do you want to capture? Do you mean you want a screenshot of
the windows? On Windows you can use ImageGrab from the Python Imaging
Library to capture
Hi!
I try to learn my son Development using Python.
I have found that drPython was a great enviroment and easy for him to
understand.
Is't a problem running om Macintosh OS/X i have to start on commandline,
OS/X
dosen't understand when i clicked on the drPython.py files.
I have found this is s
"Lazarus billa" <[EMAIL PROTECTED]> wrote
> When I wanted to Browse "[EMAIL PROTECTED]" I am not
> able to get it and it indicates "cannot find server
> due to Syntax Error." Plz Advise.
It means you've made a mistake in your code.
Can you give us a clue by including some code?
That way we migh
27 matches
Mail list logo