Re: Pandas or Numpy

2022-01-23 Thread Julius Hamilton
Hey, I don’t know but in case you don’t get other good answers, I’m pretty sure Numpy is more of a mathematical library and Pandas is definitely for handling spreadsheet data. So maybe both. Julius On Sun 23. Jan 2022 at 18:28, Chris Angelico wrote: > On Mon, 24 Jan 2022 at 04:10, Tobiah

Advanced ways to get object information from within python

2021-12-23 Thread Julius Hamilton
Hello, I would like to significantly increase my abilities to find the information I am seeking about any Python object I am using from within Python. I find this to be a really essential skill set. After reading documentation, it really helps to get under the hood at the command line and start te

Short, perfect program to read sentences of webpage

2021-12-08 Thread Julius Hamilton
Hey, This is something I have been working on for a very long time. It’s one of the reasons I got into programming at all. I’d really appreciate if people could input some advice on this. This is a really simple program which extracts the text from webpages and displays them one sentence at a tim

HTML extraction

2021-12-07 Thread Julius Hamilton
Hey, Could anyone please comment on the purest way simply to strip HTML tags from the internal text they surround? I know Beautiful Soup is a convenient tool, but I’m interested to know what the most minimal way to do it would be. People say you usually don’t use Regex for a second order languag

Urllib.request vs. Requests.get

2021-12-07 Thread Julius Hamilton
Hey, I am currently working on a simple program which scrapes text from webpages via a URL, then segments it (with Spacy). I’m trying to refine my program to use just the right tools for the job, for each of the steps. Requests.get works great, but I’ve seen people use urllib.request.urlopen() i

[Glitch?] Python has just stopped working

2016-02-16 Thread Theo Hamilton
I woke up two days ago to find out that python literally won't work any more. I have looked everywhere, asked multiple Stack Overflow questions, and am ready to give up. Whenever I run python (3.5), I get the following message: Fatal Python error: Py_initialize: unable to load the file system code

Re: Bug!

2015-08-21 Thread hamilton
On 8/21/2015 7:02 PM, Chris Angelico wrote: On Sat, Aug 22, 2015 at 9:53 AM, wrote: On Friday, August 21, 2015 at 3:42:36 PM UTC-7, hamilton wrote: On 8/21/2015 1:41 PM, Chris Angelico wrote: Python 3.5 does not support Windows XP. Is there a simple explanation for this ? Or is it just

Re: Bug!

2015-08-21 Thread hamilton
On 8/21/2015 1:41 PM, Chris Angelico wrote: Python 3.5 does not support Windows XP. Is there a simple explanation for this ? Or is it just is. -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating .exe file in Python

2015-06-17 Thread hamilton
On 6/17/2015 7:20 AM, Chris Angelico wrote: On Wed, Jun 17, 2015 at 11:10 PM, wrote: Thank you all. It seems going fine now. I have one additional question if I run the .exe files created in Non Python Windows environment. Linux has Python builtin but in Non Python environment how may I run

Re: OT ish Blocking telemarketers

2015-06-13 Thread hamilton
On 6/12/2015 9:47 PM, Seymore4Head wrote: Yes I have tried the DNCR. It didn't help. The calls are not coming from the US although the caller ID says they are. So you want to "block" calls from a faked number ?!? ( do you have a good program to select lotto numbers?? :-) On my cell phone,

Re: Human Rights and Justice in Islam

2015-05-24 Thread hamilton
On 5/24/2015 3:59 AM, Steven D'Aprano wrote: On Sun, 24 May 2015 09:34 am, hamilton wrote: [quoted bullshit from a spammer] [tried to argue with said spammer] Please don't reply to fly-by-spammers. Even if the spammer was interested in honest debate -- and he is not (fortunately!) -

Re: Human Rights and Justice in Islam

2015-05-23 Thread hamilton
On 5/23/2015 8:11 AM, bv4bv4...@gmail.com wrote: Human Rights and Justice in Islam Description: A glimpse at the foundations of human rights laid by Islam. By islam-guide.com Islam provides many human rights for the individual. The following are some of these human rights that Islam protects

Re: Monotheism - One God

