Re: Simple background sound effect playback

2014-12-20 Thread catalinf...@gmail.com
See this :

>>> pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=4096)
>>> song = pygame.mixer.Sound("bird.ogg")
>>> pygame.mixer.Sound.play(song)
and then use the 
>>> channel.set_volume(0, 1)
>>> time.sleep(1)


On Wednesday, December 17, 2014 10:02:30 PM UTC+2, Jacob Kruger wrote:
> 
> 
> Ok, trying simple code from a pygame tutorial 
> snippet - nothing happens - just silent, but with no errors being 
> returned:
> # import the pygame module
> import  pygame
> # start pygame
> pygame.init()
> # load a sound file into memory
> sound = pygame.mixer.Sound("bird.ogg")
> channel = sound.play()
-- 
https://mail.python.org/mailman/listinfo/python-list


Where is win32service

2011-01-02 Thread catalinf...@gmail.com
I install Python 2.7 on Windows XP.
I try use :

import win32service
import win32serviceutil

But I got that error :

ImportError: No module named win32service
Where is this module ?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How is correct use of eval()

2010-10-12 Thread catalinf...@gmail.com
Ok,
I asking that to understand the correct way of python and I don't want
make mistakes.
I suppose has many tricks used by "bad guys".
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting a Python program to run of off a flash drive?

2010-05-09 Thread catalinf...@gmail.com
On Apr 1, 4:22 am, timo verbeek  wrote:
> On Apr 1, 12:48 am, Abethebabe  wrote:
>
> > I wanted to know if there was a way I could get a Python program to
> > run off of my flash drive as soon as the computer (Windows) detected
> > the device?
>
> > For example I could have a a simple program that would create a text
> > document on the computers desktop when my flash drive is detected.
>
> You could use Autorun.inf if your using Windows but for linux I don't
> now

Portable python from http://www.portablepython.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


vars().has_key() question about how working .

2010-04-04 Thread catalinf...@gmail.com
Hi everyone .
My questions is "why vars().has_key('b') is False ?'
I expecting to see "True" because is a variable ...
Thanks
Please see code bellow .
>>> x=11
>>> def something():
... b=25
...
>>> vars().has_key('x')
True
>>> vars().has_key('b')
False
>>> globals().has_key('x')
True
>>> globals().has_key('b')
False
>>>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Encryption source code with md5

2010-03-28 Thread catalinf...@gmail.com
I had a talk about Python and distribution of commercial products
created with python. This made me think of a way to protect my source
code to be distributed. I thought a live CD version and then to an
encryption method of a portion of source code. These thoughts are the
source of two questions.
-- 
http://mail.python.org/mailman/listinfo/python-list


Encryption source code with md5

2010-03-28 Thread catalinf...@gmail.com
Dear friends .

I have two simple questions:
It is possible to encrypt with md5 python source code?
What option do I have to protect my python source code?

Thank you .
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: md5 strange error

2009-12-14 Thread catalinf...@gmail.com
now i have Fedora 12
Now when i try to use md5 , python say :
 python
