Re: Repair was successful

2020-09-01 Thread Lourival Beltrão Martins Jr
someone other than the recipient is not authorized and may be unlawful. From: Lourival Beltrão Martins Jr Sent: Tuesday, September 1, 2020 10:07 To: python-list@python.org Subject: Repair was successful Hello, Good Morning! I have python 3.7 installed on my

Re: i'm a python newbie & wrote my first script, can someone critique it?

2016-06-12 Thread mad scientist jr
Thanks for your reply! On Saturday, June 11, 2016 at 2:41:39 PM UTC-4, MRAB wrote: > Drop the next 3 comment lines. They add visual clutter, and no useful info. > > ### > > # REFERENCE MODULES > > #

Re: i'm a python newbie & wrote my first script, can someone critique it?

2016-06-11 Thread mad scientist jr
For those who don't want to have to wade through comments, here is a version without so many comments: # For Python 3.x # This script creates multiple numbered empty folders # in the desired location. To change the folder names # or location, edit function get_default_options. import datetime im

Re: i'm a python newbie & wrote my first script, can someone critique it?

2016-06-11 Thread mad scientist jr
Thanks to everyone for your replies. I see my script was as horrific as I feared, but I read all the responses and made a few changes. I'm not 100% sold on not checking types, but took it out, because it made sense that other programmers might want to use some custom type with my functions for

i'm a python newbie & wrote my first script, can someone critique it?

2016-06-10 Thread mad scientist jr
Is this group appropriate for that kind of thing? (If not sorry for posting this here.) So I wanted to start learning Python, and there is s much information online, which is a little overwhelming. I really learn best from doing, especially if it's something actually useful. I needed to cre

Re: Why my ; continuator idea is better for debugging too.

2014-12-23 Thread Maynard A. Philbrook Jr.
In article <85795$54978fe1$5419aafe$2...@news.ziggo.nl>, skybuck2000 @hotmail.com says... > > Hello, > > In the past I wrote about pascal's ; mistake. > > ; should be used as a continuator. > > I just made a programming mistake which solidifies/merits my idea: > > The programming mistake was t

Re: GO vs Python

2014-08-24 Thread Sam Fourman Jr.
On Sun, Aug 24, 2014 at 10:07 PM, Chris Angelico wrote: > On Mon, Aug 25, 2014 at 12:57 PM, Sam Fourman Jr. > wrote: > > my initial reason for even looking at GO, was because, I noticed that if > I > > wanted to move my largest clients app from Python 2.x to 3.x it was &

Re: GO vs Python

2014-08-24 Thread Sam Fourman Jr.
3.x, they dropped the ball. -- Sam Fourman Jr. -- https://mail.python.org/mailman/listinfo/python-list

Re: basic maze problem with turtle

2013-10-14 Thread Sam Fourman Jr.
o/python-list> > Who the hell is Nikos? I hear reference to this guy ALL the time, is he a troll or a python god? this simply isn't clear.. I have only been on this list a few months. -- Sam Fourman Jr. -- https://mail.python.org/mailman/listinfo/python-list

Re: Moving to Python for web

2013-08-29 Thread Sam Fourman Jr.
python bindings :) there are MANY micro frameworks, I have been following these guys for a few years http://www.pocoo.org/ specifically jinja2 and flask looks to be the best choice out of all the options out there -- Sam Fourman Jr. -- http://mail.python.org/mailman/listinfo/python-list

Re: semicolon at end of python's statements

2013-08-29 Thread Sam Fourman Jr.
on and don't put? > > Yours, > Mohsen I totally understand where you are coming from, but I have found that the thing I can't get used to is the "indent thing" Python is a great language, but I always secretly find myself wishing I could somehow use python, an

.split() Qeustion

2013-08-16 Thread Alfonso Andalon Jr.
-- http://mail.python.org/mailman/listinfo/python-list

Re: Please provide a better explanation of tuples and dictionaries

