Re: [Tutor] Help understanding base64 decoding

2018-09-13 Thread Ryan Smith
being encoded in UTF-8. Hence I'm guessing is the reason for converting strings to a bytes object in the first place. Again thank you for the assistance! Ryan On Thu, Sep 13, 2018 at 2:57 AM, Peter Otten <__pete...@web.de> wrote: > Ryan Smith wrote: > >> Hello All, >> &g

[Tutor] Help understanding base64 decoding

2018-09-12 Thread Ryan Smith
est_str) >>>binascii.b2a_base64(temp) b'UwB5AHMAdABlAG0ALgBkAGwAbAA=\n' I understand that when decoding and encoding you have to use bytes objects but what I don't understand is why I can't get the proper conversion of the original ascii string. Can someone please poin

Re: [Tutor] Coming from R, what's a good IDE editor? I've tried PyCharm and Spyder

2017-06-05 Thread Ryan Smith
+1 for Wing IDE. I have been using it for about 6-7 months now and absolutely love it. Ryan On Sun, Jun 4, 2017 at 11:37 AM Ryan Smith wrote: > > On Sun, Jun 4, 2017 at 8:13 AM wolfrage8...@gmail.com < > wolfrage8...@gmail.com> wrote: > >> Atom.io Editor is my curre

Re: [Tutor] feedback on simple python code

2017-03-02 Thread Ryan Smith
On 2/28/17, 3:32 AM, "Tutor on behalf of Peter Otten" wrote: >Ryan Smith wrote: > >> Hi all, >> >> New python student here. I have been using O¹reilly¹s "Python Beyond the >> Basics: Object Oriented Programming video series". In one of the &

[Tutor] feedback on simple python code

2017-02-27 Thread Ryan Smith
Hi all, New python student here. I have been using O¹reilly¹s "Python Beyond the Basics: Object Oriented Programming video series". In one of the assignments we are to write a simple inheritance hierarchy of three classes that write to text files. I have actually written the code for the assignmen

Re: [Tutor] Need help

2016-10-13 Thread Ryan Smith
On Wednesday, October 12, 2016, Alan Gauld via Tutor wrote: > On 12/10/16 09:03, niraj pandey wrote: > > > Can you pls guide how to print this screen (Attached here) content in > > printer ? > > As we already pointed out this is a text list so attachments > are usually stripped off... > > However

Re: [Tutor] Why define a function inside a function?

2016-01-30 Thread Ryan Smith
Thank you to both you and Ben for taking the time and answering my question! The detailed explanation of the example code I provided really helped and made things clear. As did the explanations about closures and a simplified example. I definitely have a lot to learn, but this was very educational

[Tutor] Why define a function inside a function?

2016-01-29 Thread Ryan Smith
Hi all, I am new to programming and python and had a question. I hope I articulate this well enough so here it goes... I was following along on a thread on this mailing list discussing how to test file I/O operations. In one of the suggested solutions the following code was used: def _open_as_st

[Tutor] ?!

2015-04-21 Thread Ryan Scholes
Hi, Didn't really understand the instructions on the website but is this the right email address for help? Thanks, cory :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription op

Re: [Tutor] Start multiple threads from Python

2013-08-05 Thread Ryan Waples
Thanks, that may be just what I'm looking for. -ryan On Mon, Aug 5, 2013 at 12:26 PM, Chris Down wrote: > On 2013-08-05 12:17, Ryan Waples wrote: > > Currently I am calling each analysis program one at a time with > > subprocess.call(). This is working without a hitch,

[Tutor] Start multiple threads from Python

2013-08-05 Thread Ryan Waples
to do this, but that just begs the question how to do that from python? How can I start multiple independent programs (as in subprocess.call()) without waiting for them to finish? -Thanks Ryan ___ Tutor maillist - Tutor@python.org To unsubscribe or c

Re: [Tutor] Question regular expressions - the non-greedy pattern

2013-01-21 Thread Lie Ryan
On 22/01/13 10:11, Marcin Mleczko wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello Hugo, hello Walter, first thank you very much for the quick reply. The functions used here i.e. re.match() are taken directly form the example in the mentioned HowTo. I'd rather use re.findall() but I

Re: [Tutor] HELP- Regarding working with python

