[no subject]

2012-03-10 Thread Sam Sam
How to change the color of source browser in DrPython? -- http://mail.python.org/mailman/listinfo/python-list

Re: Please don't feed the trolls

2021-03-09 Thread Sam
On 3/8/21 3:35 PM, Chris Angelico wrote: On Tue, Mar 9, 2021 at 8:31 AM D'Arcy Cain wrote: On 2021-03-06 4:24 p.m., Terry Reedy wrote: Trolling, among other things, is fishing with a moving line, especially with a revolving lure, as from a moving boat. A troll, among other things, is that me

Re: memory consumption

2021-04-01 Thread Sam
On 3/29/21 5:12 AM, Alexey wrote: Hello everyone! I'm experiencing problems with memory consumption. I have a class which is doing ETL job. What`s happening inside: - fetching existing objects from DB via SQLAchemy - iterate over raw data - create new/update existing objects - commit cha

Re: Python garbage collection: not releasing memory to OS!

2016-04-15 Thread Sam
e to use a thread instead of a fork. But not sure how well all that would work with celery. --Sam -- https://mail.python.org/mailman/listinfo/python-list

Java JMS and python

2020-04-13 Thread Sam
if anyone else has been down this path... Regards, Sam -- https://mail.python.org/mailman/listinfo/python-list

Re: Java JMS and python

2020-04-13 Thread Sam
at 11:20 AM Sam wrote: Hi, We are not a java shop and we are trying to interface with an API that is "JMS only". We asked if it supported activeMQ or STOMP and they replied that it is Sun JMS only. So what does that mean if we want to communicate with it from py

Re: Ram memory not freed after executing python script on ubuntu system

2020-05-28 Thread Sam
On 5/28/20 12:49 AM, Rahul Gupta wrote: I am having a Ubuntu system which has 125 Gb of RAM. I executed few python scripts on that system. Those scripts uses numpy arrays and pandas. Now execution was over but still 50 gb of RAM and 2 Gb cache and 8.4 Gb of swap is occupied. At this moment no

Re: Threading, real or simulated?

2005-09-22 Thread Sam
Antoon Pardon writes: Assuming you mean threading.Thread, this is a native thread. It is not a simulation. Something else is going wrong. Then I must have something locked. Here's what I do: Yes you have locked the GIL. Take a look at the following URL: http://docs.python.org/api/threads

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Sam
Reinhold Birkenfeld writes: Hi, after Guido's pronouncement yesterday, in one of the next versions of Python there will be a conditional expression with the following syntax: X if C else Y which is the same as today's (Y, X)[bool(C)] What's wrong with "C ? X:Y"? Aside from ":" being overl

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Sam
Jaime Wyant writes: On 9/30/05, Sam <[EMAIL PROTECTED]> wrote: Reinhold Birkenfeld writes: > Hi, > > after Guido's pronouncement yesterday, in one of the next versions of Python > there will be a conditional expression with the following syntax: > > X if C el

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-01 Thread Sam
Leif K-Brooks writes: Sam wrote: And "foo if bar" is Perl-ish; yet, even Perl has the ? : operators. What _isn't_ Perl-ish? BASIC? pgp7WNg5zZz7a.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Setting optimum gtkhtml2 widget size.

2005-10-02 Thread Sam
I'm putting gtkhtml2.View() inside a gtk.ScrolledWindow, which goes into a gtk.Dialog.vbox. How do I obtain gtkhtml2.View's preferred height, and set the dialog's height accordingly, given a specific width? I can do a gtk.Dialog.set_default_size() up front, specifying the width and height la

Python eats gator.

2005-10-05 Thread Sam
http://www.wnbc.com/family/5060215/detail.html I know there's an on-topic joke in here somewhere, but I'm having some problem finding it, at the moment. You may take a crack at it, if you'd like… pgpWkRit76A0o.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-l

Re: C/API Clarification

2005-10-07 Thread Sam
Jeremy Moles writes: in the world I got the idea from! According to the docs, METH_VARARGS is (PyObject*, PyObject*)? Right. My prototype shouldn't even compile... but it Why wouldn't it compile? 2. No where in the docs does it show how to "correctly" create an in

Re: Daisy Daisy, give me your answer do

