On Thu, 13 Jan 2005, joeri honnef wrote:
> I'm trying to communicate between Python and Java and using os.popen().
> But thing dont work...The Java program reads strings from stdin and the
> python program just writes to stdout.
Hi Joeri,
You may want to look at:
http://www.python.org/do
I'm using 2.3, I was trying to be as explicit as possible. *grin*
On Thu, 13 Jan 2005 22:02:13 -0500, Jacob S. <[EMAIL PROTECTED]> wrote:
> I assume that both you and Liam are using previous-er versions of python?
> Now files are iterators by line and you can do this.
>
> openFile = open("probe_
I assume that both you and Liam are using previous-er versions of python?
Now files are iterators by line and you can do this.
openFile = open("probe_pairs.txt","r")
indexesToRemove = []
for line in openFile:
if line.startswith("Name="):
line = '' ## Ooops, this won't work because it
On Fri, 14 Jan 2005 09:51:48 +0900, Guillermo Fernandez Castellanos
<[EMAIL PROTECTED]> wrote:
> > > So tkinter is a good module to use if you only want simple widgets,
> > > but be prepared to switch to something newer when you hit it's
> > limitations.
> > This I agree with totally, fortunately I
Lee Harr wrote:
I'm trying to communicate between Python and Java and using
os.popen(). But thing dont work...The Java program reads strings from
stdin and the python program just writes to stdout.
[...]
"""
popen(command[, mode[, bufsize]])
Open a pipe to or from command. The return value is an op
Hi,
Exactly what I was looking for!
I'm not yet used to search in the cookbook... and I though such
"basic" widget would have been implemented directly in Tk or Tix...
Thanks a lot to both of you!
G
On Thu, 13 Jan 2005 12:06:51 -0800 (PST), Danny Yoo
<[EMAIL PROTECTED]> wrote:
>
>
> On Thu,
I have my first python program working (thank you for the help all).
Will anyone give me hints on how my program could be improved and on
how I could improve my programing style?
I want it to be well written as it can be but also as close to self
documenting and understandable to the average
> > So tkinter is a good module to use if you only want simple widgets,
> > but be prepared to switch to something newer when you hit it's
> limitations.
> This I agree with totally, fortunately I've yet to hit itslimitations
> in my fairly simple GUIs.
Well... there's also Tix... but I don't know
> I have looked into many books including my favs(
> Larning python and Alan Gaulds Learn to program using
Yes this is pushing regex a bit further than I show in my book.
> What I want to extract:
> I want to extract 164:623:
> Which always comes after _at: and ends with ;
You should be able to
I'm trying to communicate between Python and Java and using
os.popen(). But thing dont work...The Java program reads strings from
stdin and the python program just writes to stdout.
-first call the java program using:
handlers = os.popen('java StdIn)
-then:
> My list looks like this: List name = probe_pairs
> Name=AFFX-BioB-5_at
> Cell1=96 369 N control AFFX-BioB-5_at
> Cell2=96 370 N control AFFX-BioB-5_at
> Cell3=441 3 N control AFFX-BioB-5_at
> Cell4=441 4 N control AFFX-BioB-5_at
> ...
> My Script:
> >>> name1 = '[N][a][m][e][=]'
Why not just: 'N
On 13 Jan 2005, [EMAIL PROTECTED] wrote:
> My list looks like this: List name = probe_pairs
> Name=AFFX-BioB-5_at
> Cell1=96 369 N control AFFX-BioB-5_at
> Cell2=96 370 N control AFFX-BioB-5_at
> Cell3=441 3 N control AFFX-BioB-5_at
> Cell4=441 4
Quoting kumar s <[EMAIL PROTECTED]>:
> For example:
>
> I have a simple list like the following:
>
> >>> seq
> ['>probe:HG-U133B:20_s_at:164:623;
> Interrogation_Position=6649 ; Antisense;',
> 'TCATGGCTGACAACCCATCTTGGGA']
>
>
> Now I intend to extract particular pattern and write
> to anot
Hello group:
thank you for the suggestions. It worked for me using
if not line.startswith('Name='): expression.
I have been practising regular expression problems. I
tumle over one simple thing always. After obtaining
either a search object or a match object, I am unable
to apply certain metho
Hello.
I don't know what's wrong. Any help is welcome.
Thanks
Ismael
testui.py
###
import Java #Tried with and without this line
print "Hello World!"
###
H:\ARCHIV~1\Jython>jythonc -c -d -j test testui.py
processing testui
Required packages:
Creating adapters:
Creating .java files:
testui
> Quoting Jeff Shannon <[EMAIL PROTECTED]>:
[ snip ]
> (hmm, I wonder which is the faster option...)
Propably "grep -v ^Name= filename"
> --
> John.
0.2 EUR, J"o!
--
Wir sind jetzt ein Imperium und wir schaffen uns
unsere eigene Realität. Wir sind die Akteure der
Geschichte, und Ihnen, I
Is there a way to know what the path of the file is that imported a
module? I've tried __file__ and playing with globals() but I can't
seem
to crack this.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://ma
Quoting Jeff Shannon <[EMAIL PROTECTED]>:
> If the intent is simply to remove all lines that begin with "Name=",
> and setting those lines to an empty string is just shorthand for that,
> it'd make more sense to do this with a filtering list comprehension:
[...]
> If one wants to avoid list comp
Liam Clarke wrote:
openFile=file("probe_pairs.txt","r")
probe_pairs=openFile.readlines()
openFile.close()
indexesToRemove=[]
for lineIndex in range(len(probe_pairs)):
if probe_pairs[lineIndex].startswith("Name="):
probe_pairs[lineIndex]=''
If the intent is simply to remo
...as do I.
openFile=file("probe_pairs.txt","r")
probe_pairs=openFile.readlines()
openFile.close()
indexesToRemove=[]
for lineIndex in range(len(probe_pairs)):
if probe_pairs[lineIndex].startswith("Name="):
indexesToRemove.append(lineIndex)
for index in indexesToRe
On Thu, 13 Jan 2005, Guillermo Fernandez Castellanos wrote:
> Is there any "table" frame that I am unaware of?
Hi Guillermo,
There are some recipes for making a Tkinter table widget; here's one:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52266
There's a Tkinter wiki page t
On Thu, 13 Jan 2005, kumar s wrote:
> My list looks like this: List name = probe_pairs
> Name=AFFX-BioB-5_at
> Cell1=96 369 N control AFFX-BioB-5_at
> Cell2=96 370 N control AFFX-BioB-5_at
> Cell3=441 3 N control AFFX-BioB-5_at
> Cell4=441 4
Dear group:
My list looks like this: List name = probe_pairs
Name=AFFX-BioB-5_at
Cell1=96369 N control AFFX-BioB-5_at
Cell2=96370 N control AFFX-BioB-5_at
Cell3=441 3 N control AFFX-BioB-5_at
Cell4=441 4 N control AFFX-BioB-5_
You should post this on the Python Cookbook
http://aspn.activestate.com/ASPN/Python/Cookbook/
Orri Ganel wrote
> Bill Kranec wrote:
>
>
>
>> Hello,
>
>
>>
>
>> I have a list of lists, for example [ [1,2] , [3,4] ], and I would
>
>
>> like to pass all the elements of that list as arguments to a
f
> cross-platform gui that can be used on as many platforms as
possible,
> then use tkinter. As far as I know, tkinter isn't really developed
nowdays.
I assume Tkinter is tracking Tk and Tk is certainly still being
developed.
A new version was released quite recently I believe.
> So tkinter is a g
At 07:03 AM 1/13/2005, Blake Winton wrote:
What about "x === item"
Perhaps we should propose an extension to Python:
Assignment Statement: name = [[name] = ] ... expression-list. The absence
of a name would create an anonymous variable just as lambda creates
anonymous functions.
Reminds me of a
On Thu, 13 Jan 2005 13:20:11 +0100, Dimitri D'Or
<[EMAIL PROTECTED]> wrote:
> For some purpose, I would like to reinitialize the main namespace, i.e. I want
> to delete all the variables I have created through the use of functions or
> keyboard entries.
Hello Dimiti,
sound like you're talking ab
Guillermo Fernandez Castellanos wrote:
Is there any "table" frame that I am unaware of? or a way of changing
the type of character so I can have a font with characters of equal
width?
You might see if this does what you want:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52266
--
John.
"Gopinath V, ASDC Chennai" writes:
> Hi
> Is the standard Tkinter module in python does the GUI - Front -end
> Interface for Python
Well, if you mean "standard" as in included by default, then
yes. Tkinter however is a sort-of outdated gui. If you only want some
basic widgets, like entr
Blake Winton wrote:
Kent Johnson wrote:
If you mean for j to be a list of foobar(item) then use
j=[foobar(item) for item in x]
The first part of the list comp can be any valid expression.
Does that mean that there are invalid expressions? I'd enjoy seeing
an example.
I suppose if it's an expressio
Kent Johnson wrote:
If you mean for j to be a list of foobar(item) then use
j=[foobar(item) for item in x]
The first part of the list comp can be any valid expression.
Does that mean that there are invalid expressions? I'd enjoy seeing an
example.
I suppose if it's an expression, it must be valid,
Chad Crabtree wrote:
The only problem with this if it is to big or to deeply nested then
it
will overflow the stack?
Danny Yoo has given a mind-blowing continuation implementation that will
not overflow the stack. Below goes a recursive-iterator implementation.
To avoid deep recursion the code
Hello list,
For some purpose, I would like to reinitialize the main namespace, i.e. I want
to delete all the variables I have created through the use of functions or
keyboard entries. At the same time, I want to keep all the modules I have
imported so that I can use their functions again withou
On Jan 13, 2005, at 04:13, Bob Gailer wrote:
I like Kent's response.
foobar(item)/0 is a "valid" expression. It fits the grammar of
expressions. The fact that it raises an exception does not make it an
invalid expression.
Consider foobar(item)/xyz. It is valid. If xyz == 0 then it will also
rai
Hi,
I have a table of information that look like this (only 3 lines here):
Gibraltar Division BR INF D 095 59 GAR None 10-7-4-6 Gibraltar
Kuwait Division BR INF D 148 71GAR None 2-1-0-4 Kuwait
Somaliland Division BR INF D 139 84 GAR None 2-1-0-3 None
I would like to show this in a nice
The problem is your mutate_genome() function which mutates the genome in place. So all the
living_species are using the same genome (they all reference the same list). The solution is to have
mutate_genome() copy the genome. You can do this by adding the line
a_genome = a_genome[:]
to the sta
> Where did my 'ooo' go?
>
> #! /usr/bin/env python
> import os
>
> fobj = open('/tmp/xxx','w')
> fobj.write('ooo\n')
fobj.flush()
File objects use buffered IO and by changing from using file
objects to file descriptors half way through the buffer
could be in any state. You need to flush() to
37 matches
Mail list logo