2013-01-29 Thread Daniel W. Rouse Jr.
"John Gordon" wrote in message news:keaa9v$1ru$1...@reader1.panix.com... In "Daniel W. Rouse Jr." writes: I have recently started learning Python (2.7.3) but need a better explanation of how to use tuples and dictionaries. A tuple is a linear sequence of items, acc

Re: Please provide a better explanation of tuples and dictionaries

2013-01-29 Thread Daniel W. Rouse Jr.
"Chris Angelico" wrote in message news:mailman.1197.1359515470.2939.python-l...@python.org... On Wed, Jan 30, 2013 at 1:55 PM, Daniel W. Rouse Jr. wrote: I am currently using "Learning Python" by Mark Lutz and David Ascher, published by O'Reilly (ISBN 1-565

Please provide a better explanation of tuples and dictionaries

2013-01-29 Thread Daniel W. Rouse Jr.
Hi all, I have recently started learning Python (2.7.3) but need a better explanation of how to use tuples and dictionaries. I am currently using "Learning Python" by Mark Lutz and David Ascher, published by O'Reilly (ISBN 1-56592-464-9)--but I find the explanations insufficient and the numb

Re: send function keys to a legacy DOS program

2011-03-11 Thread jr
On Mar 10, 7:58 pm, Justin Ezequiel wrote: > Greetings, > > We have an old barcode program (MSDOS and source code unavailable.) > I've figured out how to populate the fields (by hacking into one of > the program's resource files.) > However, we still need to hit the following function keys in sequ

Python, Solaris 10, and Mailman

2011-01-21 Thread McNutt Jr, William R
I am attempting to install Mailman on a Sun Sunfire x4100 box running Solaris ten. I keep running into brick walls that the Mailman group looks at, shrugs, and says, that's a Python problem. Has ANYBODY actually made this work? Currently, I'm attempting to compile Python 2.4.4, which is the rec

'gcc' failed with exit status 1

2010-03-23 Thread JR
Hello All, I was hoping I could get some help with this issue with getting Cython to work. Earlier I had an issue that said "unable to find vcvarsall.bat" and it turns out there is an active bug report that covers that issue (I have a 64 bit windows system). I still hadn't installed 3.1.2, so I di

Re: Sqlite format string

2009-08-30 Thread Sergio Charpinel Jr.
Thank you very much. 2009/8/30 Cameron Simpson > On 29Aug2009 17:27, Sergio Charpinel Jr. > wrote: > | Hi, > | I have this statement cursor.execute("SELECT * from session_attribute > WHERE > | sid=%s", ( user )) > | and I'm receiving this error : > | >

Sqlite format string

2009-08-29 Thread Sergio Charpinel Jr.
Hi, I have this statement cursor.execute("SELECT * from session_attribute WHERE sid=%s", ( user )) and I'm receiving this error : TypeError: not all arguments converted during string formatting What is wrong ? -- Sergio Roberto Charpinel Jr. -- http://mail.python.org/mailman/

Ideas for problem with chat server application!

2009-07-22 Thread David Adamo Jr.
I developed a chat application with an attendant chat server. Everything is working fine. The issue now is the fact that whenever the chat server goes down (for instance, the server system shuts down as a result of power failure or some other problem), by the time the server system come back on, th

Re: Running a Python Service under the LocalService or NetworkService Account

2009-07-22 Thread David Adamo Jr.
On Jul 21, 8:05 pm, "Martin P. Hellwig" wrote: > David Adamo Jr. wrote: > > On Jul 21, 10:40 am, "Martin P. Hellwig" > > wrote: > >> sightseer wrote: > > >> > > >>> Error Installing Service: Access is Denied. (5) > &

Re: Running a Python Service under the LocalService or NetworkService Account

2009-07-21 Thread David Adamo Jr.
On Jul 21, 10:40 am, "Martin P. Hellwig" wrote: > sightseer wrote: > > > > > Error Installing Service: Access is Denied. (5) > > > Are you trying to do this on windows vista? > > -- > MPHhttp://blog.dcuktec.com > 'If consumed, best digested with added seasoning to own preference.' Yeah, I was t

Re: Running a Python Service under the LocalService or NetworkService Account

