Re: [Tutor] find a tutorial for starting with python and netbeans (Igor Fleischer)

2013-06-13 Thread I. Alejandro Fleischer
Hi,

Im starting to learn Python, and downloaded Net Beans as an IDE.
Would you recomend me please a tutorial for a begining with this two
integrated enviroments?

Thank you very much.


On Thu, Jun 13, 2013 at 3:21 PM,  wrote:

> Send Tutor mailing list submissions to
> tutor@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mail.python.org/mailman/listinfo/tutor
> or, via email, send a message with subject or body 'help' to
> tutor-requ...@python.org
>
> You can reach the person managing the list at
> tutor-ow...@python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Tutor digest..."
>
>
> Today's Topics:
>
>1. Re: sound implementation problems (Dave Angel)
>2. Re: sound implementation problems (Jim Mooney)
>3. Re: sound implementation problems (Francois Dion)
>
>
> --
>
> Message: 1
> Date: Thu, 13 Jun 2013 13:55:32 -0400
> From: Dave Angel 
> To: tutor@python.org
> Subject: Re: [Tutor] sound implementation problems
> Message-ID: <51ba0794.40...@davea.name>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 06/13/2013 01:21 PM, jessica peters wrote:
> > Hi
> >
> > I'm about 2 yrs into studying Python - started with "Hello World", and
> I'm working with v 2.5.1 right now.  The past year I've begun trying to
> write my own interactive fiction.  That works pretty well, but now I'm
> attempting to put some music into programs (I thought background music
> would be good), and I'm running into roadblocks.
> >
> > I've tried several different things for this, and come up with either my
> text that comes to a halt eventually at an error message (can't read from
> the files or mixer isn't initialized are the most common ones), or a
> completely blank screen with no sound.  I've tried both .mp3 files and .wav
> ones, neither works for this.
> >
> > Here's the most recent code I've attempted:
> >
> > import pygame , sys
> > import random
> > size=[500,500]
> > def run(self):
>
> It's not customary to use self as a name in a non-class function.
>
> >  import pygame.mixer
> >  pygame.mixer.init(22050, -16, 2, 4096)
> >  self.sound.seek(0)
>
> What is the object that has this sound attribute?
>
> >  snd = pygame.mixer.Sound(self.sound)
> >  pygame.mixer.Sound.play("bach-cello-suite-1.wav")
> >  musicPlaying = True
> >
>
> Nobody calls the function, so this file will silently exit.
>
> > Any ideas would  be appreciated.  Thanks.
> >
>
> Somebody familiar with both pygame and with sound might be able to help.
>   But you really ought to tell them what version of pygame, and what OS
> you're running on.
>
> And if you get an error message, copy/paste the whole thing, don't
> paraphrase, and show the same code as what was failing.
>
>
> --
> DaveA
>
>
> --
>
> Message: 2
> Date: Thu, 13 Jun 2013 10:56:06 -0700
> From: Jim Mooney 
> To: jessica peters 
> Cc: "Tutor@python.org" 
> Subject: Re: [Tutor] sound implementation problems
> Message-ID:
>  ycvyjsvoddxu_d48zkdqdsrzjma4oe7xcuhmrv...@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I'll assume you're using Windows. If not, ignore this ;')
>
> winsound on windows is Python native, much simpler, and always works. After
> importing it you can type help(winsound) to see its controls. But here is
> the usage for a wav file (it doesn't play mp3s)  There is no rule you have
> to use the pygame functionality, which is more complex, to get a sound, if
> that's all you want.
>
> import winsound
> winsound.PlaySound('c:/python33/media/wtf.wav', 1)
>
> Make sure you end with the "1". The helpfile doesn't mention what to use as
> the second parameter, but 1 works fine. And one other thing that tripped me
> up. If you're using an IDE or editor, mine has the unfortunate habit of
> loading in its own directory, and having no option to automatically access
> files from my  program directory. It saves a program into the last used
> directory, but looks for sounds in its own directory. Ugh. When I thought
> my program was accessing a wav from my standard program directory, it was
> really trying to find it in the PyScripter directory ;')
>
> So use the Full Path to your sound file, and avoid that possible problem. I
> have a startup script that now stays in my program directory, though. Of
> course, if you have an IDE or editor that lets you set the default
> directory that's no problem.
>
> If your editor doesn't do default directories but has startup scripts this
> will work (changing the directoy in chdir to your system, of course)
>
> import os
> os.chdir('c:/python33/jimprogs')
> del(os)
>
>
> Jim
>
> On 13 June 2013 10:21, jessica peters  wrote:
>
> > Hi
> >
> > I'm about 2 yrs into studying Python - started with "Hello World", and
> I'm
> > working with v 2.5.1 right now.  The past year I've

Re: [Tutor] How to install package (I. Alejandro Fleischer)

2013-07-15 Thread I. Alejandro Fleischer
Hi,
Im trying to install ipython for using with my already installed python
2.7, on windows xp 32 bit.

It says I have to have a package named " distribute". I' ve downladed it.

Dont know how to implement the package, wich seems not to be an executable
archive.

any help please?
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How to install package (I. Alejandro Fleischer)

2013-07-15 Thread I. Alejandro Fleischer
Don't know if it's the protocol here,  but I thank you very very much.
I already have an idea for solving this issue.
I'll let you know.
Igor
El 15/07/2013 18:33, "Oscar Benjamin"  escribió:

> On 15 July 2013 23:08, Jim Mooney  wrote:
> >
> > Figuring out the Python install mess is harder than figuring out Python,
> > IMHO ;')
>
> It's true that Python package installation is harder than it could be.
> There's a lot of progress being made on this front at the moment
> though. There are some deep problems in the way that Python has been
> doing it so far. The people who are working on this right now are
> spending most of their time laying the basic foundations for a better
> packaging system and so their work is yet to really manifest itself in
> visible improvements. The situation should be noticeably better by the
> time Python 3.4 gets released though.
>
>
> Oscar
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Tutor Digest, Vol 114, Issue 73

2013-09-05 Thread I. Alejandro Fleischer
Dear Friends,

I have a set of data to fit to a custom equation, y=a+b*exp(k*x), would you
advice me on the how to, or tutorial?

Thank you


On Thu, Aug 22, 2013 at 10:11 AM,  wrote:

> Send Tutor mailing list submissions to
> tutor@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mail.python.org/mailman/listinfo/tutor
> or, via email, send a message with subject or body 'help' to
> tutor-requ...@python.org
>
> You can reach the person managing the list at
> tutor-ow...@python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Tutor digest..."
>
>
> Today's Topics:
>
>1. Re: hi (Oscar Benjamin)
>2. global variables (Matthew Ngaha)
>3. Re: global variables (Chris Down)
>4. Re: global variables (Matthew Ngaha)
>5. Re: global variables (Chris Down)
>6. Re: global variables (Alan Gauld)
>7. Re: global variables (Alan Gauld)
>
>
> --
>
> Message: 1
> Date: Thu, 22 Aug 2013 13:03:10 +0100
> From: Oscar Benjamin 
> To: Vick 
> Cc: "Tutor@python.org" 
> Subject: Re: [Tutor] hi
> Message-ID:
>  on53h...@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 20 August 2013 13:49, Vick  wrote:
> >
> > From: Oscar Benjamin [mailto:oscar.j.benja...@gmail.com]
> >
> >> Well just send me some tutorial on how to build and obtain the
> >> coefficients for the butcher tableau for the RK4 as an example, and
> >> after I've mastered it, I'd give the dopri8 a shot.
> >
> > I am up for it so I'll see if I can find time to write a script that
> shows
> > how to do it.
> >
> > [Vick] Hope you've had the time to code it. I'm waiting for it.
>
> Sorry, I haven't found the time yet. It is still on my todo list though!
>
> > By the way your code for the Adams-Moulton coefficients are actually the
> > Adams-Bashforth ones and so I copied it and modified the copy to have the
> > Adams-Moulton coefficients as well. This means that I have now an
> nth-order
> > predictor-corrector method to solve for ODEs.
>
> Oh sorry. That'll be a cut and paste error. My code lives in a private
> software library that I keep meaning to release on PyPI but it's not
> ready for public consumption in quite a number of ways.
>
> I'm glad that you worked it out though. You''ll probably understand
> what I mean now when I say that the AM or AB integrators need a
> secondary algorithm to bootstrap. The accuracy of the subsequent AM/AB
> method depends on the accuracy of that step. In the worst case you can
> just use rk4 with a very small time-step for this bit though.
>
>
> Oscar
>
>
> --
>
> Message: 2
> Date: Thu, 22 Aug 2013 13:36:24 +0100
> From: Matthew Ngaha 
> To: "tutor@python.org" 
> Subject: [Tutor] global variables
> Message-ID:
>  zo+y3by20vkaumhapt...@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I'm always told to avoid using them. I read discussions on the python
> irc channel about them but honestly i feel there are some times where
> i can't avoid using them. Like where i want to keep track of a state
> variable in many different functions that may or may not alter its
> value and also not wanting any of the functions to return it to the
> caller.
>
> My question is how many global variables did your last decent sized
> program have? Also please share any insight you have about them. I do
> try to avoid them, but is this always possible?
>
>
> --
>
> Message: 3
> Date: Thu, 22 Aug 2013 14:40:34 +0200
> From: Chris Down 
> To: Matthew Ngaha 
> Cc: "tutor@python.org" 
> Subject: Re: [Tutor] global variables
> Message-ID: <20130822124033.gc4...@chrisdown.name>
> Content-Type: text/plain; charset="us-ascii"
>
> On 2013-08-22 13:36, Matthew Ngaha wrote:
> > I'm always told to avoid using them. I read discussions on the python
> > irc channel about them but honestly i feel there are some times where
> > i can't avoid using them. Like where i want to keep track of a state
> > variable in many different functions that may or may not alter its
> > value and also not wanting any of the functions to return it to the
> > caller.
>
> It sounds like you want to use a class.
>
> > My question is how many global variables did your last decent sized
> > program have? Also please share any insight you have about them. I do
> > try to avoid them, but is this always possible?
>
> I don't have any global variables in any of my projects, and I've been
> programming Python in some capacity for almost 8 years now. Why would you
> not
> just use a class if you want to store state?
> -- next part --
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 490 bytes
> Desc: not available
> URL: <
> http://mail.python.org/pipermail/tutor/attachments/20130822/02883212/attachment-0001.sig

Re: [Tutor] fit data to equation

2013-09-06 Thread I. Alejandro Fleischer
Dear Alan and Oscar

Thank you.

 I'll try to be more accurate:

What Oscar wrote is exactly the situation:


> "I'm going to assume that you have some data that gives paired
> measurements of two quantities e.g. (x1, y1), (x2, y2), ... (xn, yn).
> You want to find parameters a, b, and k so that y = a+b*exp(k*x) is a
> good fit to your data. The problem is that there is no unique
> definition of a "good" fit."
>
>
> I will install scipy.



>
> So your first step is probably to install scipy if you haven't already
> and have a look at its optimize module. I can be more specific if you
> explain a little more about what you're trying to do and what your
> data looks like.


It's a variation , of a physical value ("y")  in time ("x")   (while
cooling) , you have the data measured (xi, yi), but not from x=0. I need to
extrapolate "y" to "x=0", by that equation.

I know the very basics about statistics, and a beginner in python, I ve
chosen python to work with.

Regards,

Igor
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] idle problem

2014-01-03 Thread I. Alejandro Fleischer
Hello to everyone,

Sudenly Im having troubles opening files with the idle editor. When I open
a file it appears in blank, and can not close it anymore.

My OS is ubuntu 13.10 (64 bits) and my python version is 2.7.5.

Regards,

Igor
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor