Re: Welcome to the "Python-list" mailing list

2008-04-07 Thread Ronn Ross
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

playing around with python

2008-04-07 Thread Ronn Ross
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

playing around with python

2008-04-07 Thread Ronn Ross
Hello, I download the source for -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows - window status (Running vs Not Responding)

2008-04-11 Thread Ross Ridge
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

Re: 2's complement conversion. Is this right?

2008-04-18 Thread Ross Ridge
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/

Re: 2's complement conversion. Is this right?

2008-04-18 Thread Ross Ridge
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

Re: 2's complement conversion. Is this right?

2008-04-18 Thread Ross Ridge
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

Re: 2's complement conversion. Is this right?

2008-04-19 Thread Ross Ridge
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: &

Re: py3k concerns. An example

2008-04-21 Thread Ross Ridge
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.

Re: universal unicode font for reportlab

2008-09-08 Thread Ross Ridge
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/

Re: universal unicode font for reportlab

2008-09-09 Thread Ross Ridge
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

Re: universal unicode font for reportlab

2008-09-10 Thread Ross Ridge
>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.

Re: Python style: exceptions vs. sys.exit()

2008-09-24 Thread Ross Ridge
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

Re: Python style: exceptions vs. sys.exit()

2008-09-24 Thread Ross Ridge
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

Re: Python style: exceptions vs. sys.exit()

2008-09-24 Thread Ross Ridge
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

Re: Python style: exceptions vs. sys.exit()

2008-09-25 Thread Ross Ridge
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

Re: Python style: exceptions vs. sys.exit()

2008-09-25 Thread Ross Ridge
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

Re: Python style: exceptions vs. sys.exit()

2008-09-26 Thread Ross Ridge
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-

Re: How to emit UTF-8 from console mode?

2008-10-01 Thread Ross Ridge
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-

Re: recycling internationalized garbage

2006-03-08 Thread Ross Ridge
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

Re: Bidirectional communication over unix socket (named pipe)

2006-03-09 Thread Ross Ridge
an address other than it's own that it can send data to. Ross Ridge -- http://mail.python.org/mailman/listinfo/python-list

Re: recycling internationalized garbage

2006-03-14 Thread Ross Ridge
[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.

Re: recycling internationalized garbage

2006-03-15 Thread Ross Ridge
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

Re: recycling internationalized garbage

2006-03-15 Thread Ross Ridge
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

Re: recycling internationalized garbage

2006-03-16 Thread Ross Ridge
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

Re: Command line arguments question (Windows XP)

2006-03-21 Thread Ross Ridge
"%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

Re: Difference between 'is' and '=='

2006-03-28 Thread Ross Ridge
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

Re: Registration Code

2006-04-04 Thread Ross Ridge
tware to be registered is going to be worth the effort. Ross Ridge -- http://mail.python.org/mailman/listinfo/python-list

Re: Registration Code

2006-04-05 Thread Ross Ridge
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 >

Re: 32-bit python on Opteron, Solaris 10?

2006-04-06 Thread ross lazarus
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

New to python

2009-11-30 Thread Ronn Ross
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

Re: How to tell if you're running on windows?

2009-12-04 Thread Ross Ridge
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

question about subprocess and shells

2009-12-04 Thread Ross Boylan
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

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-17 Thread Ross Ridge
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

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-17 Thread Ross Ridge
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

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-21 Thread Ross Ridge
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

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-26 Thread Ross Ridge
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

Re: best vi / emacs python features

2009-10-08 Thread Ross Ridge
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.

Python and USB

2009-10-14 Thread Ronn Ross
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

Pyusb

2009-10-14 Thread Ronn Ross
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

Pyusb

2009-10-14 Thread Ronn Ross
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

reading joystick data

2009-10-15 Thread Ronn Ross
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.

Re: Are there any modules for IRC, that work with Python 3.1?

2009-10-16 Thread Ross Ridge
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 --

PySerial

2009-10-22 Thread Ronn Ross
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

Re: PySerial

2009-10-23 Thread Ronn Ross
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

Re: PySerial

2009-10-23 Thread Ronn Ross
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

Re: PySerial

2009-10-24 Thread Ronn Ross
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? > > > -- &

Re: PySerial

2009-10-25 Thread Ronn Ross
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

Python GUI

2009-10-25 Thread Ronn Ross
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

Re: Python GUI

2009-10-25 Thread Ronn Ross
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

Adding a menu to Tkinter

2009-10-26 Thread Ronn Ross
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

Re: Python 2.6 Global Variables

2009-10-28 Thread Ronn Ross
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

converting latitude and longitude

2009-11-13 Thread Ronn Ross
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

[no subject]

2009-11-13 Thread Ronn Ross
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

Re: MemoryError, can I use more?

2010-02-14 Thread Ross Ridge
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

Re: logging module -- better timestamp accuracy on Windows

2011-02-15 Thread Ross Ridge
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:

Re: Does pickled objects work fine between different OS?

2010-05-26 Thread Ross Ridge
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

assign class variable in __init__

2010-06-08 Thread Ross Williamson
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

Re: matplotlib installation

2009-06-15 Thread Ross Ridge
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/

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Ross Ridge
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

Re: Meta question: disappearing posts (was Re: calculating a self.value, self.randomnum = normalvariate(x, y))

2009-06-22 Thread Ross Ridge
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

Re: Meta question: disappearing posts (was Re: calculating a self.value, self.randomnum = normalvariate(x, y))

2009-06-24 Thread Ross Ridge
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.

Re: reply to OT diversion (was: What is the best method to match a pattern in set of lines

2009-06-24 Thread Ross Ridge
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

packaging apps

2009-06-30 Thread Ronn Ross
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

VirtualEnv

2009-07-03 Thread Ronn Ross
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

VirtualEnv

2009-07-06 Thread Ronn Ross
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

TypeError: unbound method

2009-07-16 Thread Ronn Ross
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

Beginners question

2009-07-17 Thread Ronn Ross
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

Re: Unpack Expects the Wrong Number of Bytes

2009-07-18 Thread Ross Ridge
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

trouble with minidom

2009-07-21 Thread Ronn Ross
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]

Re: trouble with minidom

2009-07-24 Thread Ronn Ross
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

Can you easy_install from your localhost?

2009-07-30 Thread Ronn Ross
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

Barcodes

2009-08-17 Thread Ronn Ross
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

Re: Barcodes

2009-08-19 Thread Ronn Ross
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

convert date time

2009-08-21 Thread Ronn Ross
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

Re: convert date time

2009-08-21 Thread Ronn Ross
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

Reading binary files

2009-08-24 Thread Ronn Ross
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

Re: Reading binary files

2009-08-24 Thread Ronn Ross
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 >> >

Overload print

2010-08-25 Thread Ross Williamson
_(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

error in syntax description for comprehensions?

2017-03-30 Thread Boylan, Ross
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

emulating an and operator in regular expressions

2005-01-02 Thread Ross La Haye
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

justifying text...and also...correct use of classes...

2004-12-29 Thread Ross La Haye
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))

Socket connection between python and C

2011-02-08 Thread Williamson, Ross X. (Guest)
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

<    1   2   3   4