2009-07-20 Thread David Adamo Jr.
On Jul 20, 5:14 pm, Tim Golden wrote: > mistersexy wrote: > > On Jul 20, 3:03 pm, Tim Golden wrote: > >> mistersexy wrote: > >>> I am trying to create a Windows service in Python using pywin32. I do > >>> not want this service to run under a user account. I want this service > >>> to be able to r

Re: Interconvert a ctypes.Structure to/from a binary string?

2008-08-02 Thread Andrew P. Lentvorski, Jr.
On Aug 1, 11:35 pm, Andrew Lentvorski <[EMAIL PROTECTED]> wrote: > Basically, I'd like to use the ctypes module as a much more descriptive > "struct" module. > > Is there a way to take a ctypes.Structure-based class and convert it > to/from a binary string? > > Thanks, > -a After chugging through

Testing out Newsproxy.

2008-07-20 Thread David M Lemcoe Jr.
Going to see if Newsproxy actually blocks google groups. -=___=- David M Lemcoe Jr. Roswell, Georgia http://www.davidlemcoe.com/ [EMAIL PROTECTED] QRZ: KI4YJL AIM: lemcoe9 YIM: lemcoe9 GTalk: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Xfire: shawtylo1 ICQ: 359114839

Re: Question

2008-07-19 Thread David M Lemcoe Jr.
Hello [EMAIL PROTECTED], No language is better than another because Python is not intended for the same uses and/or people. Your question has no place here. David -=___=- David M Lemcoe Jr. Roswell, Georgia http://www.davidlemcoe.com/ [EMAIL PROTECTED] QRZ: KI4YJL

Re: Any Game Developers here?

2008-07-18 Thread David M Lemcoe Jr.
Hello Michael, Any people that use Python as the predominant language for their game development here? ~Michael Well, I make little CLI games that are extremely basic and have no actual graphics, but i'm sure a few people actually use them in video games. David -- http://mail.python.org

Re: Using Excel With Python

2007-01-11 Thread david brochu jr
Try using ExcelApp.Close(). This should kill the entire application (it might prompt for a Save). -- http://mail.python.org/mailman/listinfo/python-list

PyCon 07

2006-12-07 Thread david brochu jr
Anyone able to register yet for PyCon07? I can't find any link online..I want to get in early to lock in on the cheaper registration rate..any ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: Ensure a variable is divisible by 4

2006-12-05 Thread david brochu jr
You can use the modulous "%" to check for a remainder of division. If no remainder is found you know the number is divisible by 4. Ex: x = 111 if x%4 == 0: print "X is divisible by 4" -- Forwarded message -- From: "John Machin" <[EMAIL PROTECTED]> To: python-list@python.org D

Re: Format a number as currency! I can't find any help on this simple problem.

2006-10-17 Thread jr
Hi, Bernard. Just tried the first 2 commands on win XP, Python 2.5 under Idle. An Error is raised: "unsupported locale setting" (lib/locale.py in setlocale, line 476). Actually I get the error also under Python 2.4.3 Any idea what I'm missing? Thanks in advance. Jürgen Bernard wrote: > >>> import l

Need array help

2006-10-06 Thread Marion Long Jr
I am switching from microsoft visual basic programming to python programming. In microsoft visual basic you can Dim a variable so that you can add variables by changing the number on the end of the variable as in the following example; Dim acct(100) numoffiles=4 data=10 ct=1 while ct <> numoffi

Re: 911 FORGERY bigger than the Protocols of the Learned Elders of Zion

2006-09-16 Thread JR North
LOOK OUT! He has a bomb strapped to him! JR Dweller in the cellar [EMAIL PROTECTED] wrote: > Do not bury your head in the sand ... Do not practice denial ... It > will only bring you to terrible shame and grief ... Do not be afraid of > saying the truth ... Do not be afraid of deat

wait for keystoke

2006-08-30 Thread david brochu jr
I want to add a "press any key to continue" option to my script, where the script pauses until the users presses any key. Does anyone know how I would do this without having to add in an if statement in the middle of my existing script? Is there a method already to accomplish this? -- http://mail

