[EMAIL PROTECTED] wrote:
>i was wondering if anyone have written a GUI module that can
> function as a replacment for stdin/stdout? ie. has a file like
> interface, by which one could just assaign it to sys.stdout or
> sys.stdin and have all your prints and raw_inputs and other such things
> sh
Peter Hansen wrote:
> Gopal wrote:
>> [...] I'm
>> thinking of going with this format by having "Param Name - value". Note
>> that the value is a string/number; something like this:
>>
>> PROJECT_ID = "E4208506"
>> SW_VERSION = "18d"
>> HW_VERSION = "2"
>>
>> In my script, I need to parse
Hi
I'm making a server-side solution in Python and need to be able to
communicate through bluetooth. Is there any bluetooth-packages out there for
python?
regards tores
--
http://mail.python.org/mailman/listinfo/python-list
Anyone know a module that does CRC16 for Python? I have an aplication
that I need to run it, and am not having alot of sucess. I have a
program in C that uses a CRC16 according to CCITT standards, but need
to get a program that tests it with python as well. Thanks!
--
http://mail.python.org/mailm
Steven D'Aprano wrote:
> On Thu, 22 Sep 2005 19:09:28 +0400, en.karpachov wrote:
>
>
>>There is an other way around: look at your home dir as if it is your
>>"settings" dir and don't clutter it with files other than application
>>config dot-files. Just make ~/files/, ~/bin/ ~/lib/ etc. for it.
Steven D'Aprano wrote:
> Or wait, I have thought of one usage case: if you are returning a value
> that you know will be used only as a flag, you should convert it into a
> bool. Are there any other uses for bool()?
We could, of course, get along without it. One use for
canonical true and false v
On Fri, 23 Sep 2005, Collin Winter wrote:
> If possible, I'd like to see this go in before 3.0. The reference manual
> currently states [2] that __builtins__ can be either a dict or a module,
> so changing it to always be a module would still be in keeping with
> this. However, I realise that t
On Fri, 23 Sep 2005, Scott David Daniels wrote:
> Adriano Monteiro wrote:
>
>> I'm making a little research project about programming languages e
>> their respective IDEs. The goal is to trace each language silhouettes,
>> where it fits better, their goods/bads and the costs of developing in
>
Collin Winter wrote:
> As it currently stands, the type of the global __builtins__ differs
> depending on whether you're in the __main__ namespace (__builtins__ is
> a module) or not (its a dict). I was recently tripped up by this
> discrepancy, and googling the issue brings up half-a-dozen or so
Hello,
I am trying to move focus between Tkinter (and other)
widgets.
A solution similar with my approach was suggested by
Eric Brunel at
http://mail.python.org/pipermail/python-list/2004-July/229971.html
It will generate an error:
Exception in Tkinter callback
Traceback (most recent call last):
The first URL back from Google is:
http://www.onembedding.com/tools/python/code/crc16.htm
Site is Russian, but crc16.py that is listed there has
English comments. Maybe you can use some/all of it.
-Larry Bates
Tuvas wrote:
> Anyone know a module that does CRC16 for Python? I have an aplication
Hello,
I think I've tried everything now and can't figure out how to do it.
I want to read in a text list from the current directory,
and for each line in the list, make a system directory for that name.
My text file would look something like this:
1144
1145
1146
1147
I simply want to create thes
I'm looking for a lightweight dialog boxes from Python.
JavaScript uses: alert(), confirm() and prompt()
VB uses: MsgBox() and InputBox()
EasyGui seemed perfect, but a "Hello World" application takes nearly a
minute to execute after the program has been compiled by py2exe.
There appear to be dozen
DataSmash <[EMAIL PROTECTED]> wrote
> I think I've tried everything now and can't figure out how to do it.
> I want to read in a text list from the current directory,
> and for each line in the list, make a system directory for that name.
>
> My text file would look something like this:
> 1144
> 1
DataSmash wrote:
>Hello,
>I think I've tried everything now and can't figure out how to do it.
>I want to read in a text list from the current directory,
>and for each line in the list, make a system directory for that name.
>
>My text file would look something like this:
>1144
>1145
>1146
>1147
>
Ron Adam wrote:
> Erik Max Francis wrote:
>
>>Ron Adam wrote:
>>
>>
>>>When you call a method of an instance, Python translates it to...
>>>
>>> leader.set_name(leader, "John")
>>
>>
>>It actually translates it to
>>
>>Person.set_name(leader, "John")
>>
>
>
> I thought that I might have
IMHO, the fact that there is no way to wait for the application to
finish is major deficiency with os.startfile() -- and why I often
cannot use it instead of other techniques [such as the much more
involved but limited os.spawnv() function].
I don't if if this is just a limitation of the implement
Collin Winter wrote:
> Hallo all,
> I'd like to propose that in Py3.0 (if not earlier), __builtins__ will
> be the same type regardless of which namespace you're in. Tim Peters
> has said [1] that the reason __builtins__ in __main__ is a module so
> that "the curious don't get flooded with output w
On 9/23/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Collin Winter wrote:
>
> > As it currently stands, the type of the global __builtins__ differs
> > depending on whether you're in the __main__ namespace (__builtins__ is
> > a module) or not (its a dict). I was recently tripped up by this
> > d
Jeremy Jones wrote:
> DataSmash wrote:
>
> >Hello,
> >I think I've tried everything now and can't figure out how to do it.
> >I want to read in a text list from the current directory,
> >and for each line in the list, make a system directory for that name.
> >
> >My text file would look something
I am using bash shell on windows and I'm getting the error:
TypeError: loop over non-sequence
Is there any way around not messing with the text file.
I want to batch generate the text lists as well.
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 23 Sep 2005 11:49:51 +0100, Steve Holden <[EMAIL PROTECTED]> wrote:
>I've even tried communicating with postmaster at all relevant domains,
>but such messages are either bounced or ignored, so I've just filtered
>that domain out.
>
Yeah, but I thought maybe there could be a way to detect
Hello,
i'm looking for a simple http proxy in python.
Does anybody know about something like this ?
--
http://mail.python.org/mailman/listinfo/python-list
py> from tkMessageBox import askquestion, showerror
py> from tkSimpleDialog import askfloa
py> a = askfloat('Census Data', 'Enter Salary')
py> print a
12500.51
py> a = askquestion('Opinion', 'Do you think windoze sucks?')
py> print a
yes
py> a = showerror('Problem','Program Crashed before Starting'
On 9/23/05, Christopher Subich <[EMAIL PROTECTED]> wrote:
> How would this change, if made in a minimal way, impact the "provide
> alternate globals() and locals() to eval and exec" feature? Altering
> __builtins__ is a half-assed way of providing some sort of security, but
> it's probably useful
OR...if python can't handle this type of text file,
what do I need to do to remove the "\n" from the file?
--
http://mail.python.org/mailman/listinfo/python-list
I want to parse a date string, for example '2005-09-23', and since I haven't
done this before I would like to ask what is the best way to do it.
I've looked around and the dateutil seems to be what most people use, but
unfortunately I only get an empty file when I try to download it. I also
tri
In the darkest hour on Fri, 16 Sep 2005 15:45:33 -0700,
York <[EMAIL PROTECTED]> screamed:
>>>/usr/local/lib/libgtkgl.so.4.0.0
>>>/usr/local/lib/libgtkgl.so.4
>>>
>>>Does anybody know a solution for this problem?
>>>
>>
>> You need libgtk-(open)gl package (i don't know the exact name in FC).
>>
>
Any luck on finding anyone to take over py2exe development Thomas? It's
a GREAT project and would be a shame to see it fall into obsolescence.
Thomas Heller wrote:
[snip]
>
> Is anyone interested in taking over the maintainance, documentation, and
> further development?
>
[snip]
--
http://mai
llothar wrote:
>Hello,
>
>i'm looking for a simple http proxy in python.
>Does anybody know about something like this ?
>
>
>
Here's a list, maintained by Alan Kennedy, of about 20 proxys written
in Python:
http://xhaus.com/alan/python/proxies.html
Enjoy,
Gary Herron
--
http://mail.pyth
"Martin Miller" <[EMAIL PROTECTED]> writes:
> IMHO, the fact that there is no way to wait for the application to
> finish is major deficiency with os.startfile() -- and why I often
> cannot use it instead of other techniques [such as the much more
> involved but limited os.spawnv() function].
>
>
> "kayakerjess" == kayakerjess <[EMAIL PROTECTED]> writes:
kayakerjess> Hi, I have an Access Data Project (.adp) that I am
kayakerjess> trying to open and execute from Python. I am using
kayakerjess> the win32com.client, and I have successfully opened
kayakerjess> the applica
DataSmash wrote:
> I am using bash shell on windows and I'm getting the error:
> TypeError: loop over non-sequence
Use open(filename).readlines() instead of open(filename) or switch to a
current Python version.
> OR...if python can't handle this type of text file,
> what do I need to do to remov
Hi,
trying to make a small script which would translate wiki file into
LaTeX and when trying to translate possible HTML elements into LaTeX I
did this:
def latexEnvironments(matchobj):
print >>sys.stderr,str(matchobj.groups())
inStr = matchobj.group(1)
translDict = {'dl': ('\\begin{de
Hi!
class A:
X = 2
def F():
print A.X
F()
The above fails because the name A is not
yet at global scope when the reference A.X
is reached. Is there any way to refer to A.X
without making explicit use of the name 'A'?
Admittedly the code looks pretty unusual,
but I'm defining configurati
Better than a single line of code? What is it that
you are looking for?
If you dates are consistent you can do:
year, month, day=map(int, d.split('-'))
but I'm not sure it is "better". I guess it depends
on what you want to do with them after parsing.
-Larry Bates
Kalle Anke wrote:
> I want
I agree this is a case for using metaclasses. What about an
implementation like this ? Seems like checking if init was already
called will slow down all attribute access significantly, but, I don't
like this approach of changing the __init__ method.
class LazyInit(type):
def __new__(self, n
Tuvas wrote:
> Anyone know a module that does CRC16 for Python? I have an aplication
> that I need to run it, and am not having alot of sucess. I have a
> program in C that uses a CRC16 according to CCITT standards, but need
> to get a program that tests it with python as well. Thanks!
I'll includ
Awesome! That worked!
Much thanks to Peter and all of you who took the time to answer my
question.
R.D.
--
http://mail.python.org/mailman/listinfo/python-list
You could use self.__class__.X
HTH, Ole
23 Sep 2005 14:01:21 -0700, Carlos <[EMAIL PROTECTED]>:
> Hi!
>
> class A:
> X = 2
> def F():
> print A.X
> F()
>
> The above fails because the name A is not
> yet at global scope when the reference A.X
> is reached. Is there any way to refer to
Benji York wrote:
> Robert Brewer wrote:
> > Actually, in this case we most definitely want to test
> > 2.4's "@" syntax. The decorator in question is an aliaser,
> > and therefore is one of the few
> > decorators which must be implemented differently for the 2.3-style
> > decoration and the 2.4
Tor Erik Sønvisen wrote:
> I'm making a server-side solution in Python and need to be able to
> communicate through bluetooth. Is there any bluetooth-packages out there for
> python?
At the lowest level, you should be able to create sockets for Bluetooth
communications (see the socket module's doc
It might be that I'm complicating something easy here, but I
immediately thought of
import sys
class A:
X = 2
def F():
f = sys._getframe().f_back
print f.f_locals["X"]
F()
--
http://mail.python.org/mailman/listinfo/python-list
Adriano Monteiro wrote:
> I'm making a little research project about programming languages e
> their respective IDEs. The goal is to trace each language silhouettes,
> where it fits better, their goods/bads and the costs of developing in
> this language.
You say this as though each language ha
James Stroud wrote:
> from tkMessageBox import showerror
> showerror('Problem','Program Crashed before Starting')
Thanks. That works great when interpreted (though a blank window seems
to open as well). Unfortunately it still takes 40 seconds to execute
after it has been 'compiled' with py2exe (
Collin Winter wrote:
> On 9/23/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>>__builtins__ is a CPython implementation detail. why not just let it
>>be an implementation detail, and refrain from using it? it's not that
>>hard, really.
> Given, but I fail to see why it can't be a consistent imple
I have installed python 2.3 on my Windows 2K laptop and I can run python
from the command prompt.
I have tried various ways to set PYTHONPATH with the various directories
where I have python programs (i.e. xx.py) but no matter how I set
PYTHONPATH I keep getting a message that python can't
Tuvas wrote:
> Anyone know a module that does CRC16 for Python? I have an aplication
> that I need to run it, and am not having alot of sucess. I have a
> program in C that uses a CRC16 according to CCITT standards, but need
> to get a program that tests it with python as well. Thanks!
>
Try this
D.S. Hein wrote:
> I have installed python 2.3 on my Windows 2K laptop and I can run python
> from the command prompt.
>
> I have tried various ways to set PYTHONPATH with the various directories
> where I have python programs (i.e. xx.py) but no matter how I set
> PYTHONPATH I keep getting a
On 9/23/05, Peter Hansen <[EMAIL PROTECTED]> wrote:
> User are clearly told in various places that names with leading and
> trailing double underscores are *special*, and at least by implication
> they are not to be used without a good understanding of what they are.
> You certainly shouldn't have
On 23/09/05, D.S. Hein <[EMAIL PROTECTED]> wrote:
> I have tried various ways to set PYTHONPATH with the various directories
> where I have python programs (i.e. xx.py) but no matter how I set
> PYTHONPATH I keep getting a message that python can't open the python
> file. If I try to specify t
Kalle Anke wrote:
>I want to parse a date string, for example '2005-09-23', and since I haven't
>done this before I would like to ask what is the best way to do it.
>
>I've looked around and the dateutil seems to be what most people use, but
>unfortunately I only get an empty file when I try to
Jeremy Sanders wrote:
> Colin J. Williams wrote:
>
>
>>Could you not have functions a and b each of which returns a NumArray
>>instance?
>>
>>Your expression would then be something like a(..)+2*b(..).
>
>
> The user enters the expression (yes - I'm aware of the possible security
> issues), as
Dear sirs,
I'm doing some investigations on the Python language.
I'd like to know if it is possible to compile Python code made for the web
(an online database for instance), and to run it using mod_python. How is
it possible? I think it would be very fast to execute the code if it were
comp
Peter Hansen <[EMAIL PROTECTED]> writes:
> If you focus on IDEs, your research will have pre-selected only
> certain kinds of programmers and teams, and will not necessarily
> include the best ones.
It wouldn't have occurred to me to say that Ken Iverson (APL), Peter
Deutsch (PARC Smalltalk), or D
Collin Winter wrote:
> The difference between __builtins__ and the other __*__ names is that
> while the others shouldn't be used without understanding their
> purpose, the consensus on __builtins__ seems to be that it shouldn't
> be used at all.
>
> ... at the very
> least, users should be expli
Charles wrote:
> I'm doing some investigations on the Python language.
> I'd like to know if it is possible to compile Python code made for the
> web (an online database for instance), and to run it using mod_python.
> How is it possible? I think it would be very fast to execute the code
> if
Paul Rubin wrote:
> Peter Hansen <[EMAIL PROTECTED]> writes:
>>If you focus on IDEs, your research will have pre-selected only
>>certain kinds of programmers and teams, and will not necessarily
>>include the best ones.
>
> It wouldn't have occurred to me to say that Ken Iverson (APL), Peter
> Deut
Okei
I've been doing some research since my first post and now I'm really
confused. I'm programming in xp, and found some c++ code out of this world
that supposidly should list all available services to a given bluetooth
device. This code however where only working with certain bluetooth-de
Carlos wrote:
> Hi!
>
> class A:
> X = 2
> def F():
> print A.X
> F()
>
> The above fails because the name A is not
> yet at global scope when the reference A.X
> is reached. Is there any way to refer to A.X
> without making explicit use of the name 'A'?
How about this:
>>> class A:
On Friday 23 September 2005 07:53 pm, Peter Hansen wrote:
> What you appear to be asking is if it's possible to create *native
> machine code* from Python source in order to achieve a significant
> increase in performance. The short answer is "no, not really", and
> longer answers include "yes,
You consider it spam because you don't agree with the political message or the
idea of people working for a better world. However, if it had been a subject
which was "acceptable" to your standards as a self-made moderator, then
everything would have been wonderful in Kansas. Click your heels p
On 9/23/05, Peter Hansen <[EMAIL PROTECTED]> wrote:
> My point, which might not have been clear, is that users are *already*
> told that they shouldn't ever touch __anything__ without understanding
> what it is, which is more general advice than and therefore encompasses
> the __builtins__ issue.
Hi,
I'm new to Python, so forgive me if I'm missing something obvious
here. All what I am trying to do is create a hirarachy of objects
(i.e. one that inherits from another). But for somereason my
subclasses are not recognizing their superclass! I have the following:
class Widget(object):
de
Thanks a lot for Dale and Larry,
I have not tried the OOP way yet like you mentioned,
I will try to create a parser soon,
maybe I will post it in the net after that, it may be useful to others
too,
Thanks again
-Jiro
--
http://mail.python.org/mailman/listinfo/python-list
>Then I have an instance of class Button called obj. My probelm is that
>the test isinstance(obj, Widget) resturns False!
>
You must have a typo somewhere. Please try this little test program.
>>> class Widget(object):
... pass
...
>>> class Button(Widget):
... pass
...
>>> b = B
Dear All,
I lost my source code because of my incaution.
so anyone can tell me how to decompile the exe file compiled by py2exe?
Thanks.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
101 - 167 of 167 matches
Mail list logo