2015-03-19 Thread hamilton
On 3/19/2015 3:57 PM, bv4bv4...@gmail.com wrote: Monotheism - One God The religion of Islam is based on one core belief, that there is no god worthy of worship but Allah. Man has invented many GODs, in their image. Pick One: http://www.godchecker.com/ -- https://mail.python.org/mailman/l

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-07 Thread hamilton
On 3/7/2015 10:19 PM, Grant Edwards wrote: On 2015-03-07, Gregory Ewing wrote: alister wrote: a popular UK soap made an extreme effort not to show a cross or Christmas tree during a church wedding in case it "offended not-Christians". In today's climate, when offending certain varieties of

Re: "9/11 Missing Links" is the video that Jews do not want you to see!

2012-09-24 Thread hamilton
On 9/24/2012 9:35 PM, Suzi Mrezutttii wrote: Google and watch "9/11 Missing Links" before Jews remove it from youtube anytime now! Hey dude, Nice name, "a boy named sue" !!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner Q: What does the double underscore __ mean?

2012-09-09 Thread hamilton
On 9/9/2012 6:39 AM, Dave Angel wrote: See the identical thread you posted on tutor, where it was a better match. Would you please post that link for those of us that did not see that one. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending USB commands with Python

2012-08-28 Thread hamilton
On 8/28/2012 11:04 PM, alex23 wrote: On Aug 29, 1:03 pm, hamilton wrote: The OP posted the link to the manual. If your not going to at least look it over, . Speaking for myself, I _don't_ go out of my way to read extra material But, you will give advice that has no

Re: Sending USB commands with Python