Automate logging into page

2006-08-11 Thread david brochu jr
I am trying to automate logging a website and have been unsuccessful. The code below is supposed to log me into the site, but changing the username/password to an incorrect combination does not cause an error or crash to be seen. My goal is to log into this page and save the cookie from the page so

can't kill os.system process

2006-07-27 Thread david brochu jr
When I run the following code:   import os   file = "C:\\progra~1\\mozill~1\\firefox.exe www.google.com" os.system(file)  # this will spawn Firefox and naviage to google.com   kill = "taskkill /f /im firefox.exe" os.system(kill)   

Re: Automate Mozilla Firefox

2006-07-26 Thread david brochu jr
 want to take a text file (which has a list of urls) and have my script go through them 1 by one using Firefox.   So for instance, if the first two urls in my list were: www.google.com www.amazon.com   I would want to spawn firefox and load www.google.com. Once google loads, I would like to kill

Automate Mozilla Firefox

2006-07-26 Thread david brochu jr
Hey everyone,I am trying to automate navigating to urls (all from a txt file) 1 at a time in Firefox and then killing firefox before navigating to the next. I think I might have to use PyXPCOM to do this but I have never used this package and cannot find any good resources on the net to help me alo

PAMIE error help needed

2006-07-19 Thread david brochu jr
I have thrown together a script which reads a list or urls from a txt file and navigates to each url while recording how long it takes for the page to render completely using PAMIE. For some reason I randomly get crashes reporting:     File "c:\Python24\scripts\PAM.py", line 30, in IE_Invoke   

Python to log into web site

2006-07-18 Thread david brochu jr
Hi,   I have been browsing around the net looking for a way (hopefully an easily implemented module) to log into a web site using python. The site I wish to log into is an internal site which requires email address and password for authentication. Does anyone have any suggestions or links that migh

Re: first book about python

2006-07-12 Thread Ron Rogers Jr.
e Python tutorials: I've got the Python version of How to Think Like a Computer Scientist: http://www.ibiblio.org/obp/thinkCSpy/ And Dive into Python (available online as well as paper): http://diveintopython.org/ Hope this helps. CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

Re: help a newbie with a IDE/book combination

2006-07-12 Thread Ron Rogers Jr.
probably a way to do that from within vim or emacs) As some suggested, as a beginner you don't need much of a super powered IDE. If I wasn't using IDLE, I'd be using vim or gvim. CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

newbe: tuple

2006-06-14 Thread david brochu jr
I am trying to get my ip address through a script and I am using the following code:   import socket   ip = socket.gethostbyaddr(socket.gethostname())       ip then becomes a tuple and takes on three values. I am trying to pull the value of ip[2] which when printed displays: ['10.5.100.17'].   I wa

RSS feeds

2006-06-06 Thread david brochu jr
Not sure where to post this one so here it goes...sorry to anyone if it shouldnt be here.   I am looking to take RSS feeds a process them with a python program..any idea where I can get RSS feeds for sports stats, and how I would use the script to connect automatically to the feed? -- http://mail.

Re: Starting New Process

2006-06-05 Thread david brochu jr
try os.spawn() using the os module -- http://mail.python.org/mailman/listinfo/python-list

Tkinter

2006-06-02 Thread david brochu jr
Does anyone know how to get the value of the file selected when using tk_getOpenFile in Tkinter? -- http://mail.python.org/mailman/listinfo/python-list

Tkinter question

2006-05-31 Thread david brochu jr
I am trying to create a GUI that will display a new window with information about my program when the user clicks on the info button (a green "i" bitmap). So far all I can get my program to do is show the new window (using Toplevel() ) when the program loads, not when the user presses the informati

making IE toolbars visible

2006-05-02 Thread david brochu jr
Anyone know how if there is a module out there or some way to automate making an IE toolbar visible in IE?     Thanks, Dave -- http://mail.python.org/mailman/listinfo/python-list

detect enter key