2013-01-18 Thread Lie Ryan
On 18/01/13 17:11, Gayathri S wrote: hi... I am using principal component analysis for dimensionality reduction in python. am having this following error... >>> import numpy as np >>> import matplotlib.pyplot as plt >>> import mlpy >>> np.random.seed(0) >>> mean,cov,n=[0,0],[[1,1]

Re: [Tutor] Python Programming for Absolute Beginner

2013-01-02 Thread Ryan Macy
Conor Grevlos wrote: I downloaded the python source folder, with chapters 1 through 12 I think. But it just opens up the program that is already built, not one that shows me the code. Sent from my iPhone ___ Tutor maillist - Tutor@python.org To uns

Re: [Tutor] Please help

2013-01-01 Thread Ryan Macy
Jack Little wrote: I do not understand my error (it says something about an out-of-function return on line 179) my code is at the link http://www.mediafire.com/download.php?4ga0weu4ifc6s1u ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] data analysis with python

2012-11-13 Thread Ryan Waples
Not sure how stuck you are to python (I have no doubt it can tackle this) but this is very much the sort of thing that 'R' is *really* good at. Just FYI. Good luck Ryan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscripti

Re: [Tutor] Using the set.difference method with an unknown number of input iterables

2012-10-18 Thread Ryan Waples
cheers, much appreciated -ryan On Thu, Oct 18, 2012 at 10:52 PM, Emile van Sebille wrote: > On 10/18/2012 10:38 AM, Ryan Waples wrote:> I'm struggling to understand > how to understand/accomplish the following: > > > > > I have an set ("a" below) and a

[Tutor] Using the set.difference method with an unknown number of input iterables

2012-10-18 Thread Ryan Waples
I'm struggling to understand how to understand/accomplish the following: I have an set ("a" below) and a list of sets ("not_a"), how can I pass the elements of "not_a" to set.difference() so that it it understands I want the difference between set "a" and all the rest set.difference says "Changed

Re: [Tutor] Genetic module recommendations?

2012-08-18 Thread Ryan Waples
Not sure if it meets your needs, but you should at least check out simuPOP. On Sat, Aug 18, 2012 at 12:24 PM, Modulok wrote: > List, > > I'm looking for a good genetic module. (Stable, well documented, pythonic, > etc.) > > I'm writing a breeding simulator where users select parent organisms to

Re: [Tutor] Problem When Iterating Over Large Test Files

2012-07-19 Thread Ryan Waples
> I count only 19 lines. yep, you are right. My bad, I think I missing copy/pasting line 20. >The first group has only three lines. See below. Not so, the first group is actually the first four lines listed below. Lines 1-4 serve as one group. For what it is worth, line four should have 1 cha

Re: [Tutor] Problem When Iterating Over Large Test Files

2012-07-18 Thread Ryan Waples
;> Thanks for the insistence, I'll check this out. If you have any >> guidance on how to do so let me know. I knew my system wasn't >> particularly well suited to the task at hand, but I haven't seen how >> it would actually cause problems. >> >> -R

Re: [Tutor] Problem When Iterating Over Large Test Files

2012-07-18 Thread Ryan Waples
On Wed, Jul 18, 2012 at 8:23 PM, Lee Harr wrote: > >> grep ^TTCTGTGAGTGATTTCCTGCAAGACAGGAATGTCAGT$> with no results > > How about: > grep TTCTGTGAGTGATTTCCTGCAAGACAGGAATGTCAGT outfile > Just in case there is some non-printing character in there... There are many instances of that sequence of ch

Re: [Tutor] Problem When Iterating Over Large Test Files

2012-07-18 Thread Ryan Waples
On Wed, Jul 18, 2012 at 8:04 PM, William R. Wing (Bill Wing) wrote: > On Jul 18, 2012, at 10:33 PM, Ryan Waples wrote: > >> Thanks for the replies, I'll try to address the questions raised and >> spur further conversation. >> >>> "those numbers (4GB an

Re: [Tutor] Problem When Iterating Over Large Test Files

2012-07-18 Thread Ryan Waples
Thanks for the replies, I'll try to address the questions raised and spur further conversation. >"those numbers (4GB and 64M lines) look suspiciously close to the file and >record pointer limits to a 32-bit file system. Are you sure you aren't >bumping into wrap around issues of some sort?" My

[Tutor] Problem When Iterating Over Large Test Files

2012-07-18 Thread Ryan Waples
I'm seeing some unexpected output when I use a script (included at end) to iterate over large text files. I am unsure of the source of the unexpected output and any help would be much appreciated. Background Python v 2.7.1 Windows 7 32bit Reading and writing to an external USB hard drive Data fi

Re: [Tutor] Is there space a between "#!" and "/usr/bin/env python" ?

2012-05-01 Thread Lie Ryan
> and is used by the various Unix command shells to specify what program > shall interpret this particular script. To be precise, the shell does not care about the shebang line either, the shebang is interpreted by the program loader in the kernel. The shell simply execve()-ed a script containing

Re: [Tutor] something about sum, integer and delta function

2012-01-16 Thread Lie Ryan
On 01/16/2012 12:57 AM, lina wrote: Hi, are there some modules can be used to do below things like: sum and delta function, and intergeration. Are you trying to graphically render an equation, calculate the results of equation, or algebraically manipulate the equation?

Re: [Tutor] making a custom file parser?

2012-01-07 Thread Lie Ryan
On 01/08/2012 04:53 AM, Alex Hall wrote: Hello all, I have a file with xml-ish code in it, the definitions for units in a real-time strategy game. I say xml-ish because the tags are like xml, but no quotes are used and most tags do not have to end. Also, comments in this file are prefaced by an a

Re: [Tutor] Subclassing Exceptions

2012-01-07 Thread Lie Ryan
On 01/07/2012 03:56 PM, Steven D'Aprano wrote: Chris Fuller wrote: You probably shouldn't inherit from SyntaxError, since it represents syntax errors in the Python code being interpreted or compiled. Any syntax error in your own data structures should be independent of SyntaxError. I'd say a s

Re: [Tutor] Using Python for a client interactive map application

2012-01-06 Thread Lie Ryan
On 01/06/2012 04:16 AM, Alan Gauld wrote: That's a non trivial application. It sounds a lot like Google maps? If by map you meant real world maps, this task becomes pretty much trivial. It is fairly easy to embed Google Map in your own web app, and their API provides a lot for almost anything

Re: [Tutor] python logger

2011-12-28 Thread Lie Ryan
On 12/29/2011 04:13 AM, rail shafigulin wrote: has anyone used python logger before? i'm trying to adapt it for my workplace. right now it is pretty simplistic for me. i'm trying to generate extra output by the LoggerAdapter. however i'm getting errors. specifically i get the following message:

Re: [Tutor] question about pywin32

2011-12-26 Thread Lie Ryan
On 12/27/2011 02:58 AM, Lie Ryan wrote: On 12/27/2011 12:18 AM, daedae11 wrote: Does pywin32 provide a module for AES encryption algorithm ? The description of some module in pywin32 document is so simple that there is not introduction about the function of the function. For example

Re: [Tutor] question about pywin32

2011-12-26 Thread Lie Ryan
On 12/27/2011 12:18 AM, daedae11 wrote: Does pywin32 provide a module for AES encryption algorithm ? The description of some module in pywin32 document is so simple that there is not introduction about the function of the function. For example, "CryptProtectData" function in module win32crypt. --

Re: [Tutor] Wading through traceback output :p:

2011-12-26 Thread Lie Ryan
On 12/26/2011 11:52 PM, Thomas C. Hicks wrote: On Mon, 26 Dec 2011 07:10:45 -0500 Alan Gauld wrote: On 26/12/11 11:42, Thomas C. Hicks wrote: Given it was working before and not now the obvious question is what has changed? It looks like you are on a Linux box so do you have automatic updates

Re: [Tutor] An unknown error in my program

2011-12-25 Thread Lie Ryan
On 12/25/2011 09:46 PM, Joel Goldstick wrote: You can either move the stuff at the top of your program into main, or you could pass the outer new into main as a parameter:main(new): the third alternative is to use the global keyword, e.g. # declare a global named 'new' new = 0 def increm

Re: [Tutor] insert queries into related tables referencing foreign keys using python

2011-12-24 Thread Lie Ryan
On 12/25/2011 01:57 AM, Monte Milanuk wrote: Lie Ryan gmail.com> writes: Be careful that in multithreaded program, each thread should have their own cursors, or otherwise another thread could possibly do another insert before you can query the lastrowid. okay, this touches on someth

Re: [Tutor] A few Python Mysteries [Reset]

2011-12-24 Thread Lie Ryan
On 12/25/2011 06:24 AM, Alan Gauld wrote: On 24/12/11 18:58, Wayne Watson wrote: Yikes. I gave the permissions for .idlerc above. The problem is with recent-files.py. IOError: [Errno 13] Permission denied: 'C:\\Users\\Wayne\\.idlerc\\recent-files.lst' Can you open it in Notepad from the same

Re: [Tutor] A few Python Mysteries [Reset]

2011-12-23 Thread Lie Ryan
On 12/23/2011 03:20 PM, Wayne Watson wrote: Hi, I found it, but not in a place I would expect. It's under my username, Wayne. It is a folder and has three files: breakpoints.lst recent-files.lst ZZrecent-files.lst The last one has the odd ZZ, but is empty. breakpoints.lst is empty too. That c

Re: [Tutor] insert queries into related tables referencing foreign keys using python

2011-12-23 Thread Lie Ryan
On 12/24/2011 11:07 AM, Monte Milanuk wrote: So... most python-sqlite tutorials concentrate on single tables. The few that deal with multiple tables and that mention foreign keys and such seem to demonstrate mainly using hard-coded data instead of parameterized insert queries into tables with au

Re: [Tutor] pygame blinking text

2011-12-12 Thread Lie Ryan
On 12/13/2011 01:01 AM, Cranky Frankie wrote: I tried putting the ty_message block in a WHILE TRUE loop, and that didn't work. Then I tried the same with the games.screen.add(ty_message) line and that didn't work either. I think what might work is if I can find a way to delete the ty_message and

Re: [Tutor] timedelta, difference calculation

2011-12-12 Thread Lie Ryan
On 12/13/2011 06:46 AM, rail shafigulin wrote: i found something interesting during the timedate difference calculation import datetime import time def main(): mydatetime = datetime.datetime.now() time.sleep(1) mydatetime2 = datetime.datetime.now() diff = mydatetime - mydatetime2

Re: [Tutor] how to return an object generated during a python threading code

2011-12-11 Thread Lie Ryan
On 12/11/2011 03:46 AM, Massimo Di Stefano wrote: Hi All, > Trying to read the documentation, i'm looking on how to use " threading.Lock() " and its methods "acquire() and release()" that seems to be the solution to my issue ... but i'm really far to understand how to implement it in my exampl

Re: [Tutor] return, why do I need it?

2011-12-11 Thread Lie Ryan
On 12/12/2011 01:38 AM, Pete O'Connell wrote: Hi I have been writing python code for a while now and I never return anything within any of my functions, I just (eg.) print stuff or make directories or update a log or what have you. When I look at other people's code they are always returning in t

Re: [Tutor] Need Explanation...

2011-12-10 Thread Lie Ryan
On 12/11/2011 04:04 AM, Alan Gauld wrote: On 10/12/11 16:46, Steven D'Aprano wrote: circumstances, regardless of which behaviour was choosen for append, it would catch out some people some time. Probably, although if returning 'self' were the default (which of course only makes sense in a pure

Re: [Tutor] What style do you call Python programming?

2011-12-10 Thread Lie Ryan
On 12/10/2011 03:52 AM, Sarma Tangirala wrote: Well, what I meant was the way you write things like list comprehension. I agree, that comment gave a completely incorrect picture. Sorry about that. list comprehension originated from Haskell, which is a language with a very strong functional pa

Re: [Tutor] print method name

2011-12-08 Thread Lie Ryan
On 12/09/2011 01:49 AM, rail shafigulin wrote: i created a class and in some instances when i use it call some of its methods i need to print a method name. the online search did produce some results but none of them seem to work for me. for example one of them said just to use __name__ or func_n

Re: [Tutor] Prime Factorization Tool

2011-12-04 Thread Lie Ryan
On 12/02/2011 12:15 AM, Robert Sjoblom wrote: So I've recently started poking at the Project Euler site, because I feel that I need to practice writing code. For those of you interested in solving the problems on your own I advice you to not read this, as it will spoil the solution. Problem 3 is

Re: [Tutor] Single line webserver

2011-11-07 Thread Lie Ryan
On 11/08/2011 10:23 AM, Rich Lovely wrote: Hi all, I was part of this list a couple of years ago, and a recent discussion at a python dojo brought to mind something I'd seen then: a one-liner (potentially single statement) webserver. I'm pretty sure it was posted to this list, but I can't fi

Re: [Tutor] Installing the uncertainties module

2011-10-29 Thread Lie Ryan
On 10/30/2011 03:55 PM, Richard D. Moores wrote: On Sat, Oct 29, 2011 at 21:37, Richard D. Moores wrote: On Sat, Oct 29, 2011 at 18:31, Richard D. Moores wrote: The uncertainties module () is now available for 64-bit Python 3.2. I've downloaded un

Re: [Tutor] Installing the uncertainties module

2011-10-29 Thread Lie Ryan
On 10/30/2011 12:31 PM, Richard D. Moores wrote: The uncertainties module () is now available for 64-bit Python 3.2. I've downloaded uncertainties-1.8.tar.gz. I need some utility that will handle both .gz and .tar, I presume. Looking for recommendations. 7zip has always been my multi-format com

Re: [Tutor] Praser

2011-10-23 Thread Lie Ryan
On 10/23/2011 03:09 PM, Henry wrote: Hi Steven, First of all, I want to able to download the data from the web into the database. Here is the part of the link: http://boc.quotepower.com/web/bochk/stocks_mktTransactions.jsp?lang=en&domain=NCBHK&rand=-74344993&lastLevel1Name=nav_stocks&lastStock=

Re: [Tutor] Keyboard Module

2011-10-17 Thread Ryan Strunk
obust enough that it should be able to stand on its own? Thanks as always, Ryan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Keyboard Module

2011-10-11 Thread Ryan Strunk
oven wrong on this) All of which leads me to my question. Can anyone recommend a keyboard module which will allow me to work with various facets of the keyboard to execute functions. I would love to have access to presses, holds, and releases, and it would be helpful to use unorthodox combina

