"Show this file in explorer"

2007-12-01 Thread farsheed
I have a big problem. I have a list of files that my script find and
list them in a little gui.
I need this function:

when i d-click on each item, I want explorer opens and selects that
item inside windows explorer.
like that beautiful buttom in iTunes.

Thanks in advane.

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


Re: 25 MOST FREQUENTLY ASKED QUESTIONS ABOUT ISLAM

2007-12-01 Thread farsheed
No , I tell you in brief what exactlly Islam is. (I know this is now a
good location but excuse me this time)

I was muslem for 25 years and happily not now. I read quran (muslem's
book) every day and it is full of inhuman words.
rozbeh(salman) and mohhamad made this book to **ck their people. if
you are a muslem you probebly be angry when you read this comment but
search about the rozbeh(salman) and his powerfull influence on
muhammad. muhammad had 40 wifes (**cking ***hole) and killed too many
poeple that you can't imagine. ali also was a killer and they all
where super super terrorists.

keep this in your mind:

20% of world is real
80% is what you made in your mind.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: "Show this file in explorer"

2007-12-01 Thread farsheed
That was great. Thanks so so much.
can you tell me where can I find that kind of trips?
Thanks Again.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: "Show this file in explorer"

2007-12-01 Thread farsheed
But now I have a more technical question. when I run this command, I
saw that the windows explorer did not refresh,example: I have two
files in a folder and i use that command to select them from command
line, the first one will be  selected, but after running the command
for second file, the second remains unselected. So I need to close the
explorer and run the command again for the second file. this is
different from the way iTunes do it.
Any Idea?
TIA.
Farsheed.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: "Show this file in explorer"

2007-12-01 Thread farsheed
You are my hero man, Thanks a lot.
-- 
http://mail.python.org/mailman/listinfo/python-list


C++2py

2007-12-02 Thread farsheed
I,m looking for a tool for converting c++ to python. Any Ideas?
TIA.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C++2py

2007-12-03 Thread farsheed
thanks markacy, very thanks for your helpful reply.
-- 
http://mail.python.org/mailman/listinfo/python-list


"finding hostid with python"

2007-12-07 Thread farsheed
I,m searching  for a way to obtain hostid in windows.
Any ideas?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: "finding hostid with python"

2007-12-09 Thread farsheed
Thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list


Best way to protect my new commercial software.

2007-12-09 Thread farsheed
I wrote a software and I want to protect it so can not be cracked
easily. I wrote it in python and compile it using py2exe. what is the
best way in your opinion?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Best way to protect my new commercial software.

2007-12-10 Thread farsheed
Thanks. But I ask this question technically, I mean I know nothing is
uncrackable and popular softwares are not well protected. But my
software is not that type and I don't want this specific software
popular.
It is some kind of in house tool and I want to copy protect it. this
is very complicated tool and not useful for
many people. indeed this is an animation manging tool I wrote for my
company. So if you have any idea that what is the best way to do it,
I'll appreciate that.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Best way to protect my new commercial software.

2007-12-10 Thread farsheed
So you say there is not any trusted way?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: newbie

2007-12-10 Thread farsheed
On Dec 11, 5:03 am, "Whizzer" <[EMAIL PROTECTED]> wrote:
> Is OReilly's Learning Python a good place to start learning to program?
> I've been told Python is a good first language.
>
> Thanks for the advice.

I learn it from python own tutorials comes with it's installation.
It is so important that you do not study bad books. there are lots a
of bad books about python that you can't imagine. I rate OReilly's
Learning Python 3 stars.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Best way to protect my new commercial software.

2007-12-13 Thread farsheed
Thank you all. I explain what I did to do it. Very simple but what I
want:

I find the host id of system (using ipconfig) and create a hash code
based on it.(some math, md5 and functions).
the code for licensing is about 15 lines and is very fast. I needed 20
licenses and I wrote a keygen for myself.

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


Better way to searching.

2007-12-13 Thread farsheed
my code is here:

_

