Stefano Mtangoo 455 Senior Poster

see this and this

to uninstall just type in

zypper remove python-mysql

See this guide

Stefano Mtangoo 455 Senior Poster

it seems yast fails in some instances. zypper, smart and other are just alternatives. anyway did you manage to add more repositories? It seems python-mysql isn't in few repo you have.

Stefano Mtangoo 455 Senior Poster

in Linux there are package managers like Apt-get, Yast, yum and zypper. These helps you to install whatever package you want from official repositories of your os. I don't use and have never used Suse but I know Ubuntu and Mandriva. In Ubuntu, to install any pakage I will use

apt-get install package_name

In Mandriva however I use

urpmi package_name

So from Suse I discovered the package manager zypper. Since from your last post shows that zypper does the job then next issue is to find package name for MySQLdb.

Anyway from this it seems that you have few repositories in your list. You should add some more. here is the tutorial on how to do it on Suse with zypper

Stefano Mtangoo 455 Senior Poster

you may want to check this

Stefano Mtangoo 455 Senior Poster

Since I will soon go offline if this fails, go for:
smart install python-mysql

Stefano Mtangoo 455 Senior Poster

since I'm not familiar with Suse I will give you alot of things to try:

zypper install python-mysql

Stefano Mtangoo 455 Senior Poster

what do you use in shell? yast or yum?
Are you logged in as root? Check your shell if it start with # then you are root otherwise it will show $

if not root type su then enter and type password

Stefano Mtangoo 455 Senior Poster

there is Suse repository which I guess should have that package.
try:

apt-get install python-mysql

l

Stefano Mtangoo 455 Senior Poster

@evstevemd --
i have to use apache, php n mysql configuration for the purpose.

please help!!
Thanks.

If that is the case, use the recommended versions of Apache MySQL and PHP that plays well

Stefano Mtangoo 455 Senior Poster

to avoid all those use WAMP/LAMPP/MAMP

Stefano Mtangoo 455 Senior Poster

Java applets? New also in Java but it sounds like it is what you need
Let experts say something ;)

Stefano Mtangoo 455 Senior Poster

That is great app!
I of course recommend it over PyQT for these reasons:
1. Very heavy documentation (You will enjoy using wxWidget Docs too)
2. If you don't care about polish there is great wxGlade for RAD
3. Direct support from the creator (Dunn is one of best supporters of wxPy) plus best wxPythoners here at DW as well as at mailing list (Meeting wxPyers friends like Mike Driscoll, Stef Mientki, Robin Dunn, Andrea Gavana et al is fun)
4. A lot of code snippets
5. Very Liberal Licence (PyQT will not allow you to sell your product if you want to)

The Only thing for now is there is no version for Python 3.1 which isn't a very big deal for me. 2.6 is still very capable.
So there you are!

Stefano Mtangoo 455 Senior Poster

Use wxPython,
It is flexible and beautiful!
Will your Player be opensource? I should say it is great Job! What backend do you use to Play your media? Does it Play videos?

Go for wxPython but so far it is very very very great!

@Snee, I had to zoom to see them

Stefano Mtangoo 455 Senior Poster

are you planning to make a virus ? ;)

Stefano Mtangoo 455 Senior Poster

post whole code from demo and say which part you want so that someone can guide you on that. I don't even have Python installed here

Stefano Mtangoo 455 Senior Poster

There is a module that is imported that is on wxDemo DIR. I don't remember well but it is something like run
You should modify that

Stefano Mtangoo 455 Senior Poster

One weakness of PyQT apart from licencing issues, is lack of third party documentation. Try this Jan is good at writting tutorials

Stefano Mtangoo 455 Senior Poster
Stefano Mtangoo 455 Senior Poster

Netbeans... It may be good for Java but I wouldn't recommend using Netbeans for php unless you find php terribly hard. Instead use a php text editor (Not IDE) and things will be a lot simpler as php has a great debugging system as it is.

