انجمن‌های فارسی اوبونتو

کمک و پشتیبانی => برنامه‌سازی => نویسنده: farshadf در 30 امرداد 1393، 10:59 ق‌ظ

عنوان: واسه کار با Python کدوم بهتره؟ Eclipse یا NetBeans?!!!
ارسال شده توسط: farshadf در 30 امرداد 1393، 10:59 ق‌ظ
دوستان سلام
می خوام پایتون رو یاد بگیرم ولی مایلم از یه محیط برنامه نویسی استفاده کنم.

حالا بین Eclipse و NetBeans کدوم مناسب تره؟

ممنون
عنوان: پاسخ : واسه کار با Python کدوم بهتره؟ Eclipse یا NetBeans?!!!
ارسال شده توسط: Masoud92m در 30 امرداد 1393، 11:05 ق‌ظ
پیشنهاد میکنم خودتون هردو رو تست کنید، جفتشون خوبن (و البته کند و سنگین :D ) و هرکسی با یک چیز راحته‌ !
اگه تازه شروع میکنید به یاد گرفتن، بهتره از چیز ساده تری شروع کنید، حداقل برای یک مدت کوتاه
عنوان: پاسخ : واسه کار با Python کدوم بهتره؟ Eclipse یا NetBeans?!!!
ارسال شده توسط: دانیال بهزادی در 30 امرداد 1393، 11:35 ق‌ظ
هردوی این‌ها خوبن. ولی به شدّت سنگینن. من خودم از vim استفاده مي‌کنم و اون رو تبدیل به یه محیط توسعه کردم برای پایتون. کدهام رو این‌جا می‌ذارم که بقیه هم بتونن این کار رو انجام بدن.
۱. پرونده‌ی vimrc./~
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
syntax on
filetype plugin indent on

" Show line numbers
set number

" Sets how many lines of history VIM has to remember
set history=700

" Ignore case when searching
set ignorecase

" When searching try to be smart about cases
set smartcase

" Makes search act like search in modern browsers
set incsearch

" Show (patial) command in status line
set showcmd

" Show matching brackets
set showmatch


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Improvment for dark backgrounds
set background=dark

" Enable syntax highlighting
syntax enable

" Set extra options when running in GUI mode
if has("gui_running")
set guioptions-=T
set guioptions+=e
set t_Co=256
set guitablabel=%M\ %t
colo desert
endif

"" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8

" Use Unix as the standard file type
set ffs=unix,dos,mac


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set ai "Auto indent
"set si "Smart indent



"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Moving around, tabs, windows and buffers
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Smart way to move between windows
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l

" Opens a new tab with the current buffer's path
" Super useful when editing files in the same directory
map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/

" Return to last edit position when opening files (You want this!)
autocmd BufReadPost *
     \ if line("'\"") > 0 && line("'\"") <= line("$") |
     \   exe "normal! g`\"" |
     \ endif

" Remember info about open buffers on close
set viminfo^=%

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Status line
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Always show the status line
"set laststatus=2

" Format the status line
"set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l

" Returns true if paste mode is enabled
"function! HasPaste()
" if &paste
" return 'PASTE MODE  '
" en
" return ''
"endfunction


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Spell checking
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Pressing ,ss will toggle and untoggle spell checking
"map <leader>ss :setlocal spell!<cr>


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Language Specific
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if !exists("autocommands_loaded")
let autocommands_loaded = 1
" Python
autocmd BufRead,BufNewFile,FileReadPost *.py source ~/.vim/python
endif

2. پرونده‌ی vim/python./~
" The magical turn-Vim-into-a-Python-IDE vim resource file!
"
" Mostly taken from https://dev.launchpad.net/UltimateVimPythonSetup
" Other bits culled from various sources, Canonical guys, or made up by me.
"
" Danial Behzadi 2013-08-05

" Wrapping and tabs.
set tw=78 ts=4 sw=4 sta et sts=4 ai

" More syntax highlighting.
let python_highlight_all = 1

" Smart indenting
set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class

" Auto delete trailing white spaces when saving files
func! DeleteTrailingWS()
exe "normal mz"
%s/\s\+$//ge
exe "normal `z"
endfunc
autocmd BufWrite *.py :call DeleteTrailingWS()

