In <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> I have the following code which spawn a number of thread and do
> something (in the run method of MyThread).
> how can I record how much time does EACH thread takes to complete the
> 'run'?
>
> for j in range(threadCount):
> t =
i'm doing this:
mylocale = wx.Locale(wx.LANGUAGE_POLISH, wx.LOCALE_LOAD_DEFAULT)
if not wx.Locale.IsOk(mylocale):
mylocale = wx.Locale(wx.LANGUAGE_DEFAULT, wx.LOCALE_LOAD_DEFAULT)
and getting this:
Segmentation fault (core dumped)
I'm trying to see if I can properly load a language. If the
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote:
8<
> This is not a call to turn a blind eye for plagiarism, or to do students
> homework for them. It's a plea for common-sense. We're not bound by
> university guidelines, or universities' over-broad definition of
> plagiarism, and we don't
Hi,
I have the following code which spawn a number of thread and do
something (in the run method of MyThread).
how can I record how much time does EACH thread takes to complete the
'run'?
for j in range(threadCount):
t = MyThread(testNo)
threads.append(t)
bahoo wrote:
[ ... ]
> Thanks, this helped a lot.
> I am now using the suggested
> map(str.strip, open('source.txt').readlines())
>
> However, I am a C programmer, and I have a bit difficulty
> understanding the syntax.
> I don't see where the "str" came from, so perhaps the output of
> "open('sou
> On Behalf Of Kevin Walzer
> What's the best way to do this? Can anyone point me in the
> right direction? How could, for instance, the top snippet be
> rewritten to separate the Tkinter parts from the generic stuff?
I like to use the broadcaster/broker recipe at
http://aspn.activestate.com/ASPN/
Thanks Jay. When I searched the net, I also found mentioning of
win32all-125.exe
but I couldn't find a download link. Does anyone still have it in the HD?
"jay graves" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Apr 3, 7:52 pm, "Jack" <[EMAIL PROTECTED]> wrote:
>> I searched
Harold Fellermann <[EMAIL PROTECTED]> wrote:
...
> Within my program, I am importing a module via
> __import__(module_name,globals(),locals())
The globals() you're passing are those of the *importing* module, and
have no effect on those of the *imported* module.
> and I want to pass comand lin
"Travis E. Oliphant" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|
| We are pleased to announce the release of NumPy 1.0.2
For those curious like me, the summary news at SourceForge is " The latest
release is a mostly bug-fix release with a few optimizations and
enhancements."
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|
|>> My book says that in a heap, a value at position i will be smaller
|>> than the values at positions 2*i and 2*i + 1.
I am sure your book either uses 1-based arrays or a 0-based arrays with the
first not used. The need to
Hello all,
I want to be able to determine the IP address of the client making an
XMPRPC call.
I got the tip to use this:
---
class RPCServer(SimpleXMLRPCServer):
def _dispatch(self, method, params):
"""Extend dispatch, adding client info to some para
On Apr 3, 7:52 pm, "Jack" <[EMAIL PROTECTED]> wrote:
> I searched around but could not find win32all source or binaries for earlier
> versions of Python. Don't ask me why but I have to use Python 1.5.2 in this
> project :) The sourceforget page only has latest versions. ActiveState does
> not even
It would be interesting to see a computer language include such
functionality from the ground up. If these were core features of a
language, you'd have something wicked cool, and not just a new
language retreading the same features and functionality.
--
http://mail.python.org/mailman/listinfo/py
On Tue, 03 Apr 2007 11:20:33 -0700, bahoo wrote:
> Hi,
>
> I have a list like ['0024', 'haha', '0024']
> and as output I want ['haha']
>
> If I
> myList.remove('0024')
>
> then only the first instance of '0024' is removed.
There are a whole heap of ways of doing this. They all have in common t
[EMAIL PROTECTED] wrote:
> I am new to Tkinter. Following an example, I executed the following:
>
> window = Tk()
> b = Button(window)
> b.configure(bg = '#FF00FF')
> b.grid(row = 0, column = 0)
>
> how can I later get the value of this button's background color?
>
> Thanks.
>
b.cget('bg')
Jack wrote:
> I searched around but could not find win32all source or binaries for earlier
> versions of Python. Don't ask me why but I have to use Python 1.5.2 in this
> project :) The sourceforget page only has latest versions. ActiveState does
> not even have 1.5.2 for download. Is it still a
On Apr 3, 5:27 pm, [EMAIL PROTECTED] wrote:
> >> My book says that in a heap, a value at position i will be smaller
> >> than the values at positions 2*i and 2*i + 1.
>
> Check the heapq docs for the constraints the Python heapq module maintains:
>
>http://docs.python.org/dev/lib/modu
I am new to Tkinter. Following an example, I executed the following:
window = Tk()
b = Button(window)
b.configure(bg = '#FF00FF')
b.grid(row = 0, column = 0)
how can I later get the value of this button's background color?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
I searched around but could not find win32all source or binaries for earlier
versions of Python. Don't ask me why but I have to use Python 1.5.2 in this
project :) The sourceforget page only has latest versions. ActiveState does
not even have 1.5.2 for download. Is it still available somewhere?
I currently have a GUI application (using Tkinter) in which all the code
is placed in a single script. This means that the GUI bits are a bit too
tightly bound to the "under-the-hood" logic of the app. Here's an
example snippet:
def installPackage(self):
self.package = self.infotable.
Tommy Grav wrote:
> Hi,
>
> I have a setup file for some numerical simulation code written in C
> that looks like this:
>
> dt 0.1
> time 0.0
> nupdate 10
> noutput 100
> ntotal 1
> G 39.476926421373015
> Sun 1.0597682
> mplanet 9.547861040430418e-4
> 3.409530427945 3.635870038323 .03
>> My book says that in a heap, a value at position i will be smaller
>> than the values at positions 2*i and 2*i + 1.
Check the heapq docs for the constraints the Python heapq module maintains:
http://docs.python.org/dev/lib/module-heapq.html
They are different than what you stat
Mangabasi wrote:
> Has anyone provide a similar example with Pyfort, F2Py or calldll?
With the latest f2py in numpy:
$ cat sample.pyf
!-*- f90 -*-
! Note: the context of this file is case sensitive.
python module sample ! in
interface ! in :sample
subroutine sample(ierr1,ierr2,
We are pleased to announce the release of NumPy 1.0.2
NumPy is a Python extension that provides a general-purpose
multi-dimensional array that can act as a container of arbitrary
raw-data formats (including bools, integers, floats, complex, Python
objects, string, unicode, and general C-struct
My book says that in a heap, a value at position i will be smaller
than the values at positions 2*i and 2*i + 1. To test that, I ran
this program:
--
from heapq import *
from random import shuffle
data = range(10)
shuffle(data)
heap = []
for n in data:
heappush(heap, n)
print heap
On 3 Apr 2007 08:43:57 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Apr 3, 10:29 am, "Maxim Veksler" <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I wish to do some low level network stuff using python.
> >
> > --
> > Cheers,
> > Maxim Veksler
> >
> > "Free as in Freedom" - Do u GNU ?
>
Bruno Desthuilliers wrote:
>
> Michael Castleton a écrit :
>> When I open a csv or txt file with:
>>
>> infile = open(sys.argv[1],'rb').readlines()
>> or
>> infile = open(sys.argv[1],'rb').read()
>>
>> and then look at the first few lines of the file there is a carriage
>> return
>> +
>> li
Howdy,
I have been trying to call the following Fortran function from Python
(using Windows XP, Compaq Fortran and Python 2.4). I tried F2Py,
Pyfort and calldll with no success.
I think I came very close with calldll. Here is a short summary
Fortran code:
SUBROUTINE SAMPLE(IERR1,IERR2,A
Dear list,
I looked through the list but could not find any solutions for my
current problem.
Within my program, I am importing a module via
__import__(module_name,globals(),locals())
and I want to pass comand line options to this module. I would prefer
not to save them
in a config module or a Con
[EMAIL PROTECTED] wrote:
> I found a tutorial on parsing email that should help you:
>
>
http://www.devshed.com/c/a/Python/Python-Email-Libraries-SMTP-and-Email-Parsing/
>
> Also see the email module:
>
> http://www.python.org/doc/2.3.5/lib/module-email.html
>
> Mike
Well, I couldn't work wit
On Apr 3, 6:05 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
> bahoo wrote:
> > The larger problem is, I have a list of strings that I want to remove
> > from another list of strings.
>
> If you don't care about the resulting order::
>
> >>> items = ['foo', 'bar', 'baz', 'bar', 'foo', 'frobble
bahoo wrote:
> The larger problem is, I have a list of strings that I want to remove
> from another list of strings.
If you don't care about the resulting order::
>>> items = ['foo', 'bar', 'baz', 'bar', 'foo', 'frobble']
>>> to_remove = ['foo', 'bar']
>>> set(items) - set(to_remov
On Apr 3, 3:01 pm, "7stud" <[EMAIL PROTECTED]> wrote:
> On Apr 3, 12:20 pm, "bahoo" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have a list like ['0024', 'haha', '0024']
> > and as output I want ['haha']
>
> > If I
> > myList.remove('0024')
>
> > then only the first instance of '0024' is removed.
On Apr 3, 4:21 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> bahoo wrote:
> > On Apr 3, 2:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote:
> >> It depends on your application, but a 'set' might really be what you
> >> want, as opposed to a list.
>
> > s = set(["0024","haha","0024"])
> > s
> >> s
ZMY wrote:
> On Apr 3, 10:51 am, Robert Kern <[EMAIL PROTECTED]> wrote:
>> ZMY wrote:
>>> Is "ld" part of make command? I am not familiar with compiling with
>>> make in general.
>> No, it's the linker. I takes the object files (.o) which are generated by the
>> compiler (cc, I imagine) and links t
Boudreau, Emile wrote:
> Hey all,
> So I'm trying to filter a list with the built-in function
> filter(). My list looks something like this:
> ['logs', 'rqp-8.2.104.0.dep', 'rqp-8.2.93.0.dep',
> 'rqp-win32-app-8.2.96.0-inst.tar.gz', 'rqp-win32-app-8.2.96.0-inst.tar.gz']
>
> Calling filte
[EMAIL PROTECTED] wrote:
> This doc has not been updated since the 64 bit compilers came out
> officially. It doesn't make a whole lot of sense of what steps you
> should follow to build python. I saw a link on the comp.lang.python
> that had the steps, but that link doesn't go anywhere now. I had
On Apr 3, 2:42 pm, "Anbeyon" <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have not yet programmed in Python but am experienced in a number o
> other languages.
>
> I'd like to start to use Python to develop cross platform applications
> but havin kust started to investigate tols, libraries etc I feel a
>
"http://www.linktv.org/mosaic/streamsArchive/index.php4?
episode_date=20070330&vidsize=lg"
Enjoy
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 3, 4:12 pm, "bahoo" <[EMAIL PROTECTED]> wrote:
> In Matlab, there is a "isunix" command.
> Is there something similar in python?
>
> Thanks!
> bahoo
Check out the platform module. It should do what you need. The
"release()" method is especially useful.
Mike
--
http://mail.python.org/mail
bahoo a écrit :
> In Matlab, there is a "isunix" command.
> Is there something similar in python?
>>> import os
>>> os.uname()
('Linux', 'bibi', '2.6.9', '#1 Sun Dec 5 14:54:12 CET 2004', 'i686')
>>> os.name
'posix'
>>> isunix = lambda: os.name == 'posix'
>>> isunix()
True
Note that if you wo
On 2007-04-03, bahoo <[EMAIL PROTECTED]> wrote:
> Thanks, this helped a lot.
> I am now using the suggested
> map(str.strip, open('source.txt').readlines())
>
> However, I am a C programmer, and I have a bit difficulty
> understanding the syntax.
That bit of syntax is completely, utterly, 100%,
On Apr 3, 3:42 pm, "Anbeyon" <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have not yet programmed in Python but am experienced in a number o
> other languages.
>
> I'd like to start to use Python to develop cross platform applications
> but havin kust started to investigate tols, libraries etc I feel a
>
bahoo a écrit :
> On Apr 3, 5:06 pm, Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
>
(snip)
>> >>> open('source.txt').readlines()
>>['0024\n']
>> >>> map(str.strip, open('source.txt').readlines())
>>['0024']
>> >>> open('source.txt').read()
>>'0024\n'
>> >>> list(open('source.txt').read().strip
In Matlab, there is a "isunix" command.
Is there something similar in python?
Thanks!
bahoo
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 3, 1:33 pm, "ZMY" <[EMAIL PROTECTED]> wrote:
> On Apr 3, 10:51 am, Robert Kern <[EMAIL PROTECTED]> wrote:
>
>
>
> >ZMYwrote:
> > > Is "ld" part of make command? I am not familiar with compiling with
> > > make in general.
>
> > No, it's the linker. I takes the object files (.o) which are gen
Hi,
I have a setup file for some numerical simulation code written in
C that looks like this:
dt 0.1
time 0.0
nupdate 10
noutput 100
ntotal 1
G 39.476926421373015
Sun 1.0597682
mplanet 9.547861040430418e-4
3.409530427945 3.635870038323 .03424028779975
-2.0471057839802485 2.0178211484
Michael Castleton a écrit :
> When I open a csv or txt file with:
>
> infile = open(sys.argv[1],'rb').readlines()
> or
> infile = open(sys.argv[1],'rb').read()
>
> and then look at the first few lines of the file there is a carriage return
> +
> line feed at the end of each line - \r\n
Is ther
On 3 Nisan, 21:41, "gslm" <[EMAIL PROTECTED]> wrote:
> Only I want to print my application's view without these icons,ok.
> Thanks.
And is it possible to provide .exe file for any program in python or
only we can change the file as .pyw?
Can you answer this question, too?
Regards...
--
http://m
On 3 Nisan, 21:38, [EMAIL PROTECTED] wrote:
> On Apr 3, 1:16 pm, "gslm" <[EMAIL PROTECTED]> wrote:
>
> > Thanks,
> > I use TKinter,os:Xp home,python25.
> > I want to print all my application's view, except the close-minimize
> > icons.
>
> I don't know enough about Tkinter, but you can use the grap
On Apr 3, 5:06 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> bahoo a écrit :
>
> > Hi,
>
> > I have a text file containing a single line of text, such as
> > 0024
>
> > How should I read it into a "list"?
>
> You mean ['0024'], or ['0', '0', '2', '4'] ?
>
> > I tried this, but the "join" did
On Apr 3, 10:13 pm, "bahoo" <[EMAIL PROTECTED]> wrote:
> On Apr 3, 2:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote:
>
> > It depends on your application, but a 'set' might really be what you
> > want, as opposed to a list.
>
> > >>> s = set(["0024","haha","0024"])
> > >>> s
>
> > set(["0024","haha"])>
root = tk.Tk()
def click():
x=button1.winfo_rootx()
y=button1.winfo_rooty()
image=PIL.ImageGrab.grab((x,y,x+260,y+250))
image.save( 'tmp.jpeg')
button1 = tk.Button(root, compound=tk.TOP,
width=60, height=50,bg='black', command=click)
button1.pack()
root.mainloop()
Hi! How c
Hi
I have not yet programmed in Python but am experienced in a number o
other languages.
I'd like to start to use Python to develop cross platform applications
but havin kust started to investigate tols, libraries etc I feel a
little overwhelmed.
I'm hoping someone might be able to point me in
Thank you to both Steve and 7stud. You were right on with binary flag!
I thought I had tried everything...
Mike
--
View this message in context:
http://www.nabble.com/File-Object-behavior-tf3520070.html#a9825806
Sent from the Python - python-list mailing list archive at Nabble.com.
--
http://
On Apr 3, 10:51 am, Robert Kern <[EMAIL PROTECTED]> wrote:
> ZMY wrote:
> > Is "ld" part of make command? I am not familiar with compiling with
> > make in general.
>
> No, it's the linker. I takes the object files (.o) which are generated by the
> compiler (cc, I imagine) and links them together i
bahoo a écrit :
> Hi,
>
> I have a text file containing a single line of text, such as
> 0024
>
> How should I read it into a "list"?
You mean ['0024'], or ['0', '0', '2', '4'] ?
> I tried this, but the "join" did not work as expected.
What did you expect ?
help(str.join)
join(...)
S.joi
Microsoft Antigen for Exchange found a message matching a filter. The message
is currently Purged.
Message: "Python_list Digest_ Vol 43_ Issue 48"
Filter name: "KEYWORD= spam: xxx "
Sent from: "[EMAIL PROTECTED]"
Folder: "SMTP Messages\Inbound And Outbound"
Location: "ITURAN/First Administrative G
On Apr 3, 4:16 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Apr 3, 2:04 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] wrote:
> >>> I am needing to build python 2.5 on Windows XP x64 Windows Server 2003
> >>> sp1 Platform SDK and am not findi
bahoo wrote:
> On Apr 3, 2:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote:
>> It depends on your application, but a 'set' might really be what you
>> want, as opposed to a list.
>>
> s = set(["0024","haha","0024"])
> s
>> set(["0024","haha"])>>> s.remove("0024")
> s
>> set(["haha"])
>
> Th
[EMAIL PROTECTED] wrote:
> On Apr 3, 2:04 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> I am needing to build python 2.5 on Windows XP x64 Windows Server 2003
>>> sp1 Platform SDK and am not finding anything documented on the process
>>> to use. Has anyone had any su
In article <[EMAIL PROTECTED]>,
Larry Bates <[EMAIL PROTECTED]> wrote:
>Aahz wrote:
>> In article <[EMAIL PROTECTED]>,
>> Larry Bates <[EMAIL PROTECTED]> wrote:
>>> [EMAIL PROTECTED] wrote:
I create a dictionary like this
myDict = {}
and I add entry like this:
myDict
Hi,
I have a text file containing a single line of text, such as
0024
How should I read it into a "list"?
I tried this, but the "join" did not work as expected. Any
suggestions?
infile = open('my_file.txt','r')
for line in infile:
line.join(line)
my_list.extend( line )
--
http
On Apr 3, 2:36 pm, "flit" <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> Using poplib in python I can extract only the headers using the .top,
> there is a way to extract only the message text without the headers?
>
> like remove the fields below:
> "
> Return-Path:
> X-Original-To:
> Received: from [
On Monday 02 April 2007 16:33, Robert Kern wrote:
>> help(pkgutil.iter_modules)
>>> Help on function iter_modules in module pkgutil:
>>>
>>> iter_modules(path=None, prefix='')
>>> Yields (module_loader, name, ispkg) for all submodules on path,
>>> or, if path is None, all top-level modu
On Apr 3, 12:13 pm, "bahoo" <[EMAIL PROTECTED]> wrote:
> On Apr 3, 2:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote:
>
> > It depends on your application, but a 'set' might really be what you
> > want, as opposed to a list.
>
> > >>> s = set(["0024","haha","0024"])
> > >>> s
>
> > set(["0024","haha"])>
Hello All,
Using poplib in python I can extract only the headers using the .top,
there is a way to extract only the message text without the headers?
like remove the fields below:
"
Return-Path:
X-Original-To:
Received: from [
by (Postfix) with ESMTP id B32382613C
for Tue, 3 Apr
> Yes, but you shouldn't unless you really need to. You're better off
> rethinking your algorithm.
I need it but inside a class. The idea is to pass an instance of a class
(think of something like a record but with some methods inside) with
"fields", whose names are not known in advance, to ano
REQUIREMENTS FOR A VISUALIZATION SOFTWARE SYSTEM FOR 2010
Xah Lee, 2007-03-16
In this essay, i give a list of requirements that i think is necessary
for a software system for creating scientific visualization for the
next decade (2007-2017).
(for a HTML version with images, please see
http://xah
On Apr 3, 2:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote:
> It depends on your application, but a 'set' might really be what you
> want, as opposed to a list.
>
> >>> s = set(["0024","haha","0024"])
> >>> s
>
> set(["0024","haha"])>>> s.remove("0024")
> >>> s
>
> set(["haha"])
This sounds cool.
But
Steven Howe a écrit :
(nb : original post reinserted)
> [EMAIL PROTECTED] a écrit :
>> how can i compare a string which is non null and empty?
>>
(snip)
>> In java,I do this:
>> if (str != null) && (!str.equals(""))
>>
>> how can i do that in python?
>
> how about just testing it's length?
Your hint of checking "tar.getnames()" was exatly what I needed. It
returns the path to where the file will be extracted (ie.
Src/ver/qfw/symbols.xml). After knowing this fact it was quite simple to
extract the file.
Thanks, problem solved!!!
Emile Boudreau
x5754
-Original Message-
From:
On Apr 3, 1:53 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote:
> I'm confused by the number of variations on "popen" that Python offers.
>
> I'm using os.popen in my programs without difficulty. Is this wrong?
> Should I be using popen 2, popen3, etc.? I'm not clear on what the
> advantages of popen2,
On Apr 3, 12:20 pm, "bahoo" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a list like ['0024', 'haha', '0024']
> and as output I want ['haha']
>
> If I
> myList.remove('0024')
>
> then only the first instance of '0024' is removed.
>
> It seems like regular expressions is the rescue, but I couldn't fi
On Apr 3, 12:53 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote:
> I'm confused by the number of variations on "popen" that Python offers.
>
> I'm using os.popen in my programs without difficulty. Is this wrong?
> Should I be using popen 2, popen3, etc.? I'm not clear on what the
> advantages of popen2,
Kevin Walzer wrote:
> I'm confused by the number of variations on "popen" that Python offers.
>
> I'm using os.popen in my programs without difficulty. Is this wrong?
> Should I be using popen 2, popen3, etc.? I'm not clear on what the
> advantages of popen2, 3 etc. are: they seem a lot more com
bahoo a écrit :
> Hi,
>
> I want to have many lists, such as list0, list1, list2, ..., each one
> holding different number of items.
> Is there something like
> list[0]
> list[1]
> list[2]
>
> so that I can iterate through this list of lists?
listoflists = [
[1, 2, 3],
["foo", "bar", "baaz
On Apr 3, 1:49 pm, [EMAIL PROTECTED] wrote:
> On Apr 3, 1:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote:
>
> > It depends on your application, but a 'set' might really be what you
> > want, as opposed to a list.
>
> > >>> s = set(["0024","haha","0024"])
> > >>> s
>
> > set(["0024","haha"])>>> s.remove
abcd a écrit :
>>You'll need __eq__ for testing if two objects are equivalent, and
>>__hash__ for calculating object's hash value.
>>
>>class Type:
While we're at it, and unless you're stuck with an aging Python version,
make Type and Person new-style classes:
class Type(object):
>>def __in
On Apr 3, 1:49 pm, [EMAIL PROTECTED] wrote:
> On Apr 3, 1:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote:
>
> > It depends on your application, but a 'set' might really be what you
> > want, as opposed to a list.
>
> > >>> s = set(["0024","haha","0024"])
> > >>> s
>
> > set(["0024","haha"])>>> s.remove
I'm confused by the number of variations on "popen" that Python offers.
I'm using os.popen in my programs without difficulty. Is this wrong?
Should I be using popen 2, popen3, etc.? I'm not clear on what the
advantages of popen2, 3 etc. are: they seem a lot more complicated.
--
Kevin Walzer
Co
bahoo wrote:
> Hi,
>
> I have a list like ['0024', 'haha', '0024']
> and as output I want ['haha']
>
> If I
> myList.remove('0024')
>
> then only the first instance of '0024' is removed.
>
> It seems like regular expressions is the rescue, but I couldn't find
> the right tool.
>
> Thanks!
> bahoo
On Apr 3, 1:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote:
> It depends on your application, but a 'set' might really be what you
> want, as opposed to a list.
>
> >>> s = set(["0024","haha","0024"])
> >>> s
>
> set(["0024","haha"])>>> s.remove("0024")
> >>> s
>
> set(["haha"])
If you want, you can a
[EMAIL PROTECTED] wrote:
> How could I resolve this?
>
Try to keep each answer so it makes sense on its own, please. I presume
you are responding to this:
> In <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] wrote:
>
>> > if __name__ == "__main__":
>> >bucket_name = raw_input('Name of the bucket y
Only I want to print my application's view without these icons,ok.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 3, 1:16 pm, "gslm" <[EMAIL PROTECTED]> wrote:
> Thanks,
> I use TKinter,os:Xp home,python25.
> I want to print all my application's view, except the close-minimize
> icons.
I don't know enough about Tkinter, but you can use the graphics module
according to this post that should take a scree
On Apr 3, 12:26 pm, "7stud" <[EMAIL PROTECTED]> wrote:
> The file.writelines() documentation says that it
> doesn't add line separators. Is adding a carriage return something
> different?
No.
> Is this expected behavior?
According to Python in a Nutshell(p. 217), it is. On windows, in
text
mode
It depends on your application, but a 'set' might really be what you
want, as opposed to a list.
>>> s = set(["0024","haha","0024"])
>>> s
set(["0024","haha"])
>>> s.remove("0024")
>>> s
set(["haha"])
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 3, 12:02 pm, Michael Castleton <[EMAIL PROTECTED]> wrote:
> When I open a csv or txt file with:
>
> infile = open(sys.argv[1],'rb').readlines()
> or
> infile = open(sys.argv[1],'rb').read()
>
> and then look at the first few lines of the file there is a carriage return
> +
> line feed at the
On Apr 3, 2:04 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I am needing to build python 2.5 on Windows XP x64 Windows Server 2003
> > sp1 Platform SDK and am not finding anything documented on the process
> > to use. Has anyone had any success with this? If so has a
Hi,
I have a list like ['0024', 'haha', '0024']
and as output I want ['haha']
If I
myList.remove('0024')
then only the first instance of '0024' is removed.
It seems like regular expressions is the rescue, but I couldn't find
the right tool.
Thanks!
bahoo
--
http://mail.python.org/mailman/lis
Thanks,
I use TKinter,os:Xp home,python25.
I want to print all my application's view, except the close-minimize
icons.
--
http://mail.python.org/mailman/listinfo/python-list
How could I resolve this?
Many thanks,
O
--
http://mail.python.org/mailman/listinfo/python-list
Michael Castleton wrote:
> When I open a csv or txt file with:
>
> infile = open(sys.argv[1],'rb').readlines()
> or
> infile = open(sys.argv[1],'rb').read()
>
> and then look at the first few lines of the file there is a carriage return
> +
> line feed at the end of each line - \r\n
> This is f
On Apr 3, 10:12 am, "bahoo" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to have many lists, such as list0, list1, list2, ..., each one
> holding different number of items.
> Is there something like
> list[0]
> list[1]
> list[2]
>
> so that I can iterate through this list of lists?
>
> Thanks!
> bah
ZMY wrote:
> Dear all,
>
> I am a real newbie for both python and QNX, but I am still trying to
> compile Numeric-24.2 under QNX4.25 with python 2.2.
If you're new to QNX, why are you running QNX 4? That's for legacy
systems only. Move up to QNX 6, which has been out for ten years now.
Steve> Maybe, then, the real answer is "just exit from the main thread"?
Yes, I believe so. If that's not what's happening I would look to see if
there is another thread which wasn't marked as a daemon.
Skip
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I am needing to build python 2.5 on Windows XP x64 Windows Server 2003
> sp1 Platform SDK and am not finding anything documented on the process
> to use. Has anyone had any success with this? If so has anyone
> documented it? The documentation that resides in pcbuild/read
When I open a csv or txt file with:
infile = open(sys.argv[1],'rb').readlines()
or
infile = open(sys.argv[1],'rb').read()
and then look at the first few lines of the file there is a carriage return
+
line feed at the end of each line - \r\n
This is fine and somewhat expected. My problem comes
On 3 apr, 11:57, Ben Finney <[EMAIL PROTECTED]>
wrote:
> [EMAIL PROTECTED] writes:
> > for one of mypythonprojects I need an user interface similar to that
> > of cisco IOS or even better JuniperJUNOS.
> > Does anyone know of existingpythonmodules that gives this kind of
> > functionality?
>
> I su
1 - 100 of 203 matches
Mail list logo