lina wrote:
I have below file,
I wish the output following:
The first field 169 -170 sequential, and then the filed 2 from 1-29,
ignore the rest 4 fields,
169CHOL O28 1612 6.966 6.060 6.429
Read the lines from the file, sort them with a proper key function, write
the
Hello All,
I am putting together a small game, and I would want to enable my callback
function using time passed.
How to do something like this with Tkinter event.
from time import time
ftime = time()
if ftime - time() 2000:
dosomething
--
*Satajanus Nig. Ltd
*
Emeka wrote:
I am putting together a small game, and I would want to enable my callback
function using time passed.
How to do something like this with Tkinter event.
from time import time
ftime = time()
if ftime - time() 2000:
dosomething
You can schedule a function
Hello everyone. I'm having trouble wrapping my mind around a project I'm
working on. My goal is to create a program that manages (allows its users to
manipulate, search by criteria and edit) objects. There is one type of
object, for example I'll say it's a car.
There will be a central data file
On Wed, Jul 27, 2011 at 9:51 AM, Alexander rhettna...@gmail.com wrote:
Hello everyone. I'm having trouble wrapping my mind around a project I'm
working on. My goal is to create a program that manages (allows its users to
manipulate, search by criteria and edit) objects. There is one type of
Am 27.07.2011 15:51, schrieb Alexander:
Hello everyone. I'm having trouble wrapping my mind around a project I'm
working on. My goal is to create a program that manages (allows its
users to manipulate, search by criteria and edit) objects. There is one
type of object, for example I'll say it's a
Hello All,
I would like to parse this TCL command line with shlex:
'-option1 [get_rule A1 B2] -option2 $VAR -option3 TAG'
And I want to get the splitted list:
['-option1', '[get_rule A1 B2]', '-option2', '$VAR', '-option3', 'TAG']
Then I will gather in tuple 2 by 2 the arguments.
I tried
Thank you Dan for answering.
I ended with this and gave up with shlex:
split = ['-option1', '[get_rule', 'A1', 'B2]', '-option2', '$VAR',
'-option3', 'TAG']
procedure_found = False
result = []
for token in split:
if not token.startswith('[') and not token.endswith(']') and not
It's been many months since I played with Python, and have forgotten how
to bring up IDLE. If I simply click on a py file, I see what may be a
dos window appear and quickly disappear. If I right-click on the file,
and select IDLE, the same thing happens. If I go directly to All
Programs, the
Hi
On 27 July 2011 22:07, Wayne Watson sierra_mtnv...@sbcglobal.net wrote:
It's been many months since I played with Python, and have forgotten how to
bring up IDLE. If I simply click on a py file, I see what may be a dos
window appear and quickly disappear. If I right-click on the file, and
Hello,
I use bpython interpreter. This is a very good interactive CLI.
I want to create a CLI with the same features than bpython.
But the cmd std module seems no to be used in this project...
Is there a tool where I can plug all my grammary commands line
a sort of generic box with
On 07/28/2011 12:11 AM, Dan Stromberg wrote:
You could probably use a recursive descent parser with the standard
library.
But if your management is OK with pyparsing, that might be easier, and
a bit more clear as well.
Yes, I thought to use str method partition in a recursive way but
Alexander wrote:
Hello everyone. I'm having trouble wrapping my mind around a project I'm
working on. My goal is to create a program that manages (allows its users to
manipulate, search by criteria and edit) objects. There is one type of
object, for example I'll say it's a car.
There will be a
Karim wrote:
I use bpython interpreter. This is a very good interactive CLI.
I had never heard of it and had to google for it.
It appears to be a curses based CLI for *nix and MacOS
I want to create a CLI with the same features than bpython.
But the cmd std module seems no to be used in
On Tue, Jul 26, 2011 at 6:25 PM, Alan Gauld alan.ga...@btinternet.comwrote:
Alexander wrote:
Hello everyone. I'm having trouble wrapping my mind around a project I'm
working on. My goal is to create a program that manages (allows its users
to
manipulate, search by criteria and edit)
From: tutor-bounces+ramit.prasad=jpmchase@python.org
[mailto:tutor-bounces+ramit.prasad=jpmchase@python.org] On Behalf Of Walter
Prins
Sent: Wednesday, July 27, 2011 4:39 PM
To: tutor@python.org
Subject: Re: [Tutor] Getting Idle to work in Win7
Hi
On 27 July 2011 22:07, Wayne Watson
On 07/27/2011 12:34 AM, Alan Gauld wrote:
Karim wrote:
I use bpython interpreter. This is a very good interactive CLI.
I had never heard of it and had to google for it.
It appears to be a curses based CLI for *nix and MacOS
Ah Windows user.
I want to create a CLI with the same features
On 07/28/2011 12:31 AM, Michael Poeltl wrote:
hi,
have you heard abut ipython? maybe that's helpful for you?
http://ipython.scipy.org/moin/python
Hello Michael,
Yes I saw some article where Ipython and Bpython CLI integrations was
made in Django.
Thanks for the link I will evaluate it as
Hi Karim
On 28 July 2011 00:04, Karim karim.liat...@free.fr wrote:
On 07/27/2011 12:34 AM, Alan Gauld wrote:
Karim wrote:
I use bpython interpreter. This is a very good interactive CLI.
I had never heard of it and had to google for it.
It appears to be a curses based CLI for *nix and
On 07/28/2011 01:32 AM, Walter Prins wrote:
Hi Karim
On 28 July 2011 00:04, Karim karim.liat...@free.fr
mailto:karim.liat...@free.fr wrote:
On 07/27/2011 12:34 AM, Alan Gauld wrote:
Karim wrote:
I use bpython interpreter. This is a very good interactive
Alexander wrote:
Hello everyone. I'm having trouble wrapping my mind around a project I'm
working on. My goal is to create a program that manages (allows its users to
manipulate, search by criteria and edit) objects. There is one type of
object, for example I'll say it's a car.
This is called
Does anyone know how to assign a certain numerical range to a variable, and
then choose the number that is the middle of that range? For example, I want
to assign the variable X a range between 1 and 50, and then I want to have
the middle of that range (25) return with some command when I call it
Karim wrote:
Hello All,
I would like to parse this TCL command line with shlex:
'-option1 [get_rule A1 B2] -option2 $VAR -option3 TAG'
And I want to get the splitted list:
['-option1', '[get_rule A1 B2]', '-option2', '$VAR', '-option3', 'TAG']
Then I will gather in tuple 2 by 2 the
Alexander Quest wrote:
Does anyone know how to assign a certain numerical range to a variable, and
then choose the number that is the middle of that range? For example, I want
to assign the variable X a range between 1 and 50, and then I want to have
the middle of that range (25) return with
On 07/28/2011 02:27 AM, Steven D'Aprano wrote:
Karim wrote:
Hello All,
I would like to parse this TCL command line with shlex:
'-option1 [get_rule A1 B2] -option2 $VAR -option3 TAG'
And I want to get the splitted list:
['-option1', '[get_rule A1 B2]', '-option2', '$VAR', '-option3',
Thanks Steven- I'll try that out.
-Alex
On Wed, Jul 27, 2011 at 5:40 PM, Steven D'Aprano st...@pearwood.infowrote:
Alexander Quest wrote:
Does anyone know how to assign a certain numerical range to a variable,
and
then choose the number that is the middle of that range? For example, I
On Wed, 27 Jul 2011 20:16:31 -0400
Alexander Quest alexxqu...@gmail.com wrote:
Does anyone know how to assign a certain numerical range to a
variable, and then choose the number that is the middle of that
range? For example, I want to assign the variable X a range between
1 and 50, and then I
Hi I was wondering if there is a way to disable a function.
Hi have a GUI grid snapping function that I use in a program called Nuke
(the film compositing software)
Here is the function (which loads when Nuke loads):
###
def theAutoplaceSnap():
try:
You could start with an anonymous function using the lambda operator, such as:
mid_range = lambda x: x[len(x) // 2]
Note: If you use len(x) / 2 in python 3.x you will get a TypeError because the
division operator / returns a float.
Thanks for that Donald!
-Alex
On Wed, Jul 27, 2011 at 8:16 PM, Donald Wilson donald...@me.com wrote:
You could start with an anonymous function using the lambda operator, such
as:
mid_range = lambda x: x[len(x) // 2]
Note: If
30 matches
Mail list logo