2006-04-28 Thread david brochu jr
I am writing a script in which I need to wait for the user to press enter before continuing...how would I detect when the user presses the "Enter" key?     Thanks -- http://mail.python.org/mailman/listinfo/python-list

search files in a directory

2006-04-20 Thread david brochu jr
Hello,   I need to open every file in a directory and search for a string. What module is needed to do this and how would I go about searching each file? -- http://mail.python.org/mailman/listinfo/python-list

search a string

2006-04-20 Thread david brochu jr
Hello,     I have a text file with the following string: ['\r\n', 'Pinging www.ebayyy.com [207.189.104.86] with 32 bytes of data:\r\n', '\r\n', 'Request timed out.\r\n', '\r\n', 'Ping statistics for 207.189.104.86:\r\n', '    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),\r\n']     How wou

tail a file (win)

2006-04-20 Thread david brochu jr
Hello,   I wrote a script to monitor ping activity and output it to a log file. I am using windows and want to have another script constantly check the latest entry to see if Request timed out is seen. Is there a way to "tail" a file much like I would in Unix so I can just see the latest entry and

Tail a file

2006-04-20 Thread david brochu jr
Hello,   I wrote a script to monitor ping activity and output it to a log file. I am using windows and want to have another script constantly check the latest entry to see if Request timed out is seen. Is there a way to "tail" a file much like I would in Unix so I can just see the latest entry and

Re: Help for a complete newbie

2006-04-14 Thread Ralph H. Stoos Jr.
much for the info. Newsgroups are a great source of info, and folks like yourself are the reason why this is true. Best Regards, Ralph Tim Roberts wrote: > "Ralph H. Stoos Jr." <[EMAIL PROTECTED]> wrote: >> I am reading a Python tutorial for complete non-programmer

HELP PLEASE: What is wrong with this?

2006-04-14 Thread Ralph H. Stoos Jr.
File "autotp.py", line 21 ready = raw_input("Ready to proceed ? TYPE (y)es or (n)o: ") ^ -- http://mail.python.org/mailman/listinfo/python-list

Help for a complete newbie

2006-04-14 Thread Ralph H. Stoos Jr.
All, I am reading a Python tutorial for complete non-programmers. The code below is so simple as to be insulting but the assignment of the "ready" variable gives a syntax error. The code reads letter-for-letter like the tutorial states. Here is a dump. Can anyone tell me what is wrong? *

re: ping

2006-04-14 Thread david brochu jr
Thanks,   Unfortunately substituting os.system with os.popen results in the output being: www.google.com', mode 'r' at 0x009C4650> www.boston.com', mode 'r' at 0x009C4650> www.espn.com', mode 'r' at 0x009C4650> www.redsox.com', mode 'r' at 0x009C4650>  instead of giving me the ping stats "pinging

ping

2006-04-14 Thread david brochu jr
I am trying to ping websites and output the results to a txt file:   import os file = open("c:\python24\scripts\ip.txt")redirect = open("c:\python24\scripts\log.txt","a") for x in file: ping = "ping " + x print >> redirect, os.system(ping)  but the results seen in the log.txt file are:  

whitespace again

2006-04-14 Thread david brochu jr
hello again,   still having problemsi have the following in a txt file:   Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\software\compete\dca]"UserId"="92005851""PanelId"="mayflower""PanelName"="Consumer Input Toolbar""CaptureType"=dword:0002 "CapTypOvr"=dword:0001"ExePath"="

Remove Whitespace

2006-04-13 Thread david brochu jr
Hi again,   Trying to remove whitespace from a string in a text file.   the string is: D c a V e r " = d w o r d : 0 0 0 0 0 6 4 0   how would i go about doing this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expressions

2006-04-12 Thread david brochu jr
Pete, Why do you have to use a regular _expression_? I don't, I just though this was the easiest way.> "DcaVer"=dword:0640Is all your other input pretty much identical in form?  Specifically,the number of interest is the last thing on the line, and always preceded by a colon?  The other informa

Regular Expressions