Have you checked aptana studio? It is great!
I agree with you on not using IDE, but I will add if you are dealing with small project. For big projects, IDE is unavoidable or it will cause many unnecessary headaches. Be careful in choosing IDE though ;)

Stefano Mtangoo 455 Senior Poster

did you tell NetBeans to create that file for you while creating new project? Yes Check for existence of that file. But adding file and naming it index.php will do the job!

Stefano Mtangoo 455 Senior Poster

What really annoys me is how some IDEs have really bad color syntax highlighting. I just can't stand it. I also hate the really old and gray look.

Not with the improved Wing IDE. It is best in syntax highlighting and code completion without forgetting debugger. It have many themes If you don't like windows/Linux's default

Don't take me at my word. Just download trial version and test Yourself. I use Personal Ed.

Stefano Mtangoo 455 Senior Poster

@Thompson,
May be you need to go back to yur wing and update it. It is being updated and tweaked and now it is better! I have it and is the default IDE for my project. I really recommend it. It is worth a price.

I'm thinking of getting pro version in future ;)

Stefano Mtangoo 455 Senior Poster

yeah I probably will, thanks for the help though!

glad to help :)

Stefano Mtangoo 455 Senior Poster

I see,
but I suggest you download it somewhere, check integrity of file and if all is well replacing files with updated. I guess your files will get corrupted if urllib2 fails while updating

Stefano Mtangoo 455 Senior Poster

Have you checked Wing IDE? It does have code completion, but you need some $$$ ;)
I think Pydev does a good Job as does Pyscripter. May be they are not as advanced as you define.

Vega's question is good start

Stefano Mtangoo 455 Senior Poster

As I see it, it is a bit complex for the task
you could put a text with three lines
let say this is a server text (serv.txt)

version = 0.1
state = stable
files_to_update =

Then use urllib2 to retrieve that data and update your program. You could use dictionary of filename:file url instead of the above list

Just my 2cents

Stefano Mtangoo 455 Senior Poster

Here are my 2cents:
1.Have two textfiles (or whatever) in your server as well as on app
2. app.txt stores current version, last updated, update interval
3. serv.txt stores latest version and status (alpha, beta etc) and type (next version or just bugfix)

At startup, have program compare last updated, add to interval and then compare to current date to see if it should look for update or not.
Then if it is to check for upd, it should invoke update.exe (or whatever you call) which will update necessary components (files et al)

You will be just changing server version and put something higher. Anyway you could use database with full details of what to be updated and the link to the updated file on server. This is better but you can implement whatever you see fullfilling your needs

I'm in hurry, so forgive me for any typo or broken english ;)

Stefano Mtangoo 455 Senior Poster

It is LEGAL to ask for starting point, or for PROBLEM in coding But it drives me bananas someone wants his/her homework done. Oh! Why did you go to college/School then?? :lol:

Stefano Mtangoo 455 Senior Poster

Not all IDE's support code completion well. Of all IDE's I've tried, I found PyDev and Eric4 work best in this respect.

Have you checked Wing IDE yet?
Eric is most of the time associated with PyQT. It is made by It!

Stefano Mtangoo 455 Senior Poster

Quick 'n dirty: I need a way to upload a small bit of text (<200 bytes) to my web server.

PHP is capable of that in few lines if you do it manually. Also you can automate the task using Task Scheduler (Win) or crontab (*nix)

.. from my C++ app.

That smells like C++

Stefano Mtangoo 455 Senior Poster

Can you summarize the whole bunch of words? I mean what you specifically want?

Stefano Mtangoo 455 Senior Poster

How do I center my text in python? I have a title and a description, and wan't to center it all in my output.

GUI or Console?
If GUI which one? In wxPython, wx.ALIGN_CENTER would do the Job

Stefano Mtangoo 455 Senior Poster

Which graphics module are you using?

You can check Visual Python
www.vpython.org

Stefano Mtangoo 455 Senior Poster