" Auto completion via ctrl-space (instead of the nasty ctrl-x ctrl-o)
set omnifunc=pythoncomplete#Complete
inoremap <Nul> <C-x><C-o>

" Wrap at 72 chars for comments.
set formatoptions=cq textwidth=72 foldignore= wildignore+=*.py[co]

" Highlight end of line whitespace.
highlight WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+$/

" The next two highlight matches break the previous one, I don't know why.
" Show long lines.
"highlight LongLine guibg=red ctermbg=red
"match LongLine /\%>79v.\+/
" Highlight bzr merge markers.
"highlight MergeMarker guibg=red ctermbg=red
"match MergeMarker /^[<=>\|]\{7\}\( [A-Z]\+\)?$/

" `gf` jumps to the filename under the cursor.  Point at an import statement
" and jump to it!
python << EOF
import os
import sys
import vim
for p in sys.path:
if os.path.isdir(p):
vim.command(r"set path+=%s" % (p.replace(" ", r"\ ")))
EOF

" Generate tags with: ctags -R -f ~/.vim/tags/python24.ctags /usr/lib/python2.4/
" ctrl-[ to go to the tag under the cursor, ctrl-T to go back.
set tags+=$HOME/.vim/tags/python24.ctags

" Use :make to see syntax errors. (:cn and :cp to move around, :dist to see
" all errors)
set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"
set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m

" Execute code
" Use VISUAL to select a range and then hit ctrl-h to execute it.
python << EOL
import vim
def EvaluateCurrentRange():
eval(compile('\n'.join(vim.current.range),'','exec'),globals())
EOL
map <C-h> :py EvaluateCurrentRange()

" Use <F5> to execute code and <S-F5> to execute it with value.
python << EOL
import vim
def EvaluateCurrentBuffer():
eval(compile('\n'.join(vim.current.buffer),'','exec'),globals())
EOL
map <F5> :py EvaluateCurrentBuffer()<CR>
map <S-F5> :py EvaluateCurrentRange()

" Use <F9> to save and execute it in terminal.
map <F9> :w<CR>:!python %<CR>

" Use F7/Shift-F7 to add/remove a breakpoint (pdb.set_trace)
" Totally cool.
python << EOF
def SetBreakpoint():
    import re
    nLine = int( vim.eval( 'line(".")'))

    strLine = vim.current.line
    strWhite = re.search( '^(\s*)', strLine).group(1)

    vim.current.buffer.append(
       "%(space)spdb.set_trace() %(mark)s Breakpoint %(mark)s" %
         {'space':strWhite, 'mark': '#' * 30}, nLine - 1)

    for strLine in vim.current.buffer:
        if strLine == "import pdb":
            break
    else:
        vim.current.buffer.append( 'import pdb', 0)
        vim.command( 'normal j1')

vim.command( 'map <f7> :py SetBreakpoint()<cr>')

def RemoveBreakpoints():
    import re

    nCurrentLine = int( vim.eval( 'line(".")'))

    nLines = []
    nLine = 1
    for strLine in vim.current.buffer:
        if strLine == "import pdb" or strLine.lstrip()[:15] == "pdb.set_trace()":
            nLines.append( nLine)
        nLine += 1

    nLines.reverse()

    for nLine in nLines:
        vim.command( "normal %dG" % nLine)
        vim.command( "normal dd")
        if nLine < nCurrentLine:
            nCurrentLine -= 1

    vim.command( "normal %dG" % nCurrentLine)

vim.command( "map <s-f7> :py RemoveBreakpoints()<cr>")
EOF