Re: [Tutor] basic problem

2011-10-06 Thread Mac Ryan
On Thu, 6 Oct 2011 22:11:37 + ADRIAN KELLY wrote: > can someone spell out to me in (simply if possible) what this > programme is doing. i understand the concept of the "for" loop and > what its doing with the message the user enters. i just cant > understand the VOWELS and how it keeps add

Re: [Tutor] Mailing list archive oddity?

2011-09-29 Thread Mac Ryan
On Thu, 29 Sep 2011 23:08:19 +0200 Hugo Arts wrote: > * someone from the future is in need of python help and is sending > messages back in time. I told Guido that Python version 5.2 sucked, but he wouldn't / will not listen! :-/ /mac ___ Tutor mailli

Re: [Tutor] Why subclassing exceptions?

2011-09-28 Thread Mac Ryan
On Wed, 28 Sep 2011 10:15:07 -0400 "Prasad, Ramit" wrote: > >If you are using asserts for data validation, then your code is > >broken. The caller can disable every single assert, and hence remove > >your data validation, by simply passing a command line switch when > >calling your program. >

Re: [Tutor] Why subclassing exceptions?

2011-09-28 Thread Mac Ryan
On Wed, 28 Sep 2011 09:03:11 +0100 Alan Gauld wrote: > Remember that when handling exceptions we should be trying > to recover the situation not just bombing with an error message. > Exceptions should not be thought of as purely about > messages, they are opportunities to recover the situation w