I gather any other hashing methods are fine as the next shortest one is 32 characters!

I will appreciate to see your conclusion on the matter before thread marked solved!

Stefano Mtangoo 455 Senior Poster

your current code? Please post it!

Stefano Mtangoo 455 Senior Poster

please use code tags for making your code readable and preserve indentation

Stefano Mtangoo 455 Senior Poster

Oops!
Multiple Post :cry:

Stefano Mtangoo 455 Senior Poster

Here is a tip:
Before the for Loop
>> readlines
Then loop into all lines using for loop
>> replace each occurrence of dot with space (or whatever you like)
>> write it to the new file
Here is completely untested code (I have no Python installed)

file1 = open('words.txt', 'r')
file2 = open('output.txt', 'w')
file1_cont = file1.readlines()
for line in file1_cont:
    line.replace('.', ' ')
    file2.write(line)
Stefano Mtangoo 455 Senior Poster

Try this and hack it!

j = 0
for i in range(2, 9):
    j = pow(i, 2)+j
print "The Final result is %d" %(j, )

BTW this is Python 2.x

Stefano Mtangoo 455 Senior Poster

Try this and hack it!

j = 0
for i in range(2, 9):
    j = pow(i, 2)+j
print "The Final result is %d" %(j, )

BTW this is Python 2.x

Stefano Mtangoo 455 Senior Poster
alert("Field XYZ is empty, please Fill it out!");

You, just make a JavaScript function to handle validation and only allow to submit when things are ok. That will do relieve a server also

Stefano Mtangoo 455 Senior Poster

Yes.

From the php manual:

mkdir("/path/to/my/dir", 0700);

http://www.php.net/manual/en/

OR download from:

http://www.php.net/download-docs.php

Just quickly: you need to ensure that the folder doesn't have any illegal characters - so naming a folder after the username probably isn't a good idea. Calling it member_XXXX (where XXXX = the member's id, which should be an integer, should be safe).

you have beaten me Ardav :)

Stefano Mtangoo 455 Senior Poster

Hello folks!

Is it possible to create directories on my web server based on new database entries?

Sure, very possible!

Hello folks!I am implementing a photo gallery and want to have it such that, when a user ADDS a new Gallery, a (sub)directory is created with the name that the user gave the gallery. Then when the user uploads photos into that gallery, they are actually stored in the corresponding folder.

Just query database names or whatever and assign it to a variable. Then pass it as an argument to PHP function for making DIRs

Thanks so much in advance!

You are welcome ;)

Stefano Mtangoo 455 Senior Poster

Keith once wrote a login System. I'm basing my code on that (even borrowed some stuffs as they are). So guys, can you rate the security of it? Also what About IP attacks. I heard the term but don't know how it applies to security/password.

Not to hijack the thread though ;)

Whoops! I didn't provide a link; Here it is
http://www.daniweb.com/forums/post951182.html#post951182

Stefano Mtangoo 455 Senior Poster

CWarn, that query is kinda confusing to a newbee, or it would at least have confused me at that stage. I think this one is simple to understand

"INSERT INTO employees(FirstName, LastName) VALUES('Stefa', 'Mimi')"
Stefano Mtangoo 455 Senior Poster

Keith once wrote a login System. I'm basing my code on that (even borrowed some stuffs as they are). So guys, can you rate the security of it? Also what About IP attacks. I heard the term but don't know how it applies to security/password.

Not to hijack the thread though ;)

Stefano Mtangoo 455 Senior Poster

I don't recommend XAMPP, though it is good once you get used to it! I recommend WAMP, it is elegant and Good. Also check your PHPMyAdmin to browse your databases

Stefano Mtangoo 455 Senior Poster
Stefano Mtangoo 455 Senior Poster

Check this you tube
It have good teaching on integrating PHPBB and your site. I hope it will give you an idea to start with :)
http://www.youtube.com/user/phpacademy

Stefano Mtangoo 455 Senior Poster

Or IBM...

Or NASA...