2005-10-08 Thread Sam
Xah Lee writes: Dear Michael Goettsche, why don't you lead the pack to be on-topic for a change, huh? Why don't you: 1. Learn how to properly format messages for posting to Usenet, so that your scribblings don't read like stream-of-consciousness babbling (see http://en.wikipedia.org/wiki/

Re: Wanted: Python module allowing direct access to raw sectors ofharddrives (MFT, boot sector, etc.) in MS Windows

2005-10-10 Thread sam
/samschul/ Sam Schulenburg Claudio Grondi wrote: > Thank you Jeff very much for your quick reply. > It saved me really much time of digging in the wrong direction. > > <[EMAIL PROTECTED]> wrote in > news:<[EMAIL PROTECTED]>... > >> I took the

Re: Wanted: Python module allowing direct access to raw sectors ofharddrives (MFT, boot sector, etc.) in MS Windows

2005-10-11 Thread sam
The main use of my SCSI routines,is that by using the SCSIPASSTHROUGH layer under Windows gives the user absolute control of the storage device. For example copying data from and IDE drive to a SCSI drive becomes transparent using SCSI commands. I.e Logical block 0 remains consistant. I had an PHD

modpython, apache and windows

2005-01-04 Thread Sam
Hi All, I am interested in learning python since I am hearing more and more about python for use in web development I am starting out on python, with knowledge of PHP some perl my current hurdle is setting up either apache 1 or 2 with python 2.3.3 I have installed modpython fine which informed

Powerful CGI libraries for Python?

2005-01-09 Thread sam
r in terms of functionality and stability? Thanks Sam -- http://mail.python.org/mailman/listinfo/python-list

Excel module for Python

2005-01-11 Thread sam
Hi group, I m wondering which Excel module is good to be used by Python? Thanks Sam -- http://mail.python.org/mailman/listinfo/python-list

Re: Excel module for Python

2005-01-12 Thread sam
Simon Brunning wrote: On Wed, 12 Jan 2005 15:18:09 +0800, sam <[EMAIL PROTECTED]> wrote: I m wondering which Excel module is good to be used by Python? If you are on Windows, and you have Excel, then the Python for Windows extensions[1] are all you need to drive Excel via COM. O'Reill

compile python to binary

2005-01-23 Thread sam
Hi, I have seen some software written in python and delivered as binary form. How does these binary code get generated by python compiler? Thanks Sam. -- http://mail.python.org/mailman/listinfo/python-list

Re: compile python to binary

2005-01-23 Thread sam
Fredrik Lundh wrote: Daniel Bickett wrote: I believe Sam was talking about "frozen" python scripts using tools such as py2exe: oh, you mean that "python compiler" didn't mean "the python compiler". here are links to some more tools, btw: http://effbot.org

Re: compile python to binary

2005-01-23 Thread sam
#x27;ve guessed correctly at what the OP meant, one should also consider that the word "binary" can be quite ambiguous in the hands of a newbie. After all, source code is stored in binary too... Sorry for the vagues terms. I meant compile a python script into a binary program. Thanks Sam

python module in webmin

2005-01-26 Thread sam
version of webmin first. Thanks Sam. -- http://mail.python.org/mailman/listinfo/python-list

Threading, real or simulated?

2005-09-21 Thread Sam
I'm using Python 2.3.5 with pygtk 2.4.1, and I'm using the second threading approach from pygtk's FAQ 20.6 - invoking "gtk.gdk.threads_init()", and wrapping all gtk/gdk function calls with gtk.threads_enter()/gtk.threads_leave() I start a thread, via thread.Threading.start(). The thread then

Re: Threading, real or simulated?

2005-09-21 Thread Sam
Jp Calderone writes: On Wed, 21 Sep 2005 18:23:33 -0500, Sam <[EMAIL PROTECTED]> wrote: I'm using Python 2.3.5 with pygtk 2.4.1, and I'm using the second threading approach from pygtk's FAQ 20.6 - invoking "gtk.gdk.threads_init()", and wrapping

create/access dynamic growth list

2005-03-17 Thread sam
nes in a configuration file, I want to store the array of "macro" in a list. How can I do that in Python? Thanks Sam. -- http://mail.python.org/mailman/listinfo/python-list

syntax incorrect with regex