[Tutor] Why subclassing exceptions?

2011-09-27 Thread Mac Ryan
On Wed, 28 Sep 2011 09:58:49 +1000 Steven D'Aprano wrote: > Mac Ryan wrote: > > > raise BaseException('Something is wrong here!') > > Never raise BaseException directly! BaseException is the very top of > the exception hierarchy, you should raise the

Re: [Tutor] help with a recursive function

2011-09-27 Thread Mac Ryan
On Tue, 27 Sep 2011 14:32:00 -0400 c smith wrote: > hi list, > i understand the general idea of recursion and if I am following well > written code I can understand how it works, but when I try to write > it for myself I get a bit confused with the flow. > I was trying to turn an ackerman functio

Re: [Tutor] Need a bump in the right direction (network programming)

2011-09-23 Thread Mac Ryan
On Fri, 23 Sep 2011 17:03:29 +0800 Cheeyung wrote: > >> On 09/23/2011 01:15 AM, Cheeyung wrote: > >>> I'm creating a mobile application and I'm using python for a > >>> desktop server. However, I don't have access to a static IP on the > >>> desktop, but do have a website. Is it possible to conne

Re: [Tutor] Need a bump in the right direction (network programming)

2011-09-23 Thread Mac Ryan
On Fri, 23 Sep 2011 03:20:53 -0400 Dave Angel wrote: > On 09/23/2011 01:15 AM, Cheeyung wrote: > > I'm creating a mobile application and I'm using python for a > > desktop server. However, I don't have access to a static IP on the > > desktop, but do have a website. Is it possible to connect from