def Globing(self, dir, extension, nop, inputDepth):
'It creates a basic glob function that needed in other classes'
self.exop = '*.'
self.opr = '*/'
self.counter = ''
self.files = []
self.path = ''
for i in range (inputDepth):
self.path = dir + self.opr * i + self.exop * nop + 
extension
#like this:*/*/*.*.mpg
self.counter = glob.glob(self.path)
self.files += self.counter
return self.files


Is there any better and faster way to do this?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Best way to protect my new commercial software.

2007-12-14 Thread farsheed
Let me be clear for you: there are someone in my company who love to
use my software in other companies that she works there also. and
because it is an inhouse tool, my CEO wanted me to protect it from
stealing.
and really we havn't time to copyright it. so I want to secure my
software from some people who love to steal and use it. I am an
animator and 3d programmer, what I wrote is some fast technology for
calculating sub surface lightning (SSS) using mental ray and
renderman. indded this tool works with maya and 3delight and mental
ray standalone. very complicated process and took me tree months to
wrote it. I am not a python pro, I know C++, maya Api, mel,... but I
use python because it is really faster than all of them. hope you
understand why I want to protect it, even if it will slower.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Better way to searching.

2007-12-14 Thread farsheed
thanks, I'll try it.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython FileDialog, select folder

2007-12-20 Thread farsheed
import wx
def dirchoose():
'Gives the user selected path. Use: dirchoose()'
global _selectedDir , _userCancel   #you should define
them before
userPath = 'c:/'
app = wx.App()
dialog = wx.DirDialog(None, "Please choose your project directory:",\
  style=1 ,defaultPath=userPath, pos = (10,10))
if dialog.ShowModal() == wx.ID_OK:
_selectedDir = dialog.GetPath()
return _selectedDir
else:
#app.Close()
dialog.Destroy()
    return _userCancel

Cheers, Farsheed.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Need to open an Url and display it in a window created using Python win extensions

2007-12-20 Thread Farsheed Ashouri
Can you post your basic wx part code?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Best way to protect my new commercial software.

2007-12-20 Thread Farsheed Ashouri
Well, I think my question was a programming question not a copyright
question.
I expect a nice script in 15-35 lines that protects my software from
working on
another machine. I don't want best protection method available, like
flexlm or etc.
My software is some kind of business secret and working it in another
company means
that other companies can do what we can. Copyright means nothing here
(I live in Iran!). We produce tv animation
and commercials and if a company use it, we even can't aware of it.
Ireally hope for a real post.
but thank all of you for reply.
sorry for my bad english.
-- 
http://mail.python.org/mailman/listinfo/python-list


A new group for MAYA - PYTHON lovers.

2007-12-20 Thread Farsheed Ashouri
New mailing list for Maya/Python users.

http://groups.google.com/group/python_inside_maya
-- 
http://mail.python.org/mailman/listinfo/python-list


Py2exe and Multi Treading problem.

2008-03-11 Thread Farsheed Ashouri
Here is my script
#**
#**
import threading
import socket
def openSocket(portNum):
mySocket = socket.socket ( socket.AF_INET, socket.SOCK_STREAM )
mySocket.bind ( ( '', portNum ) )
mySocket.listen ( 1 )
channel, details = mySocket.accept()
msg = channel.recv(4096)

class CmdPortThread( threading.Thread ):
def run( self ):
openSocket(6000)

def fakeCommandPort():
CmdPortThread().start()
fakeCommandPort()

#**
#**
If works perfect with python 2.5.2. Now I want to convert it to
standalone program.
but the .exe file fails to run without any error. If I cal
CmdPortThread without Trading, It works perfect.
What did I miss here? My setup.py is standard without any include or
excludes. Should I include something in setup.py? I am not a py2exe
newbie but I'll appreciate detailed descriptions.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Py2exe and Multi Treading problem.

2008-03-12 Thread Farsheed Ashouri
NO it dont work. If I remove threading part, it works like a charm.
Any Idea?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Py2exe and Multi Treading problem.

