Take a look at Doug Hellmann's example using multiprocessing at
https://pymotw.com/2/multiprocessing/basics.html You should be able to
substitute the count down example directly into the first example.
--
https://mail.python.org/mailman/listinfo/python-list
I don't know anything about asyncio, but multiprocessing would be my tool of
choice. The first example should be enough for what you want to do at
https://pymotw.com/2/multiprocessing/basics.html
--
https://mail.python.org/mailman/listinfo/python-list
There is no need for a function or a generator. A for() loop is a
unique case of a while loop
## for i in range(-10.5, 10.5, 0.1):
ctr = -10.5
while ctr < 10.5:
print ctr
ctr += 0.1
--
http://mail.python.org/mailman/listinfo/python-list
Depends on what OS you are using. The easiest way would be to tar the
files you want to backup into an empty directory and then have the
python backup program call whatever DVD write program you have on your
system with the appropriate commands and your backup directory.
--
http://mail.python.org/
> I don't understand why Cameron has a different version of Python which
> doesn't seem to have sqlite support enabled.
Agreed, but won't the package manager tell him if python-sqlite is
installed? That would be the next step since it appears that SQLite
intself is already installed. Since Ubunt
On Ubuntu you want to install something like python-sqlite (a search
for "python" should turn up everything). There are 2 parts to this,
SQLite and the python bindings to SQLite. So you seem to have SQLite
installed but not the Python bindings. Also, on some systems you have
to have python-sqlit
On Jul 5, 11:09 am, david <[EMAIL PROTECTED]> wrote:
> You learn something new every day:
>
> On my ubuntu, update-manager is supposed to use the python2.5
> installed on /usr/bin. Well, I had subsequently installed a whole
> bunch of stuff in /usr/local (/usr/local/bin/python and /usr/local/lib/
>
To be completely correct, you should allow for the possibility that
the word found is the last word in the list
for j, word in enumerate(words):
if (word.startswith("b")) and (j+1 < len(words)):
print words[j+1]
break
--
http://mail.python.org/mailman/listinfo/python-list
I like New Mexico Tech's site as well. Also, take a look at the PMW
extension for additional widgets, and TkTable and/or TableListWrapper.
http://infohost.nmt.edu/tcc/help/pubs/tkinter/
--
http://mail.python.org/mailman/listinfo/python-list
> No one meant to laugh at you. Your naivete was not obvious. FWIW, a
> sense of humor is a valuable possession in most Python-related
> conversations.
Perhaps someone can explain how telling something like this to the OP,
who thinks this statement will work
if 'one' and 'two' in f:
is funny and
On Mar 22, 10:07 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> On Mar 22, 4:38 pm, Zentrader <[EMAIL PROTECTED]> wrote:
>
> > > if ('one', 'two') are in f: ...
>
> > "are" gives me an error in Python 2.5 with a "from futu
> if ('one', 'two') are in f: ...
"are" gives me an error in Python 2.5 with a "from future import *"
statement included. What version and platform are you running. Also,
the docs don't mention it.
http://docs.python.org/ref/keywords.html
--
http://mail.python.org/mailman/listinfo/python-list
I disagree with this statement
But that doesn't change the fact that it will expose the same
rounding-errors as floats do - just for different numbers.
The example used has no rounding errors. For anything less that 28
significant digits it rounds to 1.0. With floats 1.0/3 yields
0.3
> That's a misconception. The decimal-module has a different base (10
> instead of 2), and higher precision. But that doesn't change the fact
> that it will expose the same rounding-errors as floats do - just for
> different numbers.
>
> >>> import decimal as d
> >>> d = d.Decimal
> >>> d("1") /
>and then choose the solution with the
>shortest number of terms or something
Experience says that one should not assume that there is a one to one
relationship, ("the" solution). Some event can trigger more than one
combination of the 6 binary input variables. And experience says that
the busin
> Not to me. If I read "for _ in ...", I wouldn't be quite sure what _ was.
> Is it some magic piece of syntax I've forgotten about? Or something new
> added to language while I wasn't paying attention (I still consider most
> stuff added since 1.5 to be new-fangled :-)).
+1 to forgotten about
+
On Feb 1, 8:07 am, geoffbache <[EMAIL PROTECTED]> wrote:
> I have some marked up text and would like to convert it to plain text,
If this is just a quick and dirty problem, you can also use one of the
lynx/elinks/links2 browsers and dump the contents to a file. On Linux
it would be
lynx -dump htt
On Feb 1, 6:27 am, "Connolly" <[EMAIL PROTECTED]> wrote:
> Hey,
>
> Right basically I've got to the end of my main section of my program an I've
> got it comparing the same dictionary to ensure that the values are the same
> (sounds stupid I know), yet what my line of code I am using to do this is
On Jan 15, 5:44 pm, yhvh <[EMAIL PROTECTED]> wrote:
> Is it possible to output error messages in a different color?
> I'm using Terminal on Gnome.
For the few times that I want to do this, this simple form works with
xterm.
for j in range(1,10):
os.system("tput setaf "+str(j))
print "test fo
On Jan 9, 5:56 am, Svenn Are Bjerkem <[EMAIL PROTECTED]>
wrote:
>I have been looking for a way to execute this command
> as a part of a script, but it seems that the changes are only valid in
> the context of the script and when the script exits, the current shell
> still have the original "users"
On Jan 4, 2:19 am, stuntgoat <[EMAIL PROTECTED]> wrote:
> import zlib works in Python 2.4 (debian etch AMD64 - default python
> version for that distro)
>
> I built python 2.5 from source; zlib is not importable.
2.5 has been available for some time in the Debian repositories.
Installing the .deb
On Dec 31, 2:45 am, Stef Mientki <[EMAIL PROTECTED]> wrote:
> So what I need was something like:
> if A != A_prev :
> ... do something
> A_prev = A
If A_prev is not declared prior to the if statement, you will get an
error when you try to compare the non-existing variable to A.
On Dec 27, 8:21 am, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Micah Elliott wrote:
> > I'm ./configure-ing with "--disable-shared" (because this must mean
> > "enable static", right?)
I think you can just add -static to the gcc Flag line in the
makefile. "man gcc" should also be helpful but t
>
> Bah, humbug
And if you're not a Christian it would be Type Error bug. Anyway,
happy New Years as well to all in the group.
--
http://mail.python.org/mailman/listinfo/python-list
Wherever it is physically located, I would suggest linking the dir to /
usr/lib/python/site-python (on a Linux system). AFAIK the sole
purpose of this dir is for the type of thing you are describing. On
my system it also gets copied when Python is updated. What
permissions you give the dir is up
It's installed by default with Python 2.5 on Ubuntu. Actually it is a
link to /usr/share/pycentral/python-uno/site-packages/uno.py so first
do a search for uno.py. If not found post back.
--
http://mail.python.org/mailman/listinfo/python-list
Sorry, I read that backwards. I do it the opposite of you. Anyway a
google for "html to pdf python" turns up a lot of hits. Again, no
reason to reinvent the wheel.
--
http://mail.python.org/mailman/listinfo/python-list
I'm sure it can be done but there is no reason to reinvent the wheel
unless it's for a programming exercise. You can use pdftohtml and run
it from a Python program if you want.
http://pdftohtml.sourceforge.net/
--
http://mail.python.org/mailman/listinfo/python-list
Whatever you use, it has to have a Python binding. Spectcl may or may
not as you may be able to use it with the tkinter binding, but that is
doubtful. Most GUI toolkits have an existing app to look for files in
a directory, if that is what you are wanting to do. The following
link is to the GUI
The OP was not talking about a Python program to check the Pascal
program as I read it
> to make application in python
> that would send code (text) to pascal compiler...and it would return
> result and then application would show that result.
So he/she/it would want subprocess to compile the Pas
You can use subprocess to run the pascal program and capture the
output/results. See here
http://blog.doughellmann.com/2007/07/pymotw-subprocess.html
--
http://mail.python.org/mailman/listinfo/python-list
Instead of linking records together via some key, I first try out a
dictionary of lists. The list for each dictionary key would be the
same as a list with a single, forward link. If you have relatively few
records per key, it works well.
--
http://mail.python.org/mailman/listinfo/python-list
If we use minutes from 2001, then 3566839 comes out as sometime in
October, 2007 (6.78622 years). Close but no cigar. Is anyone familar
enough with Excel to translate the formula or do we have to go a-
googling?
--
http://mail.python.org/mailman/listinfo/python-list
Damn! I joined this group because I thought it was a pie-a-thon. All
that practice has now gone to waste/waist.
--
http://mail.python.org/mailman/listinfo/python-list
This is a discussion on the Ubuntu forums-something like 51 pages
worth. Even though you are using Gutsy, you want to take a look at
KDevelop. It will install without problems even though it is KDE. A
lot of people use Geany or Eclipse also. Anyway, you can page through
as much of this thread a
> And my problem this function replace the character to "" but i
> want to " "
> for example:
> input: Exam%^^ple
> output: Exam ple
> I want to this output but in my code output "Example"
I don't think anyone has addressed this yet. It would be
if chr found_in_allowed_set:
output_string
> allowed =
> [u'+',u'0',u'1',u'2',u'3',u'4',u'5',u'6',u'7',u'8',u'9',u' ', u'Þ',
> u'þ', u'Ö', u'ö', u'Ü', u'ü', u'Ç', u'ç', u'Ý', u'ý', u'Ð', u'ð', 'A',
> 'C', 'B', 'E', 'D', 'G', 'F', 'I', 'H', 'K', 'J', 'M', 'L', 'O', 'N',
> 'Q', 'P', 'S', 'R', 'U', 'T', 'W', 'V', 'Y', 'X', 'Z', 'a', 'c
O> > while cal <=0:
> >#Prompt for calories
> >cal = input("Please enter the number of calories in your food: ")
> >if cal <=0:
> >print "Error. The number of calories must be positive."
>
> >#Prompt for fat
> >fat = input("Please enter the number of fat
You can use Python's decimal class if floating point arithmetic is not
exact enough
import decimal
status = decimal.Decimal( 0 )
for i in range(10):
status += decimal.Decimal( "0.1" )
if status == decimal.Decimal( "0.1" ):
print status
elif status == decimal.Decimal( "0.2" ):
On Sep 29, 8:19 am, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Sep 29, 10:34 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > [EMAIL PROTECTED] wrote:
>
> > > On 29 sep, 12:04, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > >> for i in generator_a: # the first "for" cycle
On Sep 27, 9:46 am, Shawn Minisall <[EMAIL PROTECTED]> wrote:
> I am trying to read a few lines of a file with multiple values, the rest
> are single and are reading in fine.
>
> With the multiple value lines, python says this "ValueError: too many
> values to unpack"
>
> I've googled it and it say
Two existing solutions are TableList + TableListWrapper (Google for
it), and MultiListBox
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52266 In both
cases you send the program the titles and data and the program takes
care of all of the details. BTW, you can attach a scrollbar to any
Scope had to do with "visibility" and not with how memory was
allocated. Scope means, can this line of code access that block of
memory. Note that in list comprehension, [x for x in (1, 2, 3)], the
for loop allocates memory the same way, but the scope changes so that
"x" is visible outside the fo
In addition, "for" is lower case, i.e not "For". If this doesn't
solve the problem then please post the actual error message. "Next
Line hits snag here? Where should this line be?" is not specific
enough.
--
http://mail.python.org/mailman/listinfo/python-list
> Your for loops both use the same counting index.
Since those variables are local to the for loop, theoretically it
should work with both loops using the same variable. Although bad
practice, I tested it on my machine and the following code does indeed
work as expected, so it appears that the pr
On Sep 22, 2:37 am, Konstantinos Pachopoulos <[EMAIL PROTECTED]>
wrote:
> Hi,
> does any body now any such algorith? to find difference in days from
> MMDD to MMDD?
> Or just an algorithm, that converts MMDD to seconds since the epoch?
>
> Thanks
For some reason, to-seconds-since-epoch
> If I run the command /usr/sbin/program_prgchk everything works (no
> process)
> But when I use it in the crontab I get a process
The crontabs file on my system is stored in /var/spool/cron/
crontabs/. It appears you are checking the wrong file. Try a
"crontab -e" from the command line and co
sourcefile.find(stringID) returns the start location. You can use
print to see this. You can then slice from start+len(stringID) and
print it out. That should give you enough info to figure out how to
find and extract to the end of the string tag as well. There are
other ways to do this, but str
This would accept ints, floats, and decimal types.
import decimal
class Nint(int):
def __add__(self, x, y):
try:
return x+y
except:
return None
if __name__=='__main__':
N=Nint()
print N.__add__( 1, 2 )
print N.__add__( 1, None )
print N
I would do something along the lines of the following, although it
only tests for integers and not floats, so would return 'None' for a
float.
class Nint(int):
def __add__(self, x, y):
if isinstance(x, int) and isinstance(y, int):
return x+y
return None
if __name__
The documentation is here
http://docs.python.org/lib/typesseq-strings.html
--
http://mail.python.org/mailman/listinfo/python-list
> for line in inp.readlines():
If you are now using readlines() instead of readline(), then
a) it is only used once to read all data into a container
b) you can access each element/line by it's relative number
data=open(filename, "r").readlines()
for eachline in data : (not readlines())
so try
I'm assuming you know that python has a file.seek(), but you have to
know the number of bytes you want to move from the beginning of the
file or from the current location. You could save the length of the
previous record, and use file seek to backup and then move forward,
but it is simpler to save
Save the previous line in a variable if you want the previous line
only.
for line in inp:
# Perform some operations with line
if condition something:
print prev_line
print line
break
# I need to go back one line and use that line value
--> prev_line = line
I
What is it about "please do not top-post" that you have difficulty
understanding? Or do "MVP"s feel that their time is so much more
valuable than anyone else's that they are free to ignore the norms?
Who made this the norm? In my travels through web-land, it appears to
be the opposite. Don't wa
Same solution as above, but if you just want "Hello" and to not
include words containing "Hello", i.e. "Helloing" or "Unhello", then
you want to include a leading and/or trailing space.
lit=" hello" ## note added space
t1="nothello world hello. hello \nwhy world hello"
start = t1.find(lit)
t2 = t
On Sep 7, 11:30 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Fri, 07 Sep 2007 18:49:12 +0200, Jorgen Bodde wrote:
> > As for why caring if they are bools or not, I write True and False to
> > the properties, the internal mechanism works like this so I need to
> > make that distincti
On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Wed, 05 Sep 2007 22:54:55 -0700, TheFlyingDutchman wrote:
> > To do a "*string" wildcard filter use the endswith() function instead
> > of startswith() and to do a *string* type wildcard filter use
> > the find() function
On Sep 6, 7:56 am, [EMAIL PROTECTED] wrote:
> December 31, 2006January 13, 2007 # doesn't earn
> January 14, 2007January 27, 2007 # does earn
> January 28, 2007February 10, 2007 # doesn't
> February 11, 2007 February 24, 2007 # does
Am I over simplifying if I say that sin
On Sep 6, 10:29 am, David Barr <[EMAIL PROTECTED]> wrote:
> yields no results.
Since every response so far has answered everything __Except The
Question You Asked__, your code runs fine on my Linux machine and
prints 15. The error may be before this bit of code so it isn't
getting called. Add so
>So, all the decline means is that the number of searches
> for "Python programming" releative to all searches done is declining.
Which makes sense. There are an many python tutorial/code snippet
sites, sites that list those type of python sites, as well as the
python.org site which means that a
On Sep 4, 9:27 am, "John Krukoff" <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:python-
> > [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
> > Sent: Tuesday, September 04, 2007 8:07 AM
> > To: [EMAIL PROTECTED]
> > Subject: GC performance with lists
Reported as spam
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 4, 6:42 am, vijayca <[EMAIL PROTECTED]> wrote:
> my python installation is:Active python 2.5.1
> i am using Red Hat Linux
> i have the Tkinter module installed but any simple script produces an
> error
>
> script:
> from Tkinter import Label
> widget = Label(None, text='Hello GUI world!'
On Sep 4, 7:06 am, [EMAIL PROTECTED] wrote:
One thing to do is to calc i+1 etc before the j loop instead of on
every iteration. That is, calculate 600,000 times instead of
6*57*100,000=34,200,00, And in today's world, it probably won't make
a lot of difference, This is not related to gc but is a
> What meaningless error message are you talking about!?
>
> Ciao,
> Marc 'BlackJack' Rintsch
My mistake. It appears that this is no longer the case. And my
apologies. It was probably in version 2.3 or earlier that this was a
problem. Given the way that the Python community constantly
On Aug 28, 4:50 am, "Richard B. Gilbert" <[EMAIL PROTECTED]>
wrote:
>> Unless, of course, someone has a working "Killbot". If anyone has such
> a thing, please kill that "MI5victim" moron as well!
I reported MI5victim to [EMAIL PROTECTED] and it appears to be gone, as
well as the "free air condit
On Aug 30, 8:10 pm, Scott David Daniels <[EMAIL PROTECTED]> wrote:
> Marc 'BlackJack' Rintsch wrote:
>
> A fine repy
>
> > In [57]: funcs = [a, b]
> > In [58]: funcs
> > Out[58]: [, ]
>
> > In [59]: funcs[0]()
> > Out[59]: 1
>
> > In [60]: funcs[1]()
> > Out[60]: 2
>
> and a "list comprehension" al
On Aug 30, 11:23 am, [EMAIL PROTECTED] wrote:
> Neil, Steve,
>
> Thanks for the responses on sets. I have not used them before and was
> not even aware Python had them. I will try them out.
And if there weren't sets you would still not use find or index but a
brute force method or dictionaries
for
On Aug 30, 12:45 pm, seancron <[EMAIL PROTECTED]> wrote:
> Does anybody have any suggestions for getting started on desigining a
> desktop weather application in Python?
>
> I've been looking for access to weather data and while I have found
> several including the weather.com service I've decided
> My Linux version is: Debian GNU-Linux
> My Python version is: 2.3
Reinstalling Python would be my first option. Any of the versions can
be downloaded from python.org but on debian you should be able to just
use apt-get or one of the GUIs for apt-get.
--
http://mail.python.org/mailman/listinfo
Does page count change? i.e. is it necessary to retrieve it in every
loop or
tempList = ['1','2','3','4','5','6','7','8']
sampleList=[]
page_count = self.parent.GetPageCount()
for i in range(page_count):
Also, once pagefound is set to True, all pages following will not be
appended to sampleL
On Aug 21, 10:13 pm, "Scott M." <[EMAIL PROTECTED]> wrote:
> Oh my God! How did you know?!! You were so smart to post that here!
>
> <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
>
> >http://freeairconditioners.blogspot.com/
It's probably a handheld fan made out of a piece of p
> By the way, the reason I am naming it __module_level_func() is because
> I'd like __module_level_func() to be private to the module, like the C
> static function. If the interpreter cannot really enforce it, at least
> it is some sort of naming convention for me.
re the above: set file permissio
On Aug 18, 5:40 pm, beginner <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
> I have encountered a small problems. How to call module functions
> inside class instance functions? For example, calling func1 in func2
> resulted in a compiling error.
>
> "my module here"
>
> def func1():
> print "
On Aug 17, 2:06 pm, Jonathan Shan <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm experiencing a problem where the float being appended to the array
> is not the same as the result of the appending.
>
> >>> from array import *
> >>> x = array('f')
> >>> x.append(float("0.1"))
> >>> x[0]
> 0.1000149
On Aug 14, 2:30 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > I set PYTHONPATH to /home/me/bin in bash.bashrc, however the IDLE path
> > browser is not recognizing this. Not sure why.
>
> > Grateful for any insight.
>
> The file "bash.bashrc" has no relevance. If you meant to set the
> vari
On Aug 14, 1:52 pm, Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote:
> What order does info get returned in by os.listdir() ?
>
> I'm just starting to write python code, on an Win XP Pro machine. I've got
> various directories which, when I look at them in Win XP, sorted by name, I
> see in order, eg:
On Aug 14, 1:52 pm, Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote:
> What order does info get returned in by os.listdir() ?
>
> I'm just starting to write python code, on an Win XP Pro machine. I've got
> various directories which, when I look at them in Win XP, sorted by name, I
> see in order, eg:
On Aug 13, 6:17 pm, Alex <[EMAIL PROTECTED]> wrote:
> Hello, I am rather new to python. Maybe my thinking is in the
> paradigm of C++, that makes me hard to make sense of some python
> scripts (interacting with C# code) written by my colleague. I am
> thinking of outputting all objects and their
On Aug 11, 9:40 am, "Adam W." <[EMAIL PROTECTED]> wrote:
> After a fair amount of troubleshooting of why my lists were coming
> back a handful of digits short, and the last digit rounded off, I
> determined the str() function was to blame:
>
> >>> foonum
>
> 0.0071299720384678782
>
> >>> str(foonum
On Aug 10, 1:12 am, Peter Otten <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I have to print float numbers to a file. Each float should be 5
> > characters in width (4 numbers and the decimal point).
> > My problem is that I do not now how to specify float to have different
> > number
On Aug 6, 10:54 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> On 8/6/07, Stef Mientki <[EMAIL PROTECTED]> wrote:
>
>
>
> > hello,
>
> > Most of time I get an error message, it is sufficient to solve to problem.
> > Sometimes it's not clear to me what the problem is
> > like this one:
>
> > N
On Aug 6, 12:15 pm, [EMAIL PROTECTED] wrote:
> Hi all,
> I am trying to convert an RTF file to a Tiff image using Python. This
> process will convert several hundred images daily. Currently I am
> able to get the RTF file into a text format using Rtf2Txt.py, but I
> loose the images contained in
BTW - on the subject of polite discussions, how about this one as an
example of opinions politely expressed.
Oh, and does anyone know how to use zip in Python. Yes+1.
--
http://mail.python.org/mailman/listinfo/python-list
On the discussion of rudeness, we have to include the OP. He/She/it
did not even attempt a Google before posting, and posted with a
meaningless subject. We'll chalk that up to newness, but some sort of
retort was called for IMHO. How else do we learn the conventions that
govern rudeness. Person
> In the utter absence of any clues from the OP, Marc was demonstrating
> one possible way that the puzzling [Can't subtract one Decimal
> instance from another???] error message could have been caused.
Ah yes. Until this is no longer true, "In the utter absence of any
clues from the OP", we can
> from decimal import Decimal
>
> In [21]: a = Decimal()
>
> In [22]: class Decimal(object):
>: pass
>:
>
> In [23]: b = Decimal()
>
> In [24]: a - b
Perhaps I don't understand what you are doing here, but on line 22 you
overload Decimal. If you just have
a = Decimal()
b = Dec
If you want to only display data in a table format, try
MultiListBox.py. Just download and run for a demo.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52266
--
http://mail.python.org/mailman/listinfo/python-list
> >>> Short_Text="n=90; if n==90:print 'ok'"
> >>> compound_lines = Short_Text.split(";")
> >>> for line in compound_lines:
> ... line = line.replace(":", ":\n")
> ... print line
> ...
> n=90
> if n==90:
> print 'ok'
A variation of this will work if the input file isn't too
compl
> > [EMAIL PROTECTED] wrote:
> > > NEW TEXT : "Hello world;\nHello:\n\t\t\n\n\n\n\n\nHello2"
If you are doing all of this to format the output into columns,
Python's print() or write() will do this, and is easier as well. Some
more info on what you want to do will clear things up.
--
http://ma
On Jul 27, 2:56 pm, beginner <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am really new to Tk and Tkinter. I googled the web but it was not
> mentioned how to build a data grid with Tkinter.
>
> Basically, I want to show an excel like data grid with fixed column
> and row headers and sortable columns
On Jul 27, 11:26 am, Wildemar Wildenburger <[EMAIL PROTECTED]>
wrote:
> [EMAIL PROTECTED] wrote:
> >> If I understand you correctly you want to replace ";" by ";\n" and ":"
> >> by ":\n\t\t\t\t\t\t\t".
> >> Well guess what? The replace() method does just this. Have a read:
> >> http://docs.python.o
On Jul 27, 8:23 am, [EMAIL PROTECTED] wrote:
> Hello,
>
> I have one question about string.I am trying to make an function to
> analyze line of some text, this is my example: "HELLO;HELLO2:WORLD:",
> if that function in this text find ";" and ":" ( in this example will
> find both)
>
> e.g that
On Jul 21, 7:48 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
> "Rustom Mody" <[EMAIL PROTECTED]> wrote:
> > Can someone who knows about python internals throw some light on why
> x in dic
> > is cheaper than
> dic.has_key(x)
>
> > ??
>
>From the 2.6 PEP #361 (looks like dict.has_key is de
On Jul 17, 12:47 pm, orehon <[EMAIL PROTECTED]> wrote:
> Hello,
> I need to convert PDF to ODT or PDF to DOC using python!
>
> I was taking a look
> athttp://www.kde-apps.org/content/show.php/show.php?content=18638&vote=...
> and this project is outdated.
>
> So any idea?
>
> Thank you!
I
On Jul 19, 8:35 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Alex Mont" <[EMAIL PROTECTED]> wrote in message
> I have a 2-dimensional Numeric array with the shape (2,N) and I want to
> remove all duplicate rows from the array. For example if I start out
> with:
> [[1,2],
> [1,3],
> [1,2],
> [2,3
> rpt_file.writelines('\t' + [song].keys() \
> + '\t' +
> I get the following error:
>
> Traceback (most recent call last):
> AttributeError: 'list' object has no attribute 'keys'
All of these messages are correct. The fi
On Jul 17, 2:13 pm, "Dee Asbury" <[EMAIL PROTECTED]> wrote:
> In multiplying a value of xe^-325 with ye^-4, Python is returning zero. How
> do I get it to give me back my tiny value?
>
> Thanks!
> Dee
Also, Python's decimal class allows theoretically unlimited
precision. I have extremely limited
On Jul 16, 8:16 pm, [EMAIL PROTECTED] wrote:
> import gtk and Tkinter modules. Those don't seem to be included when
> I use the default ./configure or python setup.py.
Tkinter is supposed to be included by default, although that depends
on who's Python you are using and ./configure. You have to
100 matches
Mail list logo