This is my first post and I'm new to Python. How would someone go about
adding keywords to Python? It would be great to add support for Esperanto
keywords in the language instead of English being the only option.
thx
--
http://mail.python.org/mailman/listinfo/python-list
Hello all,
I downloaded the source for version 2.5.2 and I played around and made some
changes, but now I don't know how to compile on my machine to test them. Can
someone tell me how to compile it to run on my machine? I'm trying to get
familiar with it before I volunteer. Also, I'm running Unbun
Hello,
I download the source for
--
http://mail.python.org/mailman/listinfo/python-list
of 5 seconds.
Syntax
BOOL IsHungAppWindow(
HWND hWnd
);
...
You can use EnumWindows() to enumerate the all the top level windows.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
st case is correct, "Value -= 0x100". The value 0xFFF
should be -1 and 0xFFF - 0x100 == -1.
An alternative way of doing this:
Value = unpack(">l", Buffer[s:s+3] + "\0")[0] >> 8
Ross Ridge
--
l/
ck
def from3Bytes_ross2(s):
return unpack_i32be(s + "\0")[0] >> 8
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] [EMAIL PROTECTED]
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
Ross Ridge <[EMAIL PROTECTED]> said:
> If you have Python 2.5, here's a faster version:
>
> from struct import *
> unpack_i32be = Struct(">l").unpack
>
> def from3Bytes_ross2(s):
> return unpack_i32be(s + "\0&qu
Ross Ridge <[EMAIL PROTECTED]> wrote:
> It's the same as the previous version except that it "precompiles"
> the struct.unpack() format string. =A0It works similar to the way Python
> handles regular expressions.
George Sakkis <[EMAIL PROTECTED]> wrote:
&
language features
>alone do not help a language and its community of users to grow
>and proliferate. I think most would agree that it is the cornucopia
>of libraries that really make Python an environment for developing
>production applications.
Definately.
Office) will
automatically substitute characters from other fonts, if necessary.
>I don't know whether it was already installed or installed by OO or
>how one would get to it to extract it.
It's a standard Windows font.
Ross Ridge
--
l/
mes with Microsoft Office.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] [EMAIL PROTECTED]
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
>as though it just embeds the entire font.
Yah, PDF files normally only contain an embedded subset of the fonts used.
It might possible to use Ghostscript's ps2pdf command (which can take a
PDF file as input) to strip out the unused glyphs from the embedded fonts.
iver doesn't immediately stop and check the engine. The owners manual
would only vaguely hint at the fact that this could happen.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] [EMAIL PROTECTED]
-()-/()/ http://www.csclub.uwaterloo.ca
e. It's like an automotive engine controls designer
>asking if a failed O2 sensor should turn on the check engine
>light or blow up the car.
Ross Ridge <[EMAIL PROTECTED]> wrote:
> No, it's more like asking if the failed sensor should turn on
> a strange and mysterious li
Grant Edwards <[EMAIL PROTECTED]> wrote:
> Same here. It's like an automotive engine controls designer
> asking if a failed O2 sensor should turn on the check engine
> light or blow up the car.
Ross Ridge <[EMAIL PROTECTED]> wrote:
> No, it's more like askin
Ross Ridge wrote:
> Plenty of people were quick to say that the exception should be passed
> through to the caller. No one said this behaviour should be documented.
> There may be little practical difference bewteen calling sys.exit()
> after printing an error and progating an excepti
on't say exactly
how file-like it needs.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] [EMAIL PROTECTED]
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
e or whatever-like objects etc, it's the caller's responsability
> to handle the exceptions that may be raised by what *he* passes to the
> library...
Ross Ridge a écrit :
> Ug... that's another documentation pet-peeve of mine. Libraries that
> say they take file-
quot;for i in range(0x410, 0x430): print unichr(i).encode('utf-8')"
> x
C:\> type x
[a bunch of Cyrillic letters]
Hmm... "more x" doesn't work, while "copy x con" works but gives an error.
Looks like Windows XP support UTF-8 console output is a bit half-
d to be
displayed.
> The output must be clean utf8 suitable for arbitrary xml parsers.
Oh, you're screwed then.
Ross Ridge
--
http://mail.python.org/mailman/listinfo/python-list
an address other than it's own that it can
send data to.
Ross Ridge
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> try:
> (uni, dummy) = utf8dec(s)
> except:
> (uni, dummy) = iso88591dec(s, 'ignore')
Is there really any point in even trying to decode with UTF-8? You
might as well just assume ISO 8859-1.
single-byte character set can
produce byte sequences that are valid in UTF-8. In fact I can't think
of any multi-byte encoding that can't produce valid UTF-8 byte
sequence.
Ross Ridge
--
http://mail.python.org/mailman/listinfo/python-list
Ross Ridge wrote:
> It should be obvious that any 8-bit single-byte character set can
> produce byte sequences that are valid in UTF-8.
Fredrik Lundh wrote:
> it should be fairly obvious that you don't know much about UTF-8...
Despite this malicious and false accusation, your post
out 1% for the Big5 encoded version of the file and about
4.5% for the GB 2312 version.
It would be nearly impossible to find all the strings in in Freedb that
decode as UTF-8 but aren't really encoded in UTF-8, but they do exist.
One example I managed to find are the GB 2312 encoded TTITLE5
"%9" and change the
> programs that count the arguments or set it to "%*" and change
> the programs do a split on argv[1] to seperate the parameters.
Have you tried using %* without quotes?
Ross Ridge
--
http://mail.python.org/mailman/listinfo/python-list
socket.IPPROTO_RAW constant:
>>> socket.getaddrinfo("localhost", None, socket.AF_INET, socket.SOCK_RAW,
>>> socket.IPPROTO_RAW)[0][2] is socket.IPPROTO_RAW
False
>>> socket.getaddrinfo("localhost", None, socket.AF_INET, socket.SOCK_RAW,
>>> socket.IPPROTO_RAW)[0][2] == socket.IPPROTO_RAW
True
Ross Ridge
--
http://mail.python.org/mailman/listinfo/python-list
tware to be
registered is going to be worth the effort.
Ross Ridge
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> What are the odds that Vista will have it?
Ross Ridge wrote;
> About 100%.
Steven D'Aprano wrote:
> Considering that you can hardly walk into a university, school or
> corporation without finding Windows or Office supplied without PA, would
>
The answers depend entirely on the cpu in my experience. I'm staring
at http://www.sun.com/servers/index.jsp and I can't see anything
called a T2100. I have 3 X2100 servers which are opterons. Psyco only
runs on x86 cpu hardware. Python cannot use psyco on opterons at all -
32 bit mode or other
I have recently come across something called a struct. I have googled this,
but have note found a good explanation. Can someone give me a good
definition or point me to a page that has one.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
In your case you can use
the "sys.platform" variable to distinguish between Cygwin and a real
Unix-type OS. You may end up needing to treat Cygwin as a special case.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub
cs of the pipes for the processes standard
file handles. Do they need to be closed (judging from the examples,
no)? When reads/writes to them return, and what state is the stream in
at the time?
Thanks for any wisdom you can offer.
Ross Boylan
--
http://mail.python.org/mailman/listinfo/python-list
oft Visual C++ or Python
2.6.4. Otherwise, you don't have the legal right to redistribute
Microsoft's code.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~r
elf doesn't need it, and py2exe shouldn't
either, but wxPython, or more precisely wxWidgets, almost certainly does.
So in your case you'll probably need to redistribute both DLLs.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
exe.
Microsoft's documentation describes several possible ways you can
redistribute the Visual C++ runtime:
http://msdn.microsoft.com/en-us/library/ms235299.aspx
>From the sounds of things, if you only have Visual C++ 2008 Express your
only option may be to use Visual C++ Redis
lities
in a lot of third party applications that couldn't be easily fixed by
deploying a patched DLL with Windows Update.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
th the rest of my life as soon
>as possible. Given the choice of using a space cadets editor like
>emacs or something primitive one like ed, I would choose *ed* just to
>speed things up and save on wrist strain.
But in actual practice you use a space cadets editor like Vim.
I'm new to Python and would like to capture mouse movements. I envision
writing a script that will just write out the mouse movements in the term.
Is this possible? Can someone point me in the right direction?
--
http://mail.python.org/mailman/listinfo/python-list
I'm running Python 2.6 on windows. I'm install Pyusb and I'm having trouble
including the library in my script. Can someone point me in the right
direction to get this working or know of a good tutorial to help me out.
Best regards
--
http://mail.python.org/mailman/listinfo/python-list
Does anyone know where I can download a copy of PyUSB 1.0? I can only find
0.x versions on sourceforge. I'm following a tutorial that requires 1.0.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I'm using PyUSB 0.4.2 to interact with a Microsoft Sindwinder joystick. I'm
using python 2.6 on windows XP. With the code snippet below I'm able to find
usb device currently plugged into my computer. Now I would like to actually
tap into the data that to joystick is providing to the system.
TerryP wrote:
>Having recently been put into search for a new IRC client, and
>everything I've thrown in the cauldron having become a
>disappointment...
Have you tried the IRC client script for Vim?
Ross Ridge
--
l/ // Ross Ridge --
I'm using pySerial to connect to a serial port (rs232) on a windows xp
machine. I'm using python interactive interpretor to interact with the
device. I type the following:
import serial
ser = serial.Serial(2)
ser.write("command")
But this does nothing to the control. I have been able to connect vi
I'm using pySerial to connect to a serial port (rs232) on a windows xp
machine. I'm using python interactive interpretor to interact with the
device. I type the following:
import serial
ser = serial.Serial(2)
ser.write("command")
But this does nothing to the control. I have been able to connect vi
I have tried setting the baud rate with no success. Also I'm using port #2
because I"m using a usb to serial cable.
On Fri, Oct 23, 2009 at 7:51 PM, Chris Rebert wrote:
> On Thu, Oct 22, 2009 at 4:43 PM, Ronn Ross wrote:
> > I'm using pySerial to connect to a serial p
Oct 2009 20:56:21 -0300, Ronn Ross
> escribió:
>
>
> I have tried setting the baud rate with no success. Also I'm using port #2
>> because I"m using a usb to serial cable.
>>
>
> Note that Serial(2) is known as COM3 in Windows, is it ok?
>
>
> --
&
On Sat, Oct 24, 2009 at 4:53 PM, John Nagle wrote:
> Gabriel Genellina wrote:
>
>> En Fri, 23 Oct 2009 20:56:21 -0300, Ronn Ross
>> escribió:
>>
>>
>> I have tried setting the baud rate with no success. Also I'm using port
>>> #2
>>> b
I need to create a gui for python. I'm looking for something that is easy to
learn and cross platform. Any suggestions? If you have any good tutorials
please send along. Thanks in advance.
--
http://mail.python.org/mailman/listinfo/python-list
Philip,
PySide looks nice and you are right it is still very young. I'm still going
to give it a try. Thanks for your help.
On Sun, Oct 25, 2009 at 9:41 PM, Philip Semanchuk wrote:
>
> On Oct 25, 2009, at 8:39 PM, Ronn Ross wrote:
>
> I need to create a gui for python
I'm attempting to add a menu bar to my Tkinter app. I can't figure out the
correct syntax. Can someone help? I get this error when I run the app:
Traceback (most recent call last):
File "tkgrid.py", line 26, in
app = App(root)
File "tkgrid.py", line 10, in __init__
menubar = Menu(mas
Inside the method that you want to use the var prefix the first
instance with global. For example: global my_var. Then you can use the
var like normal in the method. Good luck
On Oct 28, 2009, at 20:50, mattofak wrote:
Hi All;
I'm new to Python and moving from C, which is probably a big
I'm attempting to convert latitude and longitude coordinates from degrees
minutes and second to decimal form. I would like to go from:
N39 42 36.3 W77 42 51.5
to:
-77.739855,39.70
Does anyone know of a library or some existing out their to help with this
conversion?
--
http://mail.python.o
I'm attempting to convert latitude and longitude coordinates from degrees
minutes and second to decimal form. I would like to go from:
N39 42 36.3 W77 42 51.5
to:
-77.739855,39.70
Does anyone know of a library or some existing out their to help with this
conversion?
--
http://mail.python
use more than 4GB of RAM through
indirect means like multiple processes, the disk cache or video card RAM.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
debug("processing time %.0fms",
(timer() - start) * 1000)
Saves you from having to do the math in your head when you look at
the logs.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http:
a.pkl" just fine on Windows XP?
That will work just fine. The only thing that may be a problem is that
if you choose to use the newer pickle format, it won't work with versions
of Python before 2.3.
Ross Ridge
--
l/ // Ross Ridge -- The
Hi Everyone,
Just a quick question - Is it possible to assign class variables in
the __init__() - i.e. somthing like:
def __init__(self,self.source = "test", self.length = 1)
rather than
def __init__(self,source = "test", length = 1):
--
Ross Williamson
University of C
nything wrong with the
Microsoft runtime. A library that mixes both objects and import records
is perfectly legitimate.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
certainly seen multi-core speedup
>with threaded software, so show us your benchmarks!
By definition an I/O bound thread isn't CPU bound so won't benefit from
improved CPU resources.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTM
p the thread one more posting and
you'll find the message that was being replied to.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
Ross Ridge wrote:
>I'm not sure what MIME would have to do with it, but Piet van Oostrum's
>problem is almost certainly as result of the python.org mail to news
>gateway mangling the References header. The missing postings he's looking
>for don't actually exist.
rotected from spammers with an X-Google-Only option.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
--
http://mail.python.org/mailman/listinfo/python-list
I have a simple application that has a glade file and a .py file. How would
I package that into an installer for Windows, Mac, and a deb file? Can
anyone point me in the right direction?
--
http://mail.python.org/mailman/listinfo/python-list
I'm attempting to write a bootstrap script for virtualenv. I just want to do
a couple of easy_install's after the environment is created. It was fairly
easy to create the script, but I can't figure out how to implement it. The
documentation was not of much help. Can someone please point me in the r
I'm attempting to write a bootstrap script for virtualenv. I just want to do
a couple of easy_install's after the environment is created. It was fairly
easy to create the script, but I can't figure out how to implement it. The
documentation was not of much help. Can someone please point me in the r
Hello all,
Created a python file that has a class and three methods. When I jump into
interactive mode I import like so:
from import
Now when I try to use a method from the class:
var1 = class.method()
It give me this error:
TypeError: unbound method must be called with
instance as first a
How do you define a global variable in a class. I tried this with do
success:
class ClassName:
global_var = 1
def some_methos():
print global_var
This doesn't work. What am I doing wrong?
--
http://mail.python.org/mailman/listinfo/python-list
an prefix depending on the byte order used in the file
you're trying to unpack. You can also use the "=" native byte-order
flag if endianness of the file format changes according to the machine
your Python program runs on. If you use any of these flags, no extra
padding will be ins
Hello I'm trying to read an xml file using minidome. The xml looks like:
myProj
/here/
My code looks like so:
from xml.dom.minidom import parse
dom = parse("myfile.xml")
for node in dom.getElementsByTagName("project'):
print('name: %s, path: %s \n') % (node.childNodes[0]
On Tue, Jul 21, 2009 at 7:32 PM, Gabriel Genellina
wrote:
> En Tue, 21 Jul 2009 21:08:57 -0300, Ronn Ross
> escribió:
>
>
> Hello I'm trying to read an xml file using minidome. The xml looks like:
>>
>>
>> myProj
>> /here/
&g
I have a package i would like to store locally. If it is stored locally can
I do something like ' easy_install http://localhost/package ' ? Thanks
--
http://mail.python.org/mailman/listinfo/python-list
My company needs a small inventory management app. Does python have any
libraries to help with reading and writing bar codes?
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Aug 19, 2009 at 9:19 AM, Ronn Ross wrote:
> I was hoping that python would have a library to help me print my own bar
> codes? We will need labels in all sizes and most label printer just work
> with 1 or 2 sizes. I would like to just print a grid of different sizes on
> st
I'm new to python and I'm getting a date time from a field in the database
that looks like this:
8/2/2009 8:36:16 AM (UTC)
I want to split it into two fields one with the date formatted like this:
-MM-DD 2009-08-02
and the time to be 24 hour or military time. How every you call it. Similar
t
On Fri, Aug 21, 2009 at 2:26 PM, D'Arcy J.M. Cain wrote:
> On Fri, 21 Aug 2009 14:14:32 -0400
> Ronn Ross wrote:
> > I want to split it into two fields one with the date formatted like this:
> > -MM-DD 2009-08-02
> >
> > and the time to be 24 hour or m
I need to read a binary file. When I open it up in a text editor it is just
junk. Does Python have a class to help with this?
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Aug 24, 2009 at 11:18 AM, Ronn Ross wrote:
>
>
> On Mon, Aug 24, 2009 at 10:43 AM, Albert Hopkins
> wrote:
>
>> On Mon, 2009-08-24 at 10:35 -0400, Ronn Ross wrote:
>> > I need to read a binary file. When I open it up in a text editor it is
>> >
_(self):
>> print "hello"
>> cc = foo_class()
>> print cc
Gives:
hello
I'm looking at finding nice way to print variables in a class just by
asking to print it
Cheers
Ross
--
Ross Williamson
University of Chicago
Department of Astronomy & Astrophysi
ot sure what or_test would do there either with or without an
additional element following "in".
Ross Boylan
--
https://mail.python.org/mailman/listinfo/python-list
John', I want to return a
match, but for substrings sg0 = 'Jones' and sg2 = 'Frank' I do not want to
return a match. Because the expression 'A and B' is logically equivalent to
'not (not A or not B)' I thought I could try something along those lines,
but
Few questions. I have a module "combin" which contains "Combin" and "Prob"
classes. This is the "Prob" class:
class Prob:
def binprob(self,n,k,p):
fewerthan = sum([Combin().kcomb(n,i)*((p**i)*(1-p)**(n-i)) for i in
range(k)])
exact = Combin().kcomb(n,k)*((p**k)*(1-p)**(n-k))
C. Is there a better way to
package data on the server in python to send down a socket to a C client? XML?
Pickle?
Cheers,
Ross
--
http://mail.python.org/mailman/listinfo/python-list
301 - 383 of 383 matches
Mail list logo