Re: [Tutor] How it is better than java

2011-09-20 Thread Mac Ryan
On Tue, 20 Sep 2011 10:27:12 +1000 Steven D'Aprano wrote: > There are three misunderstandings with that statement. > [snip] > There's also JPype, which claims to give full access to Java > libraries in Python. Now: this was one of the best write-ups on the subject I read. Concise, clear, docume

Re: [Tutor] Flat is better than Nested

2011-09-09 Thread Mac Ryan
On Thu, 8 Sep 2011 21:39:47 -0500 "Ryan Strunk" wrote: > By the time I write this all into a file, the end user will never > even know this crazy hierarchy exists, but I will, and I don't like > it. Do I just need to get over it and realize that sometimes nested >

[Tutor] Flat is better than Nested

2011-09-08 Thread Ryan Strunk
l, and I don't like it. Do I just need to get over it and realize that sometimes nested is necessary, or is there a better way I might consider? Thanks for any help you can provide. Best, Ryan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Standard way to create debian packages for python programs?

2011-08-18 Thread Mac Ryan
On Thu, 18 Aug 2011 14:55:19 -0400 "Prasad, Ramit" wrote: > Have you taken a look at: http://pypi.python.org/pypi/stdeb/0.5.1 Thank you for this. Actually I got the same advice also on my SO question here: http://stackoverflow.com/q/7110604/146792 at about the same time you answered me. Good so