2005-03-18 Thread sam
Hi, What is the correct syntax of declaring a regex syntax in Python 2.3? I got the following error: # python2.3 test.py File "test.py", line 10 macros_parser = re.compile (r""" (\s+)=\"(\s+)\"$ """,re.VERBOS) ^ SyntaxError: invalid s

Re: create/access dynamic growth list

2005-03-18 Thread sam
Larry Bates wrote: sam wrote: Hi, I have a configuration file need to be processed (read/write) by python. Currently I the following method can only read and store data that python read a line from a configuraiton file: def _parse (self): # parse message m = self.FWShow_Command.match

inline comparison

2005-03-19 Thread sam
Hi, I got the the following syntax error in comparison: File "/usr/local/work/myparser.py", line 85 if ( (m=self.macro_parser.match (d)) != None ): ^ SyntaxError: invalid syntax How can I get around wtih this? I don't want to break down this comparison in two ste

what is \s+ and \S+ means in re.compile?

2005-03-20 Thread sam
Hi, I was confused by \s+ and \S+ in python. The second one (\S+) is stand for matching all alphabets except for digit and space? How about the first one? Thanks Sam -- http://mail.python.org/mailman/listinfo/python-list

Re: inline comparison

2005-03-20 Thread sam
Tim Roberts wrote: sam <[EMAIL PROTECTED]> wrote: Hi, I got the the following syntax error in comparison: File "/usr/local/work/myparser.py", line 85 if ( (m=self.macro_parser.match (d)) != None ): ^ SyntaxError: invalid syntax How can I get around wtih this? I don

Avaliable free modules

2004-12-16 Thread sam
Hi group, Is there any site like cpan.org for python? Thanks Sam -- http://mail.python.org/mailman/listinfo/python-list

Re: inline comparison

2005-03-21 Thread sam
the following error: for m, name in [self.macro_parser] ^ SyntaxError: invalid syntax What is the valid syntax with this usage? Thanks Sam -- http://mail.python.org/mailman/listinfo/python-list

How to get Mac address of ethernet port?

2014-01-11 Thread Sam
I would like to use python to retrieve the mac address of the ethernet port. Can this be done? Thank you. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get Mac address of ethernet port?

2014-01-11 Thread Sam
On Sunday, January 12, 2014 12:34:35 AM UTC+8, Michael Torrie wrote: > On 01/11/2014 07:35 AM, Andriy Kornatskyy wrote: > > > On Linux you could access the /sys/devices/virtual/net/ > > file in the sysfs filesystem. I'm sure there are other ways. > Thank you to everyone for the helpful answer

Is it better to import python modules inside function or at the top? What are the pros and cons?

2014-01-11 Thread Sam
I have python modules which are used only in specific functions and the functions are not called all the time. Is it better to import the function inside the function only or is it a better practice to always import all modules at the top of the script? If I import the module inside the function

Building and accessing an array of dictionaries

2014-01-16 Thread Sam
I would like to build an array of dictionaries. Most of the dictionary example on the net are for single dictionary. dict = {'a':'a','b':'b','c':'c'} dict2 = {'a':'a','b':'b','c':'c'} dict3 = {'a':'a','b':'b','c':'c'} arr = (dict,dict2,dict3) What is the syntax to access the value of dict3->'a'

Is it possible to protect python source code by compiling it to .pyc or .pyo?

2014-01-16 Thread Sam
I would like to protect my python source code. It need not be foolproof as long as it adds inconvenience to pirates. Is it possible to protect python source code by compiling it to .pyc or .pyo? Does .pyo offer better protection? -- https://mail.python.org/mailman/listinfo/python-list

Compiling main script into .pyc

2014-01-16 Thread Sam
One thing I observe about python byte-code compiling is that the main script does not gets compiled into .pyc. Only imported modules are compiled into .pyc. May I know how can I compile the main script into .pyc? It is to inconvenience potential copy-cats. -- https://mail.python.org/mailman/li

Process datafeed in one MySql table and output to another MySql table

2014-01-16 Thread Sam
I have a datafeed which is constantly sent to a MySql table. The table grows constantly as the data feeds in. I would like to write a python script which process the data in this table and output the processed data to another table in another MySql database in real-time. Which are the python li

Re: Process datafeed in one MySql table and output to another MySql table

