On May 5, 2:00 am, Joel Juvenal Rivera Rivera
wrote:
> I want to make something very similar to the command tail -f (follow a
> file), i have been trying with some while True and some microsleeps
> (about .1 s); did someone has already done something like this?
>
> And about the file is the apac
On Mon, May 4, 2009 at 11:08 PM, Steven D'Aprano
wrote:
> On Mon, 04 May 2009 17:54:50 -0400, Terry Reedy wrote:
>
>> bearophileh...@lycos.com wrote:
>>
>>> Another possible syntax:
>>>
>>> def fact(n):
>>> return 1 if n <= 1 else n * return(n - 1)
>>>
>>> But I guess most people don't see thi
Could you tell me does Python have any advantages over Java for the development
of GUI applications?
Thanks,
Srini
Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo!
Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox
--
http://mail.python.org/mailman/list
On May 4, 8:22 pm, Steven D'Aprano
wrote:
> On Mon, 04 May 2009 15:51:15 -0700, Carl Banks wrote:
> > All
> > recursion does it make what you're doing a lot less readable for almost
> > all programmers.
>
> What nonsense.
It's not nonsense for a singly-linked list. I don't need to be taught
the
On Mon, 04 May 2009 17:54:50 -0400, Terry Reedy wrote:
> bearophileh...@lycos.com wrote:
>
>> Another possible syntax:
>>
>> def fact(n):
>> return 1 if n <= 1 else n * return(n - 1)
>>
>> But I guess most people don't see this problem as important&common
>> enough to justify changing the l
I want to make something very similar to the command tail -f (follow a
file), i have been trying with some while True and some microsleeps
(about .1 s); did someone has already done something like this?
And about the file is the apache acceslog of a site with a lot of
traffic.
Regards
joe
En Mon, 04 May 2009 23:25:42 -0300, Robert Dailey
escribió:
Thanks for your help guys. Unfortunately both ideas will not work. I
guess I should have mentioned that the batch file in question is
vsvars32.bat, from the Visual Studio installation directory. I should
not modify this file, nor can
"Napalmski" wrote in message
news:mpg.2469d7edf8bbcd0a989...@eu.news.astraweb.com...
Hello,
I have an encoded string in the form "004e006100700061006c006d", if you
split on every 4 characters it decodes to a single character.
I have come up with this:
name = '004e006100700061006c006d'
name2
On May 4, 11:01 pm, Ross wrote:
> Anyways, I'm new to
> programming and this has been a good learning experience.
I'm glad that you've been trying, and seem to be sticking it out
despite sometimes getting negative feedback here.
> Next time around, I'll be sure to thoroughly comment
> my code be
Hello,
I have an encoded string in the form "004e006100700061006c006d", if you
split on every 4 characters it decodes to a single character.
I have come up with this:
name = '004e006100700061006c006d'
name2 = ""
for x in range(0, len(name), 4):
name2 = name2 + chr(int(name[x:x+4], 16))
Is t
On May 4, 10:30 pm, Soumen banerjee wrote:
> Hello,
> I had used python on windows and one of the features i liked best was
> that you could start a module-docs server and then use firefox to
> access it.
pydoc -p
--
http://mail.python.org/mailman/listinfo/python-list
dmoore wrote:
Does anyone know of a way to get the unique pathname for files stored
on FAT32 or other case insensitive drives?
For example:
os.path.samefile('/media/usbkey/file1.jpg','/media/usbkey/FILE1.jpg')
returns True
but, is there a simple way to determine whether '/media/usbkey/
file1.
Piet van Oostrum wrote:
AJ> if __name__ == '__main__':
AJ>THREADS = []
AJ>for i in range(CONCURRENCY):
AJ>THREADS.append(threading.Thread(target=threadProcessRecipient))
AJ>for thread in THREADS:
AJ>thread.run()
You should use thread.start(), not thread.run(). W
On Mon, 04 May 2009 16:33:13 -0700, Carl Banks wrote:
> On May 4, 4:06 pm, bearophileh...@lycos.com wrote:
>> Carl Banks:
>>
>> >1. Singly-linked lists can and should be handled with iteration.<
>>
>> I was talking about a binary tree with list-like topology, of course.
>
> "(every node has 1 chi
Does anyone know of a way to get the unique pathname for files stored
on FAT32 or other case insensitive drives?
For example:
os.path.samefile('/media/usbkey/file1.jpg','/media/usbkey/FILE1.jpg')
returns True
but, is there a simple way to determine whether '/media/usbkey/
file1.jpg' or '/media/
On Mon, 04 May 2009 15:51:15 -0700, Carl Banks wrote:
> All
> recursion does it make what you're doing a lot less readable for almost
> all programmers.
What nonsense. There are many algorithms that are more understandable
written recursively than iteratively -- consult any good text book for
e
On May 4, 7:33 pm, John Yeung wrote:
> On May 4, 8:56 pm, Ross wrote:
>
> > Anyways, you're right that seq[0] is always evaluated.
> > That's why my algorithm works fine when there are odd
> > numbers of players in a league.
>
> It doesn't work fine for all odd numbers of players. For example, 1
Hi Soumen,
You could try running the Python Package Manager that we are developing
on sourceforge.
There isn't a release yet but we have implemented two buttons inside
the program for 'Examples' and 'Documentation'.
What they do is go off and find any documentation files or example
directories f
On May 4, 8:56 pm, Ross wrote:
> Anyways, you're right that seq[0] is always evaluated.
> That's why my algorithm works fine when there are odd
> numbers of players in a league.
It doesn't work fine for all odd numbers of players. For example, 15
players on 3 courts should result in 5 byes. Bu
Hello,
I had used python on windows and one of the features i liked best was
that you could start a module-docs server and then use firefox to
access it. This would show module-docs for all modules you had
installed(including any 3rd party installs) . How do i do this on
linux?
regards
Soumen
--
ht
On May 1, 4:18 pm, Aaron Brady wrote:
> On May 1, 12:09 am, Robert Dailey wrote:
>
> > I'm currently calling subprocess.call() on a batch file (in Windows)
> > that sets a few environment variables that are needed by further
> > processes started via subprocess.call(). How can I persist the
> > e
On May 4, 7:59 pm, John Yeung wrote:
> On May 4, 10:01 am, Ross wrote:
>
> > The "magic numbers" that everyone is wondering about are
> > indeed used for spreading out the bye selection and I got
> > them by simply calculating a line of best fit when plotting
> > several courts: byes ratios.
>
>
Thank you _ that solved it.
Amélie
Please consider the environment before printing this e-mail or any of its
attachments (if applicable)
-Original Message-
From: python-list-bounces+aydavis=purdue@python.org
[mailto:python-list-bounces+aydavis=purdue@python.org] On Be
definitive on Toplevel was the biggest help. All I have read have
never clearly stated its purpose. (A non-root root)
per Tkinter help:
"class Toplevel(BaseWidget, Wm)
Toplevel widget, e.g. for dialogs.
...
"
Since I'm not doing dialogs, I quite reading and move on.
John: Thank you again.
Today: 20090504
copy/paste from Python 2.5.2 on Linux Slackware 10.2
Steve
norse...@hughes.net
--
http://mail.python.org/mailman/listinfo/python-list
On May 4, 10:01 am, Ross wrote:
> The "magic numbers" that everyone is wondering about are
> indeed used for spreading out the bye selection and I got
> them by simply calculating a line of best fit when plotting
> several courts: byes ratios.
But that doesn't really help you. When you do seq[::
On May 4, 7:51 pm, Emile van Sebille wrote:
> On 5/4/2009 4:30 PM Amber said...
>
>
>
>
>
> > My PHB is insane.
>
> > Today he drops 50,000 databases in MS Access format on my desk, and
> > tells me that by Friday I need to:
> > * Remove all of the "junk content" in the record fields;
> > * Remove
On 5/4/2009 4:30 PM Amber said...
My PHB is insane.
Today he drops 50,000 databases in MS Access format on my desk, and
tells me that by Friday I need to:
* Remove all of the "junk content" in the record fields;
* Remove all records with blank fields in them;
* Correct all fields in which the
On May 4, 4:06 pm, bearophileh...@lycos.com wrote:
> Carl Banks:
>
> >1. Singly-linked lists can and should be handled with iteration.<
>
> I was talking about a binary tree with list-like topology, of course.
"(every node has 1 child, and they are chained)"
That's a singly-linked list, not a tre
My PHB is insane.
Today he drops 50,000 databases in MS Access format on my desk, and tells me
that by Friday I need to:
* Remove all of the "junk content" in the record fields;
* Remove all records with blank fields in them;
* Correct all fields in which the markup is "wrong";
* Correct all field
Carl Banks:
>1. Singly-linked lists can and should be handled with iteration.<
I was talking about a binary tree with list-like topology, of course.
>All recursion does it make what you're doing a lot less readable for almost
>all programmers.<
I can't agree. If the data structure is recursiv
Soumen banerjee writes:
> Is there any IDE with support for autocomplete in python 2.6 with all
> the newer functions included?
Emacs, with the right library, is an excellent Python IDE with
auto-completion and many other features
http://tellarite.net/2008/05/09/emacs-as-a-powerful-python-ide/>.
On May 4, 1:25 pm, bearophileh...@lycos.com wrote:
> Aahz:
>
> > When have you ever had a binary tree a thousand levels deep?
>
> Yesterday.
>
> >Consider how big 2**1000 is...<
>
> You are thinking just about complete binary trees.
> But consider that a topology like a single linked list (every no
MRAB wrote:
If you're not limited to ASCII then there's '←' (U+2190, 'LEFTWARDS
ARROW'). It's a little too late now, though.
Well, if you are old enough, that was the ASCII graphic for the
character now printed as '_' (ASCII), and SAIL used it for assignment
statements, causing much consternatio
Antoon Pardon wrote:
On 2009-04-24, Steven D'Aprano wrote:
On Fri, 24 Apr 2009 03:00:26 -0700, GC-Martijn wrote:
Hello,
I'm trying to do a if statement with a function inside it. I want to use
that variable inside that if loop , without defining it.
def Test():
return 'Vla'
I searching
En Mon, 04 May 2009 19:14:53 -0300, Chris Rebert escribió:
On Mon, May 4, 2009 at 3:02 PM, wrote:
In a python program I ask if the user wants to continue. If they answer
'no', what options do I have to halt execution? I can put the rest of
the
code inside an "if bContinue:" block, but th
Arnaud Delobelle wrote:
In that case the following would not grow the stack, given tail-call
optimization:
def visit(node):
print 'visiting', node
if node.right is None:
return visit(node.left)
if node.left is not None:
visit(node.left)
return visit(node.right)
> > I've just released the results of a nice Sunday's coding, inspired by
> > one too many turns at futzing around with the _winreg module. The
> > "regobj" module brings a convenient and clean object-based API for
> > accessing the Windows Registry.
>
> Sounds very interesting, Ryan. Just a c
On May 3, 12:22 am, CM wrote:
> On May 2, 4:36 pm, seanm...@gmail.com wrote:
>
>
>
> > I am going to try posting here again with more detail to see if I can
> > finally get my first program to work.
>
> > I am working on a MacBook Pro with OS X 10.4.11. I opened a new window
> > in IDLE to create
robert.t.ly...@seagate.com wrote:
In a python program I ask if the user wants to continue. If they answer
'no', what options do I have to halt execution? I can put the rest of
the code inside an "if bContinue:" block, but that seems awkward. I
have looked at raising an exception, and perha
flam...@gmail.com wrote:
... Using this code, I can get information like the name of the symbol
(x), but I can't figure out how to get the type. If I knew how to get
this it would solve 99% of my problems :)
If Python were statically typed, you might be correct.
A _value_ in python has a type,
Rhodri James wrote:
On Mon, 04 May 2009 15:25:44 +0100, Antoon Pardon
wrote:
On 2009-04-24, Steven D'Aprano
wrote:
On Fri, 24 Apr 2009 03:00:26 -0700, GC-Martijn wrote:
Hello,
I'm trying to do a if statement with a function inside it. I want to
use
that variable inside that if loop , w
On Mon, May 4, 2009 at 3:02 PM, wrote:
>
> In a python program I ask if the user wants to continue. If they answer
> 'no', what options do I have to halt execution? I can put the rest of the
> code inside an "if bContinue:" block, but that seems awkward. I have looked
> at raising an exception
In a python program I ask if the user wants to continue. If they answer
'no', what options do I have to halt execution? I can put the rest of the
code inside an "if bContinue:" block, but that seems awkward. I have
looked at raising an exception, and perhaps this is the preferred method,
but
Matthias Gallé wrote:
Hi.
My problem is to replace all occurrences of a sublist with a new element.
Example:
Given ['a','c','a','c','c','g','a','c'] I want to replace all
occurrences of ['a','c'] by 6 (result [6,6,'c','g',6]).
If I do this with string ('acaccgac') I have the advantage of all
bearophileh...@lycos.com wrote:
Another possible syntax:
def fact(n):
return 1 if n <= 1 else n * return(n - 1)
But I guess most people don't see this problem as important&common
enough to justify changing the language.
Actually, I would like a way to refer to the current function from
En Mon, 04 May 2009 15:12:41 -0300, mzdude escribió:
substring isn't limited to 0..255
substring = "\0x%d\0x%d" % (257,257)
'acaccgac'.replace("ac", substring)
'\x00x257\x00x257\x00x257\x00x257cg\x00x257\x00x257'
This isn't what you think it is. Look carefully:
py> substring = "\0x%d\0x%d"
On Mon, 04 May 2009 15:25:44 +0100, Antoon Pardon
wrote:
On 2009-04-24, Steven D'Aprano
wrote:
On Fri, 24 Apr 2009 03:00:26 -0700, GC-Martijn wrote:
Hello,
I'm trying to do a if statement with a function inside it. I want to
use
that variable inside that if loop , without defining it
bearophileh...@lycos.com writes:
> Aahz:
>> When have you ever had a binary tree a thousand levels deep?
>
> Yesterday.
>
>
>>Consider how big 2**1000 is...<
>
> You are thinking just about complete binary trees.
> But consider that a topology like a single linked list (every node has
> 1 child, a
Allan Yuan wrote:
Hi,
I just wanna know how to set SYSTEM variables and USER variables of windows,
but got no way.
Firstly I thought "os.environ + os.system" may work well, but found no way
to let "os.environ" run to retrive USER variables.
Then I tried win32api, finding the GetEnvironmentVaria
> gganesh (g) wrote:
>g> Hi friends,
>g> I suppose sendmail() can send mails one by one ,how to send mails
>g> concurrently ,
>g> It would be very grateful,if someone could point out a solution.
There is a discussion about this in the thread `Threaded alternatives to
smtplib?'
--
Piet van
On Mon, May 4, 2009 at 1:25 PM, wrote:
> Aahz:
>> When have you ever had a binary tree a thousand levels deep?
>
> Yesterday.
>
>
>>Consider how big 2**1000 is...<
>
> You are thinking just about complete binary trees.
> But consider that a topology like a single linked list (every node has
> 1 c
watch out for:
for i in file... often returns just one character at a time,
meaning you will have to track EOL's yourself OR
import the readline and use it to stand a better chance of getting what
you expect from a read file function.
Today: 20090504
Logic outline, No particular versio
watch out for:
for i in file... often returns just one character at a time,
meaning you will have to track EOL's yourself OR
import the readline and use it to stand a better chance of getting what
you expect from a read file function.
Today: 20090504
Logic outline, No particular version
> Alex Jurkiewicz (AJ) wrote:
>AJ> def threadProcessRecipient():
[snip]
>AJ> if __name__ == '__main__':
>AJ>THREADS = []
>AJ>for i in range(CONCURRENCY):
>AJ>THREADS.append(threading.Thread(target=threadProcessRecipient))
>AJ>for thread in THREADS:
>AJ>thread.run()
Matthew Wilson wrote:
On Sun 03 May 2009 09:24:59 PM EDT, Ben Finney wrote:
Not every simple function belongs in the standard library :-)
Thanks for the help with this! Maybe I'm overestimating how often
people need this walkup function.
Matt
Look at os.path.normpath(os.path.j
Soumen banerjee wrote:
Hello,
I have just installed and run python 2.6.2 from the sources available
on the website. I notice that SPE (the editor which i used with python
2.5) is not displaying some of the functions new in 2.6 as
autocomplete options. Is there any IDE with support for autocomplet
flam...@gmail.com wrote:
On May 3, 3:14 pm, Dave Angel wrote:
flam...@gmail.com wrote:
Hello,
I am embedding python support in my C++ application and was looking at
adding "Intellisense" or "AutoComplete" support.
I found a way to do it using the "dir" function, but this creates
On May 4, 12:15 pm, a...@pythoncraft.com (Aahz) wrote:
> In article <8d4ec1df-dddb-469a-99a1-695152db7...@n4g2000vba.googlegroups.com>,
>
> Ross wrote:
>
> >def test_round_robin(players, rounds, courts, doubles = False):
> > players = range(players)
> > for week in round_robin(players,round
Aahz:
> When have you ever had a binary tree a thousand levels deep?
Yesterday.
>Consider how big 2**1000 is...<
You are thinking just about complete binary trees.
But consider that a topology like a single linked list (every node has
1 child, and they are chained) is a true binary tree still.
On Mon, 2009-05-04 at 19:51 +0100, Arnaud Delobelle wrote:
>
> Bearophile, there is a thread on python-ideas about tail-call
> optimization at the moment.
Oooh - haven't noticed that (and don't have time to follow it), but has
anyone seen the results I got a week or so ago from briefly playing wi
On May 4, 9:15 am, David Robinow wrote:
> On Mon, May 4, 2009 at 2:33 AM, namekuseijin
>
> wrote:
> ls = [(1,2), (3,4), (5, None), (6,7), (8, None)]
> [(x,y) for (x,y) in ls if y]
> > [(1, 2), (3, 4), (6, 7)]
>
> Nope. That filters out 0 as well as None. Not what the OP asked for.
True
utab wrote:
Dear all,
I have to change some lines from a template file, which is rather long
to paste here, but I would like to make some parts of some lines
optional with my command line arguments but I could not see this
directly, I can count the line numbers and decide on this basis to
decide
Grant Rettke writes:
> Hi folks,
>
> From one developer to another, I am looking for some personal
> recommendations on what are the best materials for fast tracking an on-
> boarding to Python and Django.
>
> I know how to program, get web apps and OO; this is the audience.
>
> I have found some
In article ,
wrote:
>Arnaud Delobelle:
>>
>> Bearophile, there is a thread on python-ideas about tail-call
>> optimization at the moment.
>
>Someday I'll have to start following those mailing lists...
>But I am not interested in such optimization. It's not going to help
>me significantly. Most t
Arnaud Delobelle:
> def fac(n):
> def rec(n, acc):
> if n <= 1:
> return acc
> else:
> return rec(n - 1, n*acc)
> return rec(n, 1)
Right, that's another way to partially solve the problem I was talking
about. (Unfortunately the performance in Python
utab wrote:
Dear all,
I have to change some lines from a template file, which is rather long
to paste here, but I would like to make some parts of some lines
optional with my command line arguments but I could not see this
directly, I can count the line numbers and decide on this basis to
decide
bearophileh...@lycos.com writes:
> Steve Howell:
>>two methods with almost identical names, where one function is the
>>public interface and then another method that does most of the
>>recursion.<
>
> Thanks Guido & Walter both Python and D support nested functions, so
> in such situations I put t
grahamdic...@gmail.com wrote:
Hi
I have an excel file that is read into python (8000 rows)
from csvimport reader, writer
incsv = reader(open(MY_FILE), dialect='excel')
keys = incsv.next()
There are mixed datatypes.
the last column contains a cumulative frequency running in order
0.000
Dear all,
I have to change some lines from a template file, which is rather long
to paste here, but I would like to make some parts of some lines
optional with my command line arguments but I could not see this
directly, I can count the line numbers and decide on this basis to
decide the lines to
For my edification I was looking through the source code of
pychecker. I noticed that there was also a pychecker2 directory
(ubuntu). The pychecker command line tool points to pychecker (w/out
the 2). Does anyone know off the top of their head what this second
directory is about?
thanks
qhfgva
Steve Howell:
>two methods with almost identical names, where one function is the public
>interface and then another method that does most of the recursion.<
Thanks Guido & Walter both Python and D support nested functions, so
in such situations I put the recursive function inside the "public
int
Hi
I have an excel file that is read into python (8000 rows)
from csvimport reader, writer
incsv = reader(open(MY_FILE), dialect='excel')
keys = incsv.next()
There are mixed datatypes.
the last column contains a cumulative frequency running in order
0. to 1. for the 8000 rows
f
On May 4, 9:01 am, Matthias Gallé wrote:
> bearophileh...@lycos.com wrote:
> > John O'Hagan:
> >> li=['a', 'c', 'a', 'c', 'c', 'g', 'a', 'c']
> >> for i in range(len(li)):
> >> if li[i:i + 2] == ['a', 'c']:
> >> li[i:i + 2] = ['6']
>
> > Oh well, I have done a mistake, it seems.
> > A
Hi folks,
>From one developer to another, I am looking for some personal
recommendations on what are the best materials for fast tracking an on-
boarding to Python and Django.
I know how to program, get web apps and OO; this is the audience.
I have found some good recommendations and stuff on Am
Dear folks,
I'm just working on a pyQT4 version of my txt to html converter thc (see
listick.org for details).
I created the MainWindow with QT Designer and then converted it to .py
with pyuic4. It works well so far. Then I created a new UI for my
abtDialog (about dialog for my application).
> Which brings us backs to the "20 questions"-part of my earlier post. It
> could be, but it could also be that processing takes seconds. Or it takes
> so long that even concurrency won't help. Who knows?
Probably the OP ;)
Geremy Condra
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 4 May 2009, Francesco Guerrieri wrote:
> On Mon, May 4, 2009 at 3:01 PM, John O'Hagan wrote:
> > On Mon, 4 May 2009, Matthias Gallé wrote:
> > > Hi.
> > >
> > > My problem is to replace all occurrences of a sublist with a new
> > > element.
> > >
> > > Example:
> > > Given ['a','c','a','c'
Mike Driscoll wrote:
> On May 4, 10:13 am, Soumen banerjee wrote:
>> Hello,
>> I have just installed and run python 2.6.2 from the sources available
>> on the website. I notice that SPE (the editor which i used with python
>> 2.5) is not displaying some of the functions new in 2.6 as
>> autocompl
In article <68d22002-fc0a-4590-9395-c78b6ee41...@r34g2000vba.googlegroups.com>,
Alexzive wrote:
>
>I have this matrix [20*4 - but it could be n*4 , with n~100,000] in
>file "EL_list" like this:
Take a look at NumPy
--
Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/
On approximately 5/3/2009 7:35 AM, came the following characters from
the keyboard of Ryan Kelly:
Hi All,
I've just released the results of a nice Sunday's coding, inspired by
one too many turns at futzing around with the _winreg module. The
"regobj" module brings a convenient and clean objec
I just started a project to monitor servers(load, memory, processes,
etc) via ssh(using paramiko). And I was hoping to get some input on
the design of my project, how pythonic it is, etc. It is quite basic
right now. But it is currently able to get load and memory stats from
any number of servers.
In article ,
=?ISO-8859-1?Q?Matthias_Gall=E9?= wrote:
>
>My problem is to replace all occurrences of a sublist with a new element.
>
>Example:
>Given ['a','c','a','c','c','g','a','c'] I want to replace all
>occurrences of ['a','c'] by 6 (result [6,6,'c','g',6]).
What's your goal? After you do
In article <8d4ec1df-dddb-469a-99a1-695152db7...@n4g2000vba.googlegroups.com>,
Ross wrote:
>
>def test_round_robin(players, rounds, courts, doubles = False):
>players = range(players)
>for week in round_robin(players,rounds,courts):
> if doubles == True:
> doub
Hi,
I just wanna know how to set SYSTEM variables and USER variables of windows,
but got no way.
Firstly I thought "os.environ + os.system" may work well, but found no way
to let "os.environ" run to retrive USER variables.
Then I tried win32api, finding the GetEnvironmentVariables() mixing SYSTEM
On Sun 03 May 2009 09:24:59 PM EDT, Ben Finney wrote:
> Not every simple function belongs in the standard library :-)
Thanks for the help with this! Maybe I'm overestimating how often
people need this walkup function.
Matt
--
http://mail.python.org/mailman/listinfo/python-list
On May 3, 8:29 pm, John Machin wrote:
> On May 4, 12:36 pm, Ross wrote:
>
>
>
> > For the past couple weeks, I've been working on an algorithm to
> > schedule tennis leagues given court constraints and league
> > considerations (i.e. whether it's a singles or a doubles league). Here
> > were my r
Ok! So, I decided to write a C-extension instead of using ctypes. So
far, I create a module called dnotifier and the handler callback
receives two arguments, the signal number and the respective file
descriptor that was modified.
This works beautifully. Now, I want to release this to the public, s
On May 4, 10:13 am, Soumen banerjee wrote:
> Hello,
> I have just installed and run python 2.6.2 from the sources available
> on the website. I notice that SPE (the editor which i used with python
> 2.5) is not displaying some of the functions new in 2.6 as
> autocomplete options. Is there any IDE
On May 3, 3:39 pm, bearophileh...@lycos.com wrote:
> Sometimes I rename recursive functions, or I duplicate&modify them,
> and they stop working because inside them there's one or more copy of
> their old name.
> This happens to me more than one time every year.
> So I have written this:
>
> from i
On May 4, 3:57 pm, "Gabriel Genellina" wrote:
> En Mon, 04 May 2009 10:27:49 -0300, Amr escribió:
>
> > I've been spending the last few days experimenting with Tkinter. The
> > grid manager is nice and easy to use, but I have found that I am often
> > having to specify padx and pady options to ev
Hello,
I have just installed and run python 2.6.2 from the sources available
on the website. I notice that SPE (the editor which i used with python
2.5) is not displaying some of the functions new in 2.6 as
autocomplete options. Is there any IDE with support for autocomplete
in python 2.6 with all
Matthias Gallé wrote:
bearophileh...@lycos.com wrote:
John O'Hagan:
li=['a', 'c', 'a', 'c', 'c', 'g', 'a', 'c']
for i in range(len(li)):
if li[i:i + 2] == ['a', 'c']:
li[i:i + 2] = ['6']
Oh well, I have done a mistake, it seems.
Another solution then:
'acaccgac'.replace("ac", c
En Mon, 04 May 2009 10:27:49 -0300, Amr escribió:
I've been spending the last few days experimenting with Tkinter. The
grid manager is nice and easy to use, but I have found that I am often
having to specify padx and pady options to every widget I add to my
grid. The way I am doing it is to cre
Matthias Gallé:
>the int that can replace a sublist can be > 255,<
You didn't specify your integer ranges.
Probably there are many other solutions for your problem, but you have
to give more information. Like the typical array size, typical range
of the numbers, how much important is total memory
bearophileh...@lycos.com wrote:
John O'Hagan:
li=['a', 'c', 'a', 'c', 'c', 'g', 'a', 'c']
for i in range(len(li)):
if li[i:i + 2] == ['a', 'c']:
li[i:i + 2] = ['6']
Oh well, I have done a mistake, it seems.
Another solution then:
'acaccgac'.replace("ac", chr(6))
'\x06\x06cg\x06
On 2009-04-24, Steven D'Aprano wrote:
> On Fri, 24 Apr 2009 03:00:26 -0700, GC-Martijn wrote:
>
>> Hello,
>>
>> I'm trying to do a if statement with a function inside it. I want to use
>> that variable inside that if loop , without defining it.
>>
>> def Test():
>> return 'Vla'
>>
>> I sear
On May 3, 10:16 pm, John Yeung wrote:
> On May 3, 11:29 pm, Chris Rebert wrote:
>
> > Probably not the cause of the problem, but where
> > did the magic numbers 1.072 and 1.08 come from?
>
> It is perhaps not the most direct cause of the problem, in the sense
> that the magic numbers could take v
On May 3, 3:14 pm, Dave Angel wrote:
> flam...@gmail.com wrote:
> > Hello,
> > I am embedding python support in my C++ application and was looking at
> > adding "Intellisense" or "AutoComplete" support.
>
> > I found a way to do it using the "dir" function, but this creates a
> > problem. Here's w
On May 4, 7:01 am, Ross wrote:
> On May 3, 10:16 pm, John Yeung wrote:
>
>
>
> > On May 3, 11:29 pm, Chris Rebert wrote:
>
> > > Probably not the cause of the problem, but where
> > > did the magic numbers 1.072 and 1.08 come from?
>
> > It is perhaps not the most direct cause of the problem, in
Matthew Wilson wrote:
> Is there already a tool in the standard library to let me walk up from a
> subdirectory to the top of my file system?
>
> In other words, I'm looking for something like:
>
> >>> for x in walkup('/home/matt/projects'):
> ... print(x)
> /home/matt/projects
>
1 - 100 of 131 matches
Mail list logo