حالا با vim پایتون کار کن و ازش لذّت ببر (;
عنوان: پاسخ : واسه کار با Python کدوم بهتره؟ Eclipse یا NetBeans?!!!
ارسال شده توسط: moghadam در 30 امرداد 1393، 12:10 ب‌ظ
سلام
من با NetBeans جاوا کار میکنم و خیلی هم ازش راضی هستم، و برام هم سنگین نیست، در ضمن سیستم من cori3  و رمم هم 4 گیگ و سیستم عاملم هم اوبونتو 64 بیتی هستش.
عنوان: پاسخ : واسه کار با Python کدوم بهتره؟ Eclipse یا NetBeans?!!!
ارسال شده توسط: afrod در 30 امرداد 1393، 12:27 ب‌ظ
دارم ایمکس  رو آماده می کنم که از پایتون استفاده کنم. از این راهنما دنبال کنید: http://www.jesshamrick.com/2012/09/18/emacs-as-a-python-ide/
فایلهای کانفیگ: https://github.com/jhamrick/emacs (تک رو برای این دارم نصب میکنم (http://forum.ubuntu.ir/index.php/topic,98487.0.html) چون این کانفیگ ایمکس رو برای تک هم آماده میکنه و قبلش باید نصب باشه. وقتی نصب کنم شاید کار با تک رو شروع کنم!)
عنوان: پاسخ : واسه کار با Python کدوم بهتره؟ Eclipse یا NetBeans?!!!
ارسال شده توسط: سالار مقدم در 30 امرداد 1393، 12:48 ب‌ظ
وقتت رو برای انتخاب محیط توسعه تلف نکن، یکی رو نصب کن و کد بزن.

اگر اول کاری، ساده ترین ادیتور ممکنه( در حد نوت پد ویندوز! ) رو انتخاب کن چون ادیتور هایی که اتوکامپلیت و ... دارند باعث میشند کامند ها رو یاد نگیرید و بد عادت بشید.
عنوان: پاسخ : واسه کار با Python کدوم بهتره؟ Eclipse یا NetBeans?!!!
ارسال شده توسط: سهراب سپید در 31 امرداد 1393، 05:46 ب‌ظ
من از eric استفاده میکنم که مخصوص برنامه نویسی پایتونه، توو رفتگی هارو با یه خط به خوبی نشون میده و این از اشتباهات کم میکنه، خطا یابی توش راحته و کد ها بدون نیاز به تنظیم خاصی از داخل ای دی ای قابل اجراست، ابزار هایم برای کار با کیوت داره، ولی اتوکامپلیت نداره.
با Eclipse pydev کار کردم به خاطر اینکه توو رفتگی ها به درستی قابل تشخیص نبود موقع اجرای کدها با مشکل بر میخوردم
عنوان: پاسخ : واسه کار با Python کدوم بهتره؟ Eclipse یا NetBeans?!!!
ارسال شده توسط: Lol در 01 شهریور 1393، 01:50 ق‌ظ
 ;D ;D ;D
یک کلام خطم کلام
Spyder , وسلام
 8) ;D :D ;D
عنوان: پاسخ : واسه کار با Python کدوم بهتره؟ Eclipse یا NetBeans?!!!
ارسال شده توسط: امیرحسین گودرزی در 01 شهریور 1393، 02:30 ق‌ظ
pycharm رُ تست کن ببین به دردت می‌خوره یا نه
عنوان: پاسخ : واسه کار با Python کدوم بهتره؟ Eclipse یا NetBeans?!!!
ارسال شده توسط: امید توانا در 01 شهریور 1393، 03:30 ق‌ظ
Ninja-IDE (http://ninja-ide.org)
Eric (http://eric-ide.python-projects.org/)
عنوان: پاسخ : واسه کار با Python کدوم بهتره؟ Eclipse یا NetBeans?!!!
ارسال شده توسط: mohsen-rashidi در 01 شهریور 1393، 08:54 ق‌ظ
همون طور که رفقا گفتن برای شروع بهتره از تکست ادیتور استفاده کنی. اون محیط های توسعه کلی آپشن و چیز های مختلف دارن که خیلی راحت تمرکزتو بهم میزنن.
حالا اگر قرار باشه ادیتور معرفی کنم، vim اولین پیشنهادمه. از vim به اندازه مهارتت می تونی کار بکشی.
مثل دانیال فایل vimrc خودمو آپلود می کنم:
https://www.dropbox.com/s/1yzmp0rkquu5hxd/.vimrc?dl=0 (https://www.dropbox.com/s/1yzmp0rkquu5hxd/.vimrc?dl=0)