Python 2.6.2 (r262:71600, Aug 21 2009, 12:22:21)
[GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import md5
__main__:1: DeprecationWarning: the md5 module is deprecated; use
hashlib instead
>>> import md5
>>>

Why ?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Create video with text?

2009-11-13 Thread catalinf...@gmail.com
On Nov 12, 9:24 am, AK  wrote:
> Hi, what would be the best python package (or a framework that can be
> scripted in python) that can make a video with text moving around,
> jumping, zooming in/out and various other text effects? See the
> following link for an example:
>
> 

Yes, If you using both blender 3d and python .
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Choosing GUI Module for Python

2009-11-13 Thread catalinf...@gmail.com
Tkinter is deafult on python .
Is more easy to use any editor text (geany).
I donțt see a good IDE for GUI
On Nov 9, 6:49 am, Antony  wrote:
> Hi all
>    I just wanted to know which module is best for developing designing
> interface in python .
> i have come across some modules which are listed here . please tell
> your suggestions and comments to choose best one
>  1. PyGTK
>  2. PyQT
>  3. PySide
>  4.  wxPython
>  5 . TKinter
>
> Also i need to know is there any IDE for developing these
> things . . .

-- 
http://mail.python.org/mailman/listinfo/python-list


md5 strange error

2009-10-21 Thread catalinf...@gmail.com
I have this error , what happen ?

Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38)
[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import md5
>>> pass = md5.new()
  File "", line 1
pass = md5.new()
 ^
SyntaxError: invalid syntax
>>> m = md5.new()
>>> n = md5.new()

Regards !
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to schedule system calls with Python

2009-10-17 Thread catalinf...@gmail.com
And if you have this commands :alias ,ll ?
This commands not working , see "sh: ll: command not found"
and for "watch" and "top" need to use something to out from loops .


On Oct 15, 11:15 pm, TerryP  wrote:
> On Oct 15, 7:42 pm, Jeremy  wrote:
>
> > I need to write a Python script that will call some command line
> > programs (using os.system).  I will have many such calls, but I want
> > to control when the calls are made.  I won't know in advance how long
> > each program will run and I don't want to have 10 programs running
> > when I only have one or two processors.  I want to run one at a time
> > (or two if I have two processors), wait until it's finished, and then
> > call the next one.
>
> > How can I use Python to schedule these commands?
>
> > Thanks,
> > Jeremy
>
> External programs are not system calls; external programs are invoked
> through system calls; for example system() is a function call which
> when implemented under UNIX systems invokes some form of fork() and
> exec(), and likely spawn() under Windows NT.
>
> If you want simple sequenceal execution of external programs, use a
> suitable blocking function to execute them (like system) combined with
> a simple loop over the sequence of commands to run.
>
> for prog in ['cmd1', 'cmd2', 'cmd3']:
>     os.system(prog)
>
> blah.
>
> For anything more detailed (or complex) in response, try being more
> detailed yourself ;).

-- 
http://mail.python.org/mailman/listinfo/python-list


How i follow tree folders from url

2009-08-30 Thread catalinf...@gmail.com
Hello !

 I wanna use python to follow the tree folders from one url to get
data about dirs and folders.
 Example :
 If url is "www.site.com/first/ and "
 "first" is first folder with next subfolders "01","02","03"
 The result of script should be :

 www.site.com/first/01/
 www.site.com/first/02/
 www.site.com/first/03/

What is a easy way to make this ?
-- 
http://mail.python.org/mailman/listinfo/python-list


How i follow tree folders from url

2009-08-30 Thread catalinf...@gmail.com
Hello !

I wanna use python to follow the tree folders from one url.
Example :
If url is "www.site.com/first/ and "
"first" is first folder with next subfolders "01","02","03"
The result of script should be :

www.site.com/first/01/
www.site.com/first/02/
www.site.com/first/03/
Maybe urllib has some functions , but i don't know them.

Please help me !
Thank you !
-- 
http://mail.python.org/mailman/listinfo/python-list


About diagram and python

2009-08-27 Thread catalinf...@gmail.com
Hello!
I see on my Diagram Editor software this :
File -> Export... -> (on  Export option is : PyDia Code
Generation ... .py)
What python is in this file ?
How help me with python code ?
Thank you !
-- 
http://mail.python.org/mailman/listinfo/python-list


PIL and Python

2009-08-13 Thread catalinf...@gmail.com
Hello !
I want use python to change the "note" from .jpeg files .
What is the functions on PIL how make this ?
Thank you !
-- 
http://mail.python.org/mailman/listinfo/python-list


Help with sql and python

2009-07-29 Thread catalinf...@gmail.com
Hello !

I have accont on myphpadmin on my server.
I want to create one script in python.
This script manage sql task from my sql server .
How i make this in a simple way ?

Thank you !
-- 
http://mail.python.org/mailman/listinfo/python-list