2014-01-17 Thread Sam
On Friday, January 17, 2014 10:07:58 AM UTC+8, Denis McMahon wrote: > On Thu, 16 Jan 2014 17:03:24 -0800, Sam wrote: > > > > > I have a datafeed which is constantly sent to a MySql table ... > > > > > Which are the python libraries which are suitable for t

python and matlab

2014-02-06 Thread Sam
is it able to utilize functions written in Python in Matlab? -- https://mail.python.org/mailman/listinfo/python-list

Why use _mysql module and not use MySQLdb directly?

2014-02-08 Thread Sam
I am writing my first python script to access MySQL database. With reference to http://mysql-python.sourceforge.net/MySQLdb.html#connection-objects Why is it advisable to use _mysql and not MySQLdb module directly? -- https://mail.python.org/mailman/listinfo/python-list

What is the recommended python module for SQL database access?

2014-02-08 Thread Sam
Is MySQLdb the recommended python module for SQL database access? Are there other modules? What I want in a module is to be able to write readable and maintainable code. -- https://mail.python.org/mailman/listinfo/python-list

What does """ means in python?

2014-02-08 Thread Sam
For string, one uses "" to represent string. Below is a code fragment that uses """ instead. cursor.execute("""SELECT name, phone_number FROM coworkers WHERE name=%s AND clue > %s LIMIT 5""", (name, clue_th

What are the kinds of software that are not advisable to be developed using Python?

2014-02-08 Thread Sam
I got to know about Python a few months ago and today, I want to develop only using Python because of its code readability. This is not a healthy bias. To play my own devil's advocate, I have a question. What are the kinds of software that are not advisable to be developed using Python? -- http

Re: Python boilerplate

2016-03-21 Thread Sam
p.cfg ├── setup.py ├── tests.py └── tox.ini Fernando Felix There is this too: https://pypi.python.org/pypi/python_boilerplate_template --Sam -- https://mail.python.org/mailman/listinfo/python-list

Best practices to overcome python's dynamic data type nature

2014-02-14 Thread Sam
Dynamic data type has pros and cons. It is easier to program but also easier to create bugs. What are the best practices to reduce bugs caused by Python's dynamic data-type characteristic? Can the experienced Python programmers here advise? Thank you. -- https://mail.python.org/mailman/listinf

Can one use Python to learn and even apply Functional Programming?

2014-02-15 Thread Sam
I would like to learn and try out functional programming (FP). I love Python and would like to use it to try FP. Some have advised me to use Haskell instead because Python is not a good language for FP. I am sort of confused at the moment. Is Python a dysfunctional programming language to apply

Can global variable be passed into Python function?

2014-02-20 Thread Sam
I need to pass a global variable into a python function. However, the global variable does not seem to be assigned after the function ends. Is it because parameters are not passed by reference? How can I get function parameters to be passed by reference in Python? -- https://mail.python.org/mai

Can tuples be replaced with lists all the time?

2014-02-22 Thread Sam
My understanding of Python tuples is that they are like immutable lists. If this is the cause, why can't we replace tuples with lists all the time (just don't reassign the lists)? Correct me if I am wrong. -- https://mail.python.org/mailman/listinfo/python-list

Print statement not printing as it suppose to

2013-09-20 Thread Sam
hi everybody i am just starting to learn python, i was writing a simple i/o program but my print statement is acting weird. here is my code i want to know why it prints this way. thank you car=int(input("Lamborghini tune-up:")) rent=int(input('\nManhatan apartment: ')) gifts=int(input('\nRand

Re: access to preallocated block of memory?

2005-12-15 Thread sam
I had a simular situation when I was writing Python routines to access the the storage (SCSIPASSTHROUGH) layer provided by Windows XP. My solution was to develope an extention in C that allocated all storage buffers within the extension. Then I added access extensions to controll reading and writin

UpDate For SCSIPython Storage device test library

2005-12-28 Thread sam
I have updated my page at http://starship.python.net/crew/samschul/ These tools allow for the user to issue low level SCSI commands via the windows SCSIPASSTHROUGH interface layer. These routines will work from IDLE, Pythonwin,and Python.exe. The changes include the following: 1) Deleted documenta

Re: UpDate For SCSIPython Storage device test library

2005-12-30 Thread sam
Just a added note,that these routines will access any storage drive that is mounted under Windows. The Scsi Pass Through layer maps all Pcmcia,IDE,andSCSI drives to use SCSI commands. This allows a user to access all these interfaces with a common command set. Sam Schulenburg -- http

Re: UpDate For SCSIPython Storage device test library

2006-01-03 Thread sam
SCSITOOLS24USBV1.4.zip Sam Schulenburg -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft IronPython?

2006-01-07 Thread sam
After downloading and trying out Ironpython, I have the following comments: 1) I like the idea of Python under .net 2) I like the support for both Microsoft math lib,and Python's math lib Will Microsoft maintain the compatability between standard python with the addition of their libs? -- http://

Building Pywin32 source code?

2006-01-08 Thread sam
Has anyone been able to access the source code for Pywin32 at sourceforge? I have been able to use TortouseCVS to access other CVS projects,but with the Pywin32 cvs site, I can not log in. Sam Schulenburg -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Pywin32 source code?

2006-01-09 Thread sam
Trent: Thanks for the reply. I tried again today and everthing worked. I did find a type in my CVSROOT string,and corrected it. Thanks for the examples posted in the included link. Sam Schulenburg -- http://mail.python.org/mailman/listinfo/python-list

matplotlib, wxPanel inside a wxPanel

2006-08-12 Thread Sam
Hello, I'm currently creating a GUI, which consists of a main frame that contains a menu bar,a toolbar and an empty panel, let's call it main_panel. Ideally, I'd like the following functionality: upon choosing an item from the menu bar, a particular graph will be displayed inside main_panel. Now

Re: matplotlib, wxPanel inside a wxPanel

2006-08-12 Thread Sam
the right panels... Secondly, I stuffed up when trying to give graph_panel a parent of main_panel. It turns out I was actually never doing this, so the toolbar would appear, but none of the buttons would work. Thanks again for your comments, they were very helpful, Cheers Sam -- http://mail.python.o

"wxmsw26uh_vc.dll not found" when using wxAgg backend

2006-08-15 Thread Sam
Hello, I've installed matplotlib recently because I want to add graphing functionality to a GUI that i'm making. I decided to try using the wxAgg backend instead of plain old wx because: a) I hear it's quicker, and b) when i use the wx backend, the axis labels don't seem to work properly - i can't