2006-04-12 Thread david brochu jr
Hi,   I am trying to grab the following string out of a text file using regular _expression_ (re module):   "DcaVer"=dword:0640   What I need to do with that string is trim down " "DcaVer"=dword:" and convert the remaining number from hex to dec.   I have been trying to figure this out for a w

String Matching

2006-03-31 Thread david brochu jr
Hello,   I am trying to write a script that takes strings from a text file and searches to see if they are present in another text file...here is the code:   import osimport re search = open("c:\python24\scripts\pii\expected_rules_results.txt") def find(x): file = open("c:\python24\scripts\pii\dav

Spawn/Kill Process

2006-03-31 Thread david brochu jr
I need to write a script that starts an exe and then continues throughthe script. I am able to start the exe file but my script doesn'tcontinue because the process I start runs in the background of Windows(as it is supposed to). I have tried using both os.system and os.popento get around this but

Popen

2006-03-30 Thread david brochu jr
I am trying to write a script that starts a window process and then continues on to do other testing, but have encountered a little problem. When I start the exe (process to run) I cannot move on past that point in my script. Once started, the process is supposed to run in the background continuous

Clearing IE history

2006-03-15 Thread david brochu jr
Hello   I am trying to automate the clearing of IE history using python but keep running into problems. I cannot seem to find a good resource online about this, and I can't find an object in InternetExplorer's object module to point me in the right direction. I would rather not have to deal with de

Excel Object Model

2006-03-10 Thread david brochu jr
Hello,   I am trying to automate Excel and I cant seem to find out much relating to it's object model (in relation to Python)..seems as if its mostly covered by C and VB. Can anyone point me in the right direction? I am able to open excel, add information to cells, and then save and close the book

PAMIE syntax

2006-03-09 Thread david brochu jr
Hi everyone,   I am trying to automate Internet Explorer and am trying to use the PAMIE module for Python2.4. So far I have been unable to find any documentation online which provides syntax for using thie module. For instance, does anyone know how to use PAMIE to close a browser instance?     Any

Re: Learning Python

2006-02-06 Thread Ron Rogers Jr.
might not be in your menus though, on my box it's at: python2.4 /usr/local/lib/python2.4/idlelib/idle.py CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Needing a WinXP Python variant of a line of code

2006-01-30 Thread Ron Rogers Jr.
gt; path_to_nethack_logfile = os.path.join(root, logs[0]) > exit > Thank you. I guess I should do more reading, since I hadn't read about os.walk yet. I shouldn't even be trying to do what I'm doing so early in my learning. It will eventually be

Re: Needing a WinXP Python variant of a line of code

2006-01-30 Thread Ron Rogers Jr.
Tim Golden wrote: > [Ron Rogers Jr.] > > | I have this line of code that's written with Linux in mind: > | > | path_to_nethack_logfile = os.popen("locate logfile | grep > | nethackdir").read() > | > | and I'm wanting a Windows equivalent, any suggg

Needing a WinXP Python variant of a line of code

2006-01-30 Thread Ron Rogers Jr.
I have this line of code that's written with Linux in mind: path_to_nethack_logfile = os.popen("locate logfile | grep nethackdir").read() and I'm wanting a Windows equivalent, any suestions? Thanks. CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

Re: problems with documentation

2006-01-28 Thread Ron Rogers Jr.
e os module. > > rpd > The TOPICS seem to be case sensitve so help> assertion would not work, but help> ASSERTION will. Just figured this out myself, yesterday. CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

Re: beta.python.org content

2006-01-28 Thread Ron Rogers Jr.
for a listing of books That sort of thing. The python.org site's been useful to me, pointing me to interesting software, documentation and whatnot. Though I didn't know about IDLE until I saw it mentioned in a post on Slashdot in a story asking for recommendations for Python IDE's. I am "very" new to Python. CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

trying to use swig for the first time

2006-01-23 Thread Gary Wilson Jr
...I have some C code (foo.c and foo.h) that I would like to be able to access using python. I've written my interface file (foo.i) like so: %module foo %{ #include "foo.h" %} %include "foo.h" I then do the following on the command line: $ swig -python foo.i $ gcc -c foo.c foo_wrap.c -I /usr/inc

Re: My First Python Script

2005-09-16 Thread Gary Wilson Jr
Ed Hotchkiss wrote: > def ZeroThrough255(): > x = 0 > while x <= 255: > if len(x) == 1: > mySet = '00' + str(x) > elif len(x) == 2: > mySet = '0' + str(x) > else: > mySet = x >

Re: Cleaning strings with Regular Expressions

2005-09-08 Thread Gary Wilson Jr
sheffdog wrote: > Using regular expressions, the best I can do so far is using the re.sub > command but it still takes two lines. Can I do this in one line? Or > should I be approaching this differently? All I want to end up with is > the file name "ppbhat.tga". A regular expression to do what you

Re: OpenSource documentation problems

2005-09-01 Thread Fred L. Drake, Jr.
rtunately, not enough time was available from people with sufficient Roundup know-how to finish that effort. I still think that would be really nice. -Fred -- Fred L. Drake, Jr. -- http://mail.python.org/mailman/listinfo/python-list

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Gary Wilson Jr
Заур Шибзухов wrote: > There is a syntactic sugar for item access in > dictionaries and sequences: > > o[e] = v <-> o.__setitem__(e, v) > o[e] <-> o.__getitem__(e) > > where e is an expression. > > There is no similar way for set/get attribute for objects. > If e is a given name, then > >

Re: Perl s/ To Python?

2005-06-10 Thread Gary Wilson Jr
John Abel wrote: > Does anyone know of a quick way of performing this: > > $testVar =~ s#/mail/.*$##g Use the re (regular expression) module. Since you are iterating over a lot of entries, it is good to compile the regular expression outside of the loop. >>> import re >>> mailRE = re.compile('/

__init__.py in packages

2005-06-08 Thread Gary Wilson Jr
I'm creating a python package foo. What is intended use for __init__.py files? Well, I found this: http://www.python.org/doc/essays/packages.html >From what I can gather it is for initialization of the package when doing an import, but I would really like to see an example or situation that makes

PAM authentication?

2005-05-24 Thread Gary Wilson Jr
I would like my application to be able to authenticate through PAM. Is there any code out there that implements this? All I could find was PyPAM (http://www.pangalactic.org/PyPAM/), which doesn't look like it has been touched in almost 6 years and requires python1.5. -- http://mail.python.org/mai

Re: Convert from numbers to letters

2005-05-19 Thread Gary Wilson Jr
Gary Wilson Jr wrote: > alpha = 'abcdefghijklmnopqrstuvwxyz'.upper() > pairs = [x for x in alpha] + [''.join((x,y)) for x in alpha for y in alpha] I forget, is string concatenation with '+' just as fast as join() now (because that would look even nicer)

Re: Convert from numbers to letters

2005-05-19 Thread Gary Wilson Jr
Bill Mill wrote: > On 5/19/05, Peter Otten <[EMAIL PROTECTED]> wrote: > >>Bill Mill wrote: >> >> Traceback (most recent call last): File"",line1,in? NameError: name 'sorted' is not defined I think you're probably using 2.4 ?? >>> >>>Yes, sorted() is new in python 2.4 .You coul

Re: msnp, friends list

2005-02-18 Thread jr
Mark, Thank you so much for that information. Been struggling with this issue for quite some time now. A simle line comment on line 647 of session.py solves all problems :) this line sets your status to online and does not get time (usually) to get friends list correctly. -- http://mail.python.or

Re: msnp, friends list

2005-02-17 Thread jr
Sorry, I guess what I meant to ask was the status of the friends in the friends list begin updated. Right now we have a friends list which is being populated with the correct users, but their status (online, offline) is never getting set. For some reason the events aren't being fired?? -- http://

msnp, friends list

2005-02-17 Thread jr
I'm currently using the msnp.py code from Manish Jethani's project. I havn't been able to get the friends list to update like it should. it works once out of about every 25 times the program loads. Has anyone been able to implement his code and get the friends list to actively update? Or have any