Re: [Tutor] Standard way to create debian packages for python programs?

2011-08-18 Thread Mac Ryan
On Fri, 19 Aug 2011 00:08:30 +0100 Alan Gauld wrote: > I notice there is also a distutils SIG with a mailing list which > looks like they might help. A quick look at some mails suggests they > cover this kind of issue. > > FWIW I used the gmane web site to take a quick look... Thanks for both t

Re: [Tutor] Standard way to create debian packages for python programs?

2011-08-18 Thread Mac Ryan
On Thu, 18 Aug 2011 12:48:19 -0400 "Prasad, Ramit" wrote: > To be honest, even after reading your original post twice (now > knowing you are actually asking a Python question) I am unsure what > Python question you are asking. Apologies, English is not my mother tongue, maybe I wasn't able to ex

Re: [Tutor] Standard way to create debian packages for python programs?

2011-08-18 Thread Mac Ryan
On Thu, 18 Aug 2011 13:01:08 -0400 Brett Ritter wrote: > On Thu, Aug 18, 2011 at 11:39 AM, Mac Ryan > wrote: > >        In particular, `distutils` is part of the standard python > > distribution and it is in no way specific to Debian, so I don't feel > > this is the

Re: [Tutor] Standard way to create debian packages for python programs?

2011-08-18 Thread Mac Ryan
On Thu, 18 Aug 2011 22:43:09 +1000 Steven D'Aprano wrote: > Mac Ryan wrote: > > Although it's years I program with python, I never distributed my > > software with packages (I never created *any* packages in my life, > > indeed). > > This is a mailing lis

[Tutor] Standard way to create debian packages for python programs?

2011-08-18 Thread Mac Ryan
Although it's years I program with python, I never distributed my software with packages (I never created *any* packages in my life, indeed). Out there there is ton of information on how to do this, but after a day of scouring the Internet I still did not wrap my mind around it. The problem for me

[Tutor] Copying Variables

2011-07-23 Thread Ryan Strunk
ct(d1) then later in the code when I want to re-initialize d1: d1 = dict(d2) but this won't work. Any suggestions you have as to how I can make this work are welcome. Best, Ryan ___ Tutor maillist - Tutor@python.org To unsubscribe or change su

Re: [Tutor] Removing characters in a string using format()

2011-07-21 Thread Ryan Porter
Thanks for help, James! It works perfectly. Ryan On 7/21/2011 11:13 AM, James Reynolds wrote: Since you're using python 3, you can just use a star to unpack the list like so: >>> print(*x) a b >>> print(*x, sep = ', ') a, b You can use sep to change the

[Tutor] Viability of Python

2011-07-21 Thread Ryan Strunk
, what’s a good second language, and when should someone start learning it? Thanks for any help you can give. Best, Ryan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2011-07-21 Thread Ryan Strunk
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Removing characters in a string using format()