error handling in user input: is this natural or just laborious

2006-10-06 Thread sam
ly wondering about. is the code immediate legible to experienced python users? or does it look like gibberish at first? just hoped for some fresh eyes on it. thanks, sam PS making check=True just saves the code from printing 'those numbers don't sum to 100' if they haven't all been entered, which looks kind of silly. -- http://mail.python.org/mailman/listinfo/python-list

Re: error handling in user input: is this natural or just laborious

2006-10-06 Thread sam
you're right, of course. it occurred to me that, even if it were manageable for a few items, it would quickly become absurd as the number of items grew. this: def get_pct(): while True: pct_list=[['cash', 0], ['bond', 0], ['blue', 0], ['tech', 0], ['dev', 0]]

Re: error handling in user input: is this natural or just laborious

2006-10-06 Thread sam
this does what i want, though i don't like the inner while loop having to be there def get_pct(): while True: pct_list=[['cash', 0], ['bond', 0], ['blue', 0], ['tech', 0], ['dev', 0]] total=0 for i in range(len(pct_list)):

Re: error handling in user input: is this natural or just laborious

2006-10-07 Thread sam
of interest. thanks again, sam -- http://mail.python.org/mailman/listinfo/python-list

print time comparison: IDLE versus terminal on ultra 20

2006-10-08 Thread sam
in IDLE: 4.433 seconds in terminal: 0.001 seconds a difference of between 3 and 4 orders of magnitude is rather striking. anyone know what's going on here? is it a python, a unix thing, or something else? sam -- http://mail.python.org/mailman/listinfo/python-list

Re: print time comparison: IDLE versus terminal on ultra 20

2006-10-08 Thread sam
i was actually experimenting on windows on my own pc before the workstation arrived, and IDLE printed a lot faster on windows than in solaris for me too. i would indeed complain to sun if i had ever got the impression that anyone over there ever knew what was going on... : ) > but on the ot