2008-03-16 Thread Farsheed Ashouri
On Mar 12, 10:35 pm, Thin Myrna <[EMAIL PROTECTED]> wrote:
> Farsheed Ashouri wrote:
> > NO it dont work. If I remove threading part, it works like a charm.
> > Any Idea?
>
> Of course it does then. Try to join the thread or do something else to
> prevent the non-threading part to exit prematurely.
>
> HTH
> Thin

Thanks, I got it. Very useful for me.
Cheers.
-- 
http://mail.python.org/mailman/listinfo/python-list


Local python web server problem

2009-02-09 Thread Farsheed Ashouri
Hi everyone. I have started to develop a web base software for
renderfarm managing.
I run the cherrypy hello world! example and when I visit
127.0.0.1:8080
on firefox, a nice "Hello World" appears. I am on ubuntu and my ip in
local network is 192.168.100.18
but when I visit 192.168.100.18, there is another page: "It Works!".
What is "It Works!"? and when I type 192.168.100.18:8080 in another
local pc, the page didn't load?

Sorry I am newbie in network area, so I have these two questions:
1- How can I serve my page in local network?
2- what is "It Works!" in 192.168.100.18? we have
192.168.100.<10-70> . no pc has this but mine!!!

3- Could you please explain me or at least point me to the right
direction of making little local web server, localhost?

4- How can I access to the server that serves web page in 56566 port?
I try 192.168.100.18:56566
but the page could not load. I can ping 192.168.100.18 but I can't
load web pages from it.
Why?


Thanks and sorry for my bad English.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Local python web server problem

2009-02-10 Thread Farsheed Ashouri
Thanks guys, Really appreciate your help. I am trying to solve the
problem and will keep you posted when I found a solution.

Farsheed Ashouri,
Tehran, Iran
--
http://mail.python.org/mailman/listinfo/python-list


Uploading big files wit cherrypy

2009-02-10 Thread Farsheed Ashouri
I use this code to upload using cherrypy:
#Code Start==
class NoteServer(object):
_cp_config = { 'tools.sessions.on': True }

def index(self):
return """


filename: 



Pars Studios, 2009


"""
#~ return compose().run()
index.exposed = True
def upload(self, myFile):
out = """

myFile length: %s
myFile filename: %s
myFile mime-type: %s

"""

# Although this just counts the file length, it demonstrates
# how to read large files in chunks instead of all at once.
# CherryPy uses Python's cgi module to read the uploaded file
# into a temporary file; myFile.file.read reads from that.
size = 0
allData=''
while True:
data = myFile.file.read(8192)
allData+=data
if not data:
break
size += len(data)
savedFile=open(myFile.filename, 'wb')
savedFile.write(allData)
savedFile.close()
return out % (size, myFile.filename, myFile.type)
#~ return allData
upload.exposed = True
#Code End

But I couldn't upload files bigger than 100Mb.
Why and what is workaround?

Thanks in advanced.
--
http://mail.python.org/mailman/listinfo/python-list


wxpython and IEHtmlWindow, Focus Problem.

2008-04-24 Thread Farsheed Ashouri
Hi everyone. I create a little browser with wxpython and IEHtmlWindow.
But I have a little problem here.
When I press enter in the html page, The focus goes to another panel.
Why this happens?
I want to load a html page and it have textares  and user should able
to press enter inside html page.

This is the code for creating it:

#===Code Begin ==
class PageOne(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(
self, parent, -1,
style=wx.TAB_TRAVERSAL|wx.CLIP_CHILDREN|
wx.NO_FULL_REPAINT_ON_RESIZE
)

self.sizer = wx.BoxSizer(wx.HORIZONTAL)
import  wx.lib.iewinas  iewin
a  = iewin.IEHtmlWindow(self, -1 )
#a.LoadUrl('file:///E:/Ducuments/EL%20Software%20Project/
mainSoft/xmlParser/HTML/learn/less2.html')
self.sizer.Add(a, 3, wx.EXPAND,1)
self.SetSizer(self.sizer)
#self.Bind(wx.EVT_TEXT_ENTER , self.OnKeyPress, a)
config.CurrentNotebook = a

#===Code End==

Thanks in advance.
--
http://mail.python.org/mailman/listinfo/python-list