2011-07-21 Thread Ryan Porter
Hi there, In one part of a program I'm writing, I want a list to be printed to the string. Here's my code: # Begin snippet listString = input('Please enter a single item: >').strip(); /print(); itemList.append(listString); / /... / /print('And here it is in alphabetical orde

[Tutor] Avoiding reauthentication to web services?

2011-07-21 Thread Ryan on the Beach
Hello. I am trying to write a python program to control a lighting controller through it's rest interface. It requires ssl and basic authentication. I have been successful using urllib2. However, the authentication takes a very long time on the controller so multiple http gets are slow. I

[Tutor] Good Book

2011-07-18 Thread Ryan
Dear All Pythonist, I'm strarting learn python programming and I have been found many resources on it but I have a problem. I don't know, what is the best complete book for new learner like me. I need your recommendation, thanks before . . . -- It is no more than the conspiracy of 0 and 1 [decr

Re: [Tutor] Limit raw_input to hundredth decimal point

2011-07-02 Thread Ryan Kirk
Thanks all! This helps a lot. On Jul 1, 2011, at 6:13 AM, Steven D'Aprano wrote: > Ryan Kirk wrote: >> Is there a way to limit raw_input to the hundredth decimal point? > > No. raw_input is a tool that does one thing: it collects input from the user. > It doesn't u

[Tutor] Limit raw_input to hundredth decimal point

2011-07-01 Thread Ryan Kirk
Is there a way to limit raw_input to the hundredth decimal point? For example, I'd like to allow the user to enter 5.75 but not 5.756: dollars = raw_input("Please enter a dollar amount: $") Thanks! ___ Tutor maillist - Tutor@python.org To unsubscribe

Re: [Tutor] Conceptual Question About Use of Python for Employee Training Program

2011-06-25 Thread Mac Ryan
Just thought to google for "S5 python", and google came out with a lot of interesting links! :o /mac > Good Morning: > > I am very new to Python but I am enjoying the learning process. I > have a question about the application of Python to a problem at the > industrial business where I work. My

Re: [Tutor] Conceptual Question About Use of Python for Employee Training Program

2011-06-25 Thread Mac Ryan
On Sat, 25 Jun 2011 06:18:14 -0700 (PDT) Adam Carr wrote: > Good Morning: > > I am very new to Python but I am enjoying the learning process. I > have a question about the application of Python to a problem at the > industrial business where I work. My two main questions are: > > 1. Can Python

[Tutor] Floating Point Craziness

2011-06-12 Thread Ryan Strunk
ry values are still being improperly placed. Thanks for any help you can provide. Best, Ryan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] about print()

2011-06-06 Thread Ryan Wu
Oh, I see! It's a little stupid question :) Thanks,Alan! On 6/6/11, Alan Gauld wrote: > "Ryan Wu" wrote > >> I am a newbie of python, and reading 'python essential reference'. >> >> Now I want to print this results >> 'a is %d'

[Tutor] about print()

2011-06-05 Thread Ryan Wu
Hi all, I am a newbie of python, and reading 'python essential reference'. Now I want to print this results 'a is %d' % a -> a is 42 > with the code a = 42 > test = "'a is %d' % a" > print( '%20s ->' % test, test) > but what I get is > 'a is %d' % a -> 'a is %d' % a > What is the

[Tutor] Combining two Dictionaries

2011-04-30 Thread Ryan Strunk
1 My understanding was that d2 looked at d1 once, grabbed its keys and values, and went off to do its own thing. Just as if you typed: x = 3 y = x x = 6 y still holds the value 3. This turns out not to be the case with dictionaries, and I'm not sure wh

[Tutor] Reading video streams from Internet

2011-04-22 Thread Ryan J
ith Python, but I have a bit of exposure to the urllib and urllib2. Any help is much appreciated! Thank you! -Ryan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Evaluating program running time?

2011-04-08 Thread Lie Ryan
On 04/09/11 04:29, Cory Teshera-Sterne wrote: > Hi all, > > I have a small(ish) Python program, and I need to be able to log the > running time. This isn't something I've ever really encountered, and > I've been led to believe it can be a little hairy. Are there any > Python-specific approaches to

Re: [Tutor] Python 3.2 Install Not Responding To Python Command!!