Re: print time comparison: IDLE versus terminal on ultra 20

2006-10-09 Thread sam
i forgot to mention that i'm running a version of python 2.3 (think it's 2.3.5), as that's what was installed and i'm not hooked up to the internet with the ultra 20 yet. that may account for some of the difference. sam -- http://mail.python.org/mailman/listinfo/python-list

program written to model population evolving over time

2006-11-04 Thread sam
cise code in all. thought i'd try and contribute something for once instead of just asking questions. sam PS it does actually work, in case you're wondering. :-) -- http://mail.python.org/mailman/listinfo/python-list

accessing fortran modules from python

2006-11-16 Thread sam
realize there is a lot of material on this subject already available, but i am finding it difficult to make sense of, it's like trying to take a drink from a fire hose. any advice would be gratefully received. i will almost certainly be coding this on windows, for what it's worth. thank

Re: accessing fortran modules from python

2006-11-16 Thread sam
thanks guys, i'll follow this up more in a couple of weeks when i know what i need to do better. sam -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you practice Python?

2006-06-02 Thread sam
ed, when I signed the standard intellectual property forms. Sam Schulenburg Jarek Zgoda wrote: > [EMAIL PROTECTED] napisa³(a): > > >>In our field, we don't always get to program in the language we'd like > >>to program. So... how do you practice Python in this cas

Re: Seg fault in python extension module

2006-06-02 Thread sam
I recommend that you also replace the NULL after the METH_VARARGS with a valid documentations string such as: static PyMethodDef modglMethods[] = { { (char *)"glVertex4f", _wrap_glVertex4f, METH_VARARGS, "My Doc String"}, { NULL, NULL, 0, NULL }

Re: Seg fault in python extension module

2006-06-02 Thread sam
func */ const char *ml_doc;/* The __doc__ attribute, or NULL */ }; Sam Schulenburg John Machin wrote: > On 3/06/2006 1:38 PM, sam wrote: > > I recommend that you also replace the NULL after the METH_VARARGS with > > a valid documentations string such as: > > > >

Re: carshing the interpreter in two lines