2012-08-28 Thread hamilton
all communicate with the host computer using a full-speed USB 2.0 interface. This interface also operates with USB Version 1.1 or later. The printers implement the standard USB Printer Class Device interface for communications (see http://www.usb.org/developers/devclass/). hamilton PS: Page 14

Re: OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread hamilton
On 7/28/2012 4:42 PM, Chris Angelico wrote: On Sun, Jul 29, 2012 at 7:43 AM, hamilton wrote: On 7/28/2012 1:23 PM, wxjmfa...@gmail.com wrote: For info: http://scintilla.org/ Just did a quick check on scintilla. This looks like a single file editor. Is there a project like capability in

Re: OT: Text editors (was Re: Search and replace text in XML file?)

2012-07-28 Thread hamilton
On 7/28/2012 1:23 PM, wxjmfa...@gmail.com wrote: For info: http://scintilla.org/ Just did a quick check on scintilla. This looks like a single file editor. Is there a project like capability in there that I did not notice ? Thanks hamilton -- http://mail.python.org/mailman/listinfo

Re: can someone teach me this?

2012-07-21 Thread hamilton
On 7/21/2012 9:06 AM, Devin Jeanpierre wrote: On Fri, Jul 20, 2012 at 11:15 PM, hamilton wrote: You are an idiot, or a scammer. Please be nice. -- Devin Devin, When someone asks me to download a compressed file, its just like the SCAM junk email I get all too often. If the OP would

Re: can someone teach me this?

2012-07-20 Thread hamilton
On 7/20/2012 8:09 PM, Menghsiu Lee wrote: Hi, I have tried 1000 times to compile this python file to be an exe file by using py2exe and gui2exe But, it does not work out. I am thinking if there can be some genius teaching me how to make this happen. The link in below is the complete code with a

Re: Diagramming code

2012-07-16 Thread hamilton
Thank you Fred. I am new to python and am reviewing code I find online. Some projects do have docs that spell out what its doing, but many projects that I have download have just the code. I have my own personal style to decypher C and C++ code. But python is still foreign to me. hamilton

Re: Diagramming code

2012-07-15 Thread hamilton
On 7/15/2012 7:38 PM, Chris Rebert wrote: On Sun, Jul 15, 2012 at 6:26 PM, hamilton wrote: Subject: Diagramming code Is there any software to help understand python code ? What sort of diagrams? Control flow diagrams? Class diagrams? Sequence diagrams? Module dependency diagrams? There are

Diagramming code

2012-07-15 Thread hamilton
Is there any software to help understand python code ? Thanks hamilton -- http://mail.python.org/mailman/listinfo/python-list

Plone Conference 2010 schedule published

2010-09-27 Thread Matt Hamilton
visit http://ploneconf2010.org. -- Matt Hamilton ma...@netsight.co.uk Netsight Internet Solutions, Ltd. Business Vision on the Internet http://www.netsight.co.uk +44 (0)117 9090901 Web Design | Zope/Plone Development and Cons

Re: Web shopping carts

2008-09-10 Thread Luke Hamilton
> From: Tino Wildenhain <[EMAIL PROTECTED]> > Date: Wed, 10 Sep 2008 08:40:42 -0500 > To: Luke Hamilton <[EMAIL PROTECTED]> > Cc: "python-list@python.org" > Subject: Re: Web shopping carts > > Hi, > > Luke Hamilton wrote: >> Thanks...

Re: Web shopping carts

2008-09-10 Thread Luke Hamilton
Thanks... Do you happen to have anymore details? > From: Tino Wildenhain <[EMAIL PROTECTED]> > Date: Wed, 10 Sep 2008 06:52:40 -0500 > To: Luke Hamilton <[EMAIL PROTECTED]> > Cc: "python-list@python.org" > Subject: Re: Web shopping carts > > Luke

Web shopping carts

2008-09-10 Thread Luke Hamilton
Hey People, I am wondering if there are any OS shopping cart application written in python? Regards, Luke Hamilton Solutions Architect RPM Solutions Pty. Ltd. Mobile: 0430 223 558 [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Vmware api

2008-08-17 Thread Luke Hamilton
at. Thanks Regards, Luke Hamilton Solutions Architect RPM Solutions Pty Ltd Mobile: 0430 223 558 [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: size of block device by ftell()

2007-11-20 Thread Gil Hamilton
Seongsu Lee <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > I want to get the size of a block device by ftell(). I found that I > can get > the size of a device by seek() and tell() in Python. But not in C. > > What is difference between them? How can I get the size of a block > device by

Re: List loops

2007-10-09 Thread Bill Hamilton
On 10/9/07, John Machin <[EMAIL PROTECTED]> wrote: > On 10/10/2007 1:33 AM, Hamilton, William wrote: > >> From: Tommy Grav > >> > >> Hi everyone, > >> > >>I have a list of objects where I have want to do two loops. > >> I want t

Re: pytz has so many timezones!

2007-10-09 Thread Bill Hamilton
... > > Isn't there some law somewhere that says the circumference > of a sphere is 360deg? Doesn't that same law mean that no two > points on a sphere can be seperated by more than 180deg > longitude? Doesn't that make GMT+13 non-sensible? A timezone is an arbitrary geographical designation. It has nothing to do with latitude or longitude. While some time zones may be defined as a geographical region between two longitudes, others may be defined by geographical borders or convienent terrain features. Take a look at the international date line. It doesn't follow a longitudinal line, but instead jogs east around Asia and then west around the Aleutian Islands. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

Fwd: NUCULAR fielded text searchable indexing

2007-10-09 Thread Bill Hamilton
a great tradition of tounge-in-cheek package names, like > >> "Cold fusion", for example. > >>... > > > > I think it's an excellent name :) > > And Bush would probably pronounce it "Nuke-lee-ur". I dislike Bush as much as the next guy, but could we please keep politics off the group? -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: List loops

2007-10-09 Thread Hamilton, William
:]): print index, jndex, i, j 0 0 0 0 0 1 0 1 0 2 0 2 1 0 1 1 1 1 1 2 2 0 2 2 >>> -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: tkinter question

2007-10-08 Thread Hamilton, William
ike this? > I'd use a three row grid, with the middle row containing a frame with another grid in it. I don't try to create a single massive grid that manages everything, I break it up into subgrids of related widgets. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: sorteddict [was a PEP proposal, but isn't anymore!]

2007-10-01 Thread Hamilton, William
erhead for no benefit. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: sorteddict PEP proposal [started off as orderedict]

2007-09-25 Thread Hamilton, William
n place, return a copy, and unset the flag. (Copies because you don't want the master key list to be modified by code using the class.) The use case for this seems to be when you have a dictionary that you need to often work through in sorted order. Sorting the keys every time keys() i

RE: An ordered dictionary for the Python library?

2007-09-12 Thread Hamilton, William
imply write: > > > > for string in od.keys(): > > process(string) > > > > For your use case I would wrap a list [(key, value)] with a dict-like > object and I would use the bisect module in the standard library to > keep > the inner list ordered. Or sub

RE: Python code-writing for the blind. Was (Re: newbie: stani's pythoneditor if-else)

2007-09-11 Thread Hamilton, William
ndprogramming.com weren't so lifeless... > Can you set SPE to use a single space rather than the typical four spaces? Python should accept it just fine. You'll still have problems reading other people's code. Maybe you can write a quick script that converts code down to one-space indents. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Excel process still running after program completion.

2007-09-11 Thread Hamilton, William
th: xlBook.Close() xlApp.Quit() I haven't had a problem with Excel staying open after the program ends. (On a tangent, I want to find the person who thought it was a good idea to use the same symbol in a font for 1, l, and I and do some unpleasant things.) -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: newbie: stani's python editor if-else

2007-09-11 Thread Hamilton, William
e. I have yet to see an IDE for Python (or anything > else) that unindents statements. Even IDLE, the Official IDE for > Python, doesn't do that. > IDLE (At least, IDLE 1.0.5) unindents in obvious situations. I think it's only on break, continue, pass, and return statements, but there may be others. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Checking if elements are empty

2007-09-11 Thread Hamilton, William
7; then splitting that string like this >>> y = x.split('\t') The question is, does the first element of the list y contain an empty string or not? In this case, the logic in the following conditional is perfectly valid. >>> if y[0] == "": ...print "True" ... else ...print "False" (len(y[0]) == 0) would also work, and is the solution you originally gave the OP. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Silent SaveAs when using the Excel win32com module

2007-09-10 Thread Hamilton, William
to replace the > file or not. I just want to replace it without thinking. > > Thanks in advance. Check if the file exists and delete it before saving the new one. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: application version checking against database

2007-09-07 Thread Hamilton, William
ersion number and any functions related to the version checking, and import that into the modules that do version checking. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: list index()

2007-08-30 Thread Hamilton, William
sing it, in Python you wrap the open statement in a try/except block instead. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Something in the function tutorial confused me.

2007-08-06 Thread Hamilton, William
> From: Lee Fleming > On Aug 6, 12:30 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote: > > When you call f(23), the variable y within it gets created and points at > > None. When f(23) exits, the y that it created gets destroyed. (Well, > > goes ou

RE: Something in the function tutorial confused me.

2007-08-06 Thread Hamilton, William
hat also points to None, and disappears forever when f(24) exits. The values in a def statement are created when the def is executed, but the variables are only created when the function is actually called, and new ones are created every time the function is called. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Bug in Time module, or in my understanding?

2007-08-02 Thread Hamilton, William
gt;> int(time.mktime(time.strptime('2007-03-11 01:00:00','%Y-%m-%d %H:%M:%S'))) 1173596400 >>> int(time.mktime(time.strptime('2007-03-11 02:00:00','%Y-%m-%d %H:%M:%S'))) 1173596400 >>> int(time.mktime(time.strptime('2007-03-11 03:00:00','%Y-%m-%d %H:%M:%S'))) 117360 -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Making Gridded Widgets Expandable

2007-07-30 Thread Hamilton, William
> What am I missing? In the first, your gridbox has Toplevel(root) as its master, causing it to be created in a new window. In the second, it has Frame(root) as its master, which does not create a new window. Changing Frame to Toplevel in the class statement and the call to __init__ causes them to act identically. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-05 Thread Hamilton, William
e that particular failure "impossible," but instead just change it from a type error into a data error that may or may not be harder to identify. If your program gets a piece of data that breaks it, you'll get a failure in the field. Static typechecking won't prevent that. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Collections of non-arbitrary objects ?

2007-06-26 Thread Hamilton, William
an exception of some sort, and the app will crash if you don't handle that exception. Which is exactly what will happen if you don't restrict the list data and it gets processed. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

Excel file interface for Python 2.3?

2007-06-12 Thread Hamilton, William
rator. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: c[:]()

2007-05-30 Thread Hamilton, William
, you need to act on those contents individually either by indexing them (c[0]) or iterating over them (for f in c:). -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: 'int' object is not callable in an threaded app

2007-05-22 Thread Hamilton, William
> count.ui.spTo.value() + 1); > QtCore.QObject.connect(worker, QtCore.SIGNAL("updateProgress"), > count.updateProgress, QtCore.Qt.QueuedConnection) > count.show() > sys.exit(app.exec_()) It appears that worker.start gets set to the result of count.ui.spFrom.value(). If that result is an int, then worker.start() is going to generate the TypeError you received. Did you actually mean to call worker.run() instead? --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Installing Python in a path that contains a blank

2007-05-22 Thread Hamilton, William
quot; to it. I've never run into a situation where was anything other than 1, but I'm pretty sure that you increment it if you have multiple files/directorys in the same directory that have the same first six non-space characters. This should work on any Windows long-filename system where you need 8.3 filenames for backwards compatibility. --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Random selection

2007-05-21 Thread Hamilton, William
t; Any help on the best way to do that? > Thanks >>> ran = random.random() >>> ran 0.70415952329234965 >>> for index, value in enumerate(x): if sum(x[0:index]) > ran: print index, ran break 2 0.704159523292 -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: tkinter button state = DISABLED

2007-05-21 Thread Hamilton, William
tk/man/tcl8.4/TkCmd/bind.htm#M11 > > As for the question "why?", maybe you should ask it on the c.l.tcl > newsgroup? The difference between bind and the button's command parameter makes sense to me. You'd use bind to create something like a right-click menu, where you want the same thing to happen whether the button is disabled or not. You use the command parameter when you care about the state of the button. -- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: tkFileDialog.askopenfilename()

2007-05-16 Thread Hamilton, William
user defined starting directory. > Thanks > Rahul > This link has a decent amount of info about the various dialog modules. http://www.pythonware.com/library/tkinter/introduction/x1164-data-entry.htm --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Trying to choose between python and java

2007-05-15 Thread Hamilton, William
s in existence, including all > of my programs, will be broken. Draw your own conclusions. > No, they'll work just fine. They just won't work with Python 3. It's not like the Python Liberation Front is going to hack into your computer in the middle of the night and delete you 2.x installation. --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: keyword checker - keyword.kwlist

2007-05-10 Thread Hamilton, William
> From: [EMAIL PROTECTED] > F:\Ohjelmat\Python25\Lib\keyword.pyc That's your problem. Rename keyword.py to keywordcheck.py, and delete keyword.pyc in this directory, and it should work fine. --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: keyword checker - keyword.kwlist

2007-05-10 Thread Hamilton, William
ut = raw_input('Enter identifier to check >> ') > if input in keyword.kwlist: > print input + "is keyword" > > else: > print input + "is not keyword" It works fine for me. Well, it did once I realized that 'keyword.py' was not

RE: change of random state when pyc created??

2007-05-10 Thread Hamilton, William
on over a set returns elements in an arbitrary order, which may depend on factors outside the scope of the containing program." --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Simulating simple electric circuits

2007-05-09 Thread Hamilton, William
because the current is split across the inputs. >From a logic standpoint, all you care about is whether each input and output is on or off. --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Strange terminal behavior after quitting Tkinter application

2007-05-07 Thread Hamilton, William
I think your problem is related to that difference. You'll probably be better off creating a new interpreter window as part of your program, if you really need access to the interpreter alongside your GUI. You may be able to extract IDLE's interpreter window and use it directly. --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: How to check if a string is empty in python?

2007-05-04 Thread Hamilton, William
e, but that doesn't relieve you of the > necessary tests. Your point would be important if the question were "How can I tell if x is an empty string?" On the other hand, "How to check if a string is empty?" implies that the OP already knows it is a strin

RE: Strange terminal behavior after quitting Tkinter application

2007-05-04 Thread Hamilton, William
command line available for other tasks. (The marker may be something other than &, it's been a long, long time since I've used *nix in a gui environment.) --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Dict Copy & Compare

2007-05-01 Thread Hamilton, William
> -Original Message- > From: Steven D'Aprano > Sent: Monday, April 30, 2007 10:14 PM > To: python-list@python.org > Subject: RE: Dict Copy & Compare > > On Mon, 30 Apr 2007 12:50:58 -0500, Hamilton, William wrote: > > >> On quick question, h

RE: re-importing modules

2007-05-01 Thread Hamilton, William
would mean spending a good three minutes waiting for the application to restart any time I make the slightest change in a module supporting that application. --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Dict Copy & Compare

2007-04-30 Thread Hamilton, William
dict1 have to be valid dictionary keys for this to work. If they aren't, you may be able to get away with converting them to strings. --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: import structures

2007-04-30 Thread Hamilton, William
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of spohle > Sent: Monday, April 30, 2007 10:25 AM > To: python-list@python.org > Subject: Re: import structures > > On Apr 30, 8:16 am, "Hamilton, William " <

RE: import structures

2007-04-30 Thread Hamilton, William
files. > If you've got modules a, b, and c, you can create a wrapper module d that imports from each of those. from a import * from b import * from c import * Then, import d and use it as the module name. So if a had a SomeThing class, you could do this: import d x = d.SomeThing() --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Python keywords

2007-04-26 Thread Hamilton, William
er > > > > for i in range(10): > > > > -Larry > > Thanks Larry. I saw that page you referenced above and that is how I > knew it was a keyword. But I still have found nodocumentation that > supports the examples you provided. http://docs.python.org/ref/comparisons.html#l2h-438 This information is 2 clicks away from any page in the reference: click the index link, then scroll down to the link to "in operator". --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Tutorial creates confusion about slices

2007-04-25 Thread Hamilton, William
ive steps. But I > prefer that people don't loose too much time figgering out > that a particular explanation only works for particular cases > and not in general. > > > Submit a patch if you want it changed. I'm sure your valuable > > insights will greatly improve the quality of the python documentation. > > Fat chance, if they reason like you. So you're saying your insights aren't valuable? --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Tutorial creates confusion about slices

2007-04-23 Thread Hamilton, William
kes sense if you recognize that the negative step value also flips which "side" the index is on. +---+---+---+---+---+ | H | e | l | p | A | +---+---+---+---+---+ 0 1 2 3 4 -6 -5 -4 -3 -2 -1 --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: Iterate through a dictionary of lists one "line" at a time

2007-04-18 Thread Hamilton, William
tries there will be. Thanks for any help you can give! > >>> for x in xrange(len(listing['id'])): ... print "" ... for key in listing.keys(): ... print listing[key][x], a Joe b Jane c Bob --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: tuples, index method, Python's design

2007-04-11 Thread Hamilton, William
is supposedly general and common use case actually happened? To me? No. Is it reasonable to believe it could happen? Yes. Is it reasonable to say, "We don't think this is likely to happen often, so we won't provide a simple way to deal with it?" Well, I'm not a deve

RE: pop() clarification

2007-04-11 Thread Hamilton, William
'list'] >>> spam.pop(1) 'is' >>> spam.pop(4) Traceback (most recent call last): File "", line 1, in -toplevel- spam.pop(4) IndexError: pop index out of range --- -Bill Hamilton -- http://mail.python.org/mailman/listinfo/python-list

RE: passing class by reference does not work??

2007-04-11 Thread Hamilton, William
kinda new at python so I may be missing something obvious here. > > Any suggestions? A() is not the class A. It calls the constructor of class A, returning an instance. If you change that line to: print [b(item, A) for item in d] you'll get the output you expected. --- -Bill Hamilton [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: tuples, index method, Python's design

2007-04-11 Thread Hamilton, William
provide the stream data in a list rather than a tuple? Probably, but someone else wrote the function so that's out of your control. Can you cast the tuple to a list? Sure, but for a large tuple that's potentially a large speed and memory hit. That probably the biggest general use

Re: Objects, lists and assigning values

2007-04-05 Thread Hamilton, William
use you're reassigning the class parameter to a new list. The second_collection doesn't work because you're appending to the (flawed) existing list assignment. --- -Bill Hamilton [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Looping issues

2007-04-05 Thread Hamilton, William
ched. for line in correct_settings: if line in current_settings: print line + "found." This may do what you want. --- -Bill Hamilton [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Project organization and import redux

2007-04-05 Thread Hamilton, William
en the program running on it ends. Is this a valid understanding of the workings of the interactive prompt, or am I way off base? --- -Bill Hamilton [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Python script produces "sem_trywait: Permission denied"

2005-10-18 Thread Mark E. Hamilton
rmission denied We don't run these scripts as root, so I can't say whether they work as root. I suspect they would, though, since root has permissions to do anything. -- Mark E. Hamilton Orion International Technologies, Inc. Sandia National Laboratory, N

Python script produces "sem_trywait: Permission denied"

2005-10-18 Thread Mark E. Hamilton
se problems. However, if anyone does have a solution to it I'd like to see it. I hate having unresolved wierdnesses in our code. -- ---- Mark E. Hamilton Orion International Technologies, Inc. Sandia National Laboratory, NM. 505-844-7666 -- http://mail.python.org/mailman/listinfo/python-list