2011-04-08 Thread Lie Ryan
On 04/09/11 11:25, Nevins Duret wrote: > Hello Everyone, > > I recently installed python3.2 by building it from source and > noticed that it may have not been > installed 100% correctly. This is probably off topic in python tutor mailing list, better asked on the main mailing list or Ubuntu

Re: [Tutor] Passing a Variable

2011-04-04 Thread Lie Ryan
On 04/04/11 11:55, Ryan Strunk wrote: > Hi list, > > I am in the midst of trying to code a game based entirely on audio cues, and > I've run into a bit of a snag when trying to monitor certain variables. I'll > lay out the framework of what I'm going for in the h

Re: [Tutor] Passing a Variable

2011-04-03 Thread Ryan Strunk
> I've read your code. Frankly I don't understand your problem. I also don't see any occurrence of "health". There isn't a reference to health here. My goal is to have this code act as a checker for health, fatigue, time_remaining, or any other sort of statistic you'd like to throw into it. My prob

[Tutor] Passing a Variable

2011-04-03 Thread Ryan Strunk
Statistic a child of int, but I'm told that's more trouble than I probably want to deal with. Any suggestions/advice anyone has would be greatly appreciated. Best, Ryan import sound_lib from game_utils import delay #this encapsulates threading.Timer's assignment and start method class

Re: [Tutor] sorting based on elements which are nested in a list

2011-04-03 Thread Lie Ryan
On 04/04/11 00:14, ranjan das wrote: > > I have a list which I want to sort based on ('a','b','c') first and then > based on (1,2,3) > > How do i do these using itemgetter() since the list is nested > > A=[('k3', ['b', 3]), ('k2', ['a', 1]), ('k1', ['a', 3]), ('k4', ['c', 2])] > > The solution

[Tutor] first steps

2011-03-15 Thread Ryan McAdam
I'm a newbie running my very first module . . . Specs: Mac OSX 10.6.6 Python 3.2 IDLE v 3.2 Tk v 8.5 I saved this module to my desktop > # File: chaos.py > # A simple program illustrating chaotic behavior. > > def main(): > print("This program illustrates a chaotic function") > x = eval(

[Tutor] defining / calling arguments on a compiled script?

2011-03-13 Thread Ryan Hussain
my script? -- /// *Ryan Hussain* ry...@xvisionstudios.com www.xvisionstudios.com www.vimeo.com/xvisionstudios ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.o

[Tutor] Working with some sort of Timer

2011-02-16 Thread Ryan Strunk
ctions of the Python documentation would be greatly appreciated. Thank you all for any help you can provide, and I look forward to learning and growing with everyone. Best, Ryan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscripti

Re: [Tutor] 'or' in assignment (not if statement)?

2010-12-11 Thread Lie Ryan
On 12/11/10 04:12, Alan Gauld wrote: > "Steven D'Aprano" wrote >> As an experiment, offer to buy your wife dinner, and ask if she'd >> prefer to go to an Italian or Chinese restaurant. > > :-) > She would either answer "Yes" (she would like to go to one of > them, and if I'm lucky she might give

Re: [Tutor] role playing game - help needed

2010-12-11 Thread Lie Ryan
On 12/07/10 23:37, Robert Sjöblom wrote: > I've been told to use input() if I know that I'll only get integers, > and raw_input() for "everything." That is a bad piece of advice. You should only use input() when you can fully trust whoever doing the input (i.e. you). input() can accept any python

Re: [Tutor] Python Exercise

2010-11-27 Thread Mac Ryan
On Sat, 27 Nov 2010 22:00:03 +0800 Kok Cheng Tan wrote: > I created this website for practising python online: > http://www.pyschools.com. Hope to gather feedback from people here > who are interesting in teaching and learning python. Here you go with the first suggestion: remove the need to log

Re: [Tutor] Random Number Question

2010-11-26 Thread Mac Ryan
On Fri, 26 Nov 2010 18:33:07 +0100 Piotr Kamiński wrote: > You can get the list of Python's standard modules by typing help() > and then you will see something similar to: Thanks a lot! This is what I was after! Mac. ___ Tutor maillist - Tutor@pytho

Re: [Tutor] Random Number Question

2010-11-25 Thread Mac Ryan
On Thu, 25 Nov 2010 11:09:10 +0100 Timo wrote: > > I was wondering... apart from checking each name individually, is > > there any easy-peasy way to get a list of names used in the > > standard library (I am thinking to something like "dir()"? > This is the webpage I always use for searchin

  1   2   3   4   5   6   >