2006-06-03 Thread sam
tomer: It is my opinion that you would loose performance if the Python interpreter had the additional task of verifying byte code. It might be more appropriate to have a preprocessor that did the verifying as it compiled the byte code. Sam Schulenburg gangesmaster wrote: > the following (ran

Re: carshing the interpreter in two lines

2006-06-03 Thread sam
Mel: Wow that book brings back memories. I scanned my copy to review the subject covered, and came to the conclusion that mind reading algorithms are the answer. Sam Schulenburg Mel Wilson wrote: > sam wrote: > > tomer: > > > > It is my opinion that you would loose perf

Re: Very nice python IDE (windows only)

2006-06-07 Thread sam
Very interesting, I have downloaded it,and I like what I see. ago wrote: > I have just discovered Python Scripter by Kiriakos Vlahos and it was a > pleasant surprise. I thought that it deserved to be signalled. It is > slim and fairly fast, with embedded graphical debugger, class browser, > file b

Re: Most elegant way to generate 3-char sequence

2006-06-11 Thread sam
figure out what I was trying to accomplish. Sam Schulenburg James Stroud wrote: > Fredrik Lundh wrote: > > James Stroud wrote: > > > >> See the actual question: > >> > >> >How would you construct a generator to acheive this? > > > > >

Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-16 Thread sam
I have been using the latest VC.net to compile my SCSIPython extension dll for Python 2.3, 2.4, and 2.5 without any problems. I just have to make shure that I link with the correct Python.lib Sam Schulenburg -- http://mail.python.org/mailman/listinfo/python-list

"list index out of range" error

2006-09-20 Thread sam
still got the same error. it's probably something trivial, but i can't seem to get round it by using while loops, and i had the same problem with cmp(), hence the explicit comparison above, which still doesn't work. can anyone help a beginner out with this? many thanks in advance,

Re: "list index out of range" error

2006-09-20 Thread sam
actually, that little bit of code i wrote is obscenely wrong anyway, so please don't bother analyzing the flow. any insight into the "list index out of range" error would still be welcome, though. -- http://mail.python.org/mailman/listinfo/python-list

Re: "list index out of range" error

2006-09-20 Thread sam
yes, yes, of course, thank you. not sure what i thought i was doing there. i'll see if i can get it running now... -- http://mail.python.org/mailman/listinfo/python-list

Re: "list index out of range" error

2006-09-20 Thread sam
for what it's worth. and it is approx. five times quicker than the bubblesort i wrote to begin with on a 286-word highly unordered list, so i wasn't wasting my time after all... __ import time file_input = open('wordlist.txt', 'r

Re: "list index out of range" error

2006-09-20 Thread sam
ny where we exchanged a lot of e-mails, and the titles were always 're: your e-mail', or 'project stuff', or 'file for client' or suchlike. made it kind of difficult to find anything. figured a similar principle might apply here... ; ) thanks again all, sam -- http://mail.python.org/mailman/listinfo/python-list

returning None instead of value: how to fix?

2006-09-22 Thread sam
to that default despite seemingly (to me at least) avoiding it through explicitly returning something else? thanks in advance, sam -- http://mail.python.org/mailman/listinfo/python-list

Re: returning None instead of value: how to fix?

2006-09-22 Thread sam
i take your point about trying to abbreviate what is, in effect, verbiage. thanks again for all the answers. it boggles the mind that one can have access to this almost immediate help at no charge. sam -- http://mail.python.org/mailman/listinfo/python-list

python interpreter on solaris 10

2006-09-25 Thread sam
now moved and restored the python2.3 file to its original position, i find the same command prompt failing to work. have i messed it up by moving it around? my workstation remains a shiny box which does naught but hum malevolently. is there hope? thank you, sam -- http://mail.python.org/mailma

Re: python interpreter on solaris 10

2006-09-25 Thread sam
ing 'there is no installed viewer capable of displaying the document'? i have no idea what i need, or where i can get it. any ideas? sam -- http://mail.python.org/mailman/listinfo/python-list

Re: python interpreter on solaris 10

2006-09-25 Thread sam
[EMAIL PROTECTED] wrote: > > i think i've tracked down the equivalent files on my pc. one opens the > > interpreter in a white-backed text editor, the other at the > > black-backed command prompt. i have equivalent files of the same size > > on the workstation, which must be the same. does anyone k

Re: python interpreter on solaris 10

2006-09-25 Thread sam
> I would try to use the python executable located in /usr/bin if it is > exists, otherwise use the python executable in /usr/sfw/bin. > > casevh lordy lord, is that where it was. i just found it now. i had been thinking that idle was the name of the python interpreter, not just the IDE, hence m

how to reuse class deinitions?

2006-10-01 Thread sam
hives here. maybe i'm just not searching with the right words. it's late here and my brain's switching off... cutting and pasting it into the interpreter is a bit of a bore. any help? much appreciated in advance, sam PS i've just reached first base with classes, and i think i'

Re: how to reuse class deinitions?

2006-10-01 Thread sam
should read 'definitions', of course. i hate stupid typos. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to reuse class deinitions?

2006-10-01 Thread sam
> What I do: > > For each new major version of python, in .../site-packages I make a > directory "sdd" (my initials). In it I put an empty file named > "__init__.py". When I have things I want to reuse, I put them in > files named things like ".../site-packages/sdd/goodidea.py", and > I get use

Re: About the 79 character line recommendation

2006-12-05 Thread sam
t; statements. To me, lining them up, even if it requires quite a few > extra spaces, helps readability quite a bit. Comments? > > Thanks, > Steve Bergman I prefer to use 132 char per line, and like you I line up the = sign for readability. The reason for this conventio

problems caused by very large for-loop

2006-12-07 Thread sam
x27;m just glad the damn thing's working again... :) sam -- http://mail.python.org/mailman/listinfo/python-list

Re: problems caused by very large for-loop

2006-12-07 Thread sam
thanks, i'll remember that. it makes sense that there should be a way of doing it... sam -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyserial never read

2006-02-22 Thread sam
l2.SetValue(ct) > ser.readline() You might want to try using ser.read() instead of ser.readline() as you may not be getting linefeed carrage return characters . I usually setup a buffer to scan for the characters I expect. > > > > Pls.Note i hove also try with read(number of byte ) with inWaiting(), > flush etc > > > But no result. > > Thanks Luca Hope this helps